Alexandre Plennevaux wrote:
... unless you want your layout to be centered. In such case you need javascript to feed the position absolute's top and left value.

Not in all cases. If you know the width and height of an element you can do:

#center {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -100px 0 0 -100px;
    width: 200px;
    height: 200px;
}


--Klaus

Reply via email to