CSS小技巧

在网上看到的一些,现在整理一些我所需要的几点如下:

1、 容器的垂直居中

比如,有一大一小两个容器,请问如何将小容器垂直居中?

<div >http://limpid.nl/lab/css/fixed/header:

body{ margin:0;padding:100px 0 0 0;}

div#header{

position:absolute;

top:0;

left:0;

width:100%;

height:<length>;

}

@media screen{

body>div#header{position: fixed;}

}

* html body{overflow:hidden;}

* html div#content{height:100%;overflow:auto;}