1
我想對齊箱VxH中心,但我似乎得到它只是有點過:垂直對齊和水平對齊
HTML:
<div id="wrapper">
<header>
<div id="logoWrapper">
<div class="logo">Logo Here </div><!-- Logo End -->
</div><!-- Logo Wrapper -->
</header>
</div><!-- Wrapper End -->
CSS:
![#wrapper{
width:955px;
margin:auto;
}
html body{
background:#F1FF29;
}
#logoWrapper{
width:429px;
height:179px;
position:absolute;
left:50%;
top:50%;
margin-left:-100px;
margin-top:-50px;
}
.logo{
display:block;
background:red;
width:429px;
height:179px;
}]
圖片:http://i.stack.imgur.com/rZ2ng.png
可能重複:http://stackoverflow.com/questions/16341245/垂直和水平對準功能於CSS –