我需要你的帮助,
框白色部分内的文字如何对齐死点(垂直和水平对齐)?
见下图:
期望的结果是:
这是 HTML 标记:
<!DOCTYPE html>
<html>
<head>
<title>Centered Div</title>
<style>
#wrapper {
height: 100px;
width: 500px;
bottom: 50%;
right: 50%;
position: absolute;
font-family: tahoma;
font-size: 8pt;
font-weight: bold;
}
#container {
background: #FFF;
left: 50%;
padding: 10px;
top: 50%;
margin: 0;
padding: 0;
height: 100%;
border: 1px solid rgb(128,128,128);
height: 100%;
position: relative;
}
#inner1 {
height: 100%;
border: 1px solid blue;
}
#inner2 {
height: 100%;
border: 1px solid green;
}
#titlebar {
cursor: pointer;
height: 23px;
width: 100%;
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr=#0A246A, endColorStr=#A6CAF0, GradientType=1);
color: white;
line-height:22px;
}
#button {
line-height: 10px;
width: 18px;
font-size: 10px;
font-family: tahoma;
margin-top: 1px;
margin-right: 2px;
position:absolute;
top:0;
right:0;
}
#alertText {
}
</style>
</head>
<body>
<div id="wrapper">
<div id="container">
<div id="titlebar"><div style="padding-left: 3px;">Information Box</div></div>
<div><input id="button" type="button" value="X"></div>
<div id="alertText">This is some sample text that will appear here</div>
</div>
</div>
</body>
</html>