div表格怎么居顶,求大侠指导
<style type="text/css">
body {
font-family: "Times New Roman", "宋体", arial;
font-size: 12px;
margin:0 auto;
text-align: center;
background-image: url(../../images/background_top_0.png)
}
a:link, visited, hover, active {
text-decoration: none;
color: #000000;
}
#header {
position:relative;
margin-top:0px;
width: 1440px;
height: 196px;
}
#header-top {
position:relative;
margin-top:0px;
width: 1440px;
height: 30px;
background-image: url(images/background_0.png)
}
#box-top {
position:relative;
margin-top:0px;
left: 200px;
width: 920px;
height: 30px;
}
</style>
<div id="header">
<div id="header-top" >
<div id="box-top">
<div style="text-align:right; font-family:verdana; font-size:12px; margin-top:6px; ">
<a href="*">HOME </a>
<a href="*">ABOUT </a>
<a href="*">CASE </a>
<a href="*">CONTACT</a>
</div>
</div>
</div>
</div>
灰色的背景能居顶对齐
[解决办法]
外面加个大的div,然后width100%,height100%。OK