Alexandre Plennevaux wrote:
yes i know, for instance i'm aware of the "horizon" method, but it needs
an empty div, and i would like to keep the markup clean. Also the
negative margin suggestion of Klaus is also a technique that used ot
save my life. But now, i'm getting old & tired of fighting against
browsers. so, the negative margin technique for me a technique that does
not make your site futureproof. besides, i've had issues with it and IE6.
I don't see why the technique is not future-proof. It's basic CSS (CSS
1!) without even a hack in it and positioning is much less buggy then
the float model in IE.
If you have problems in IE 6 with positioning you can fix it most
probably by triggering hasLayout for the parent, e.g. the positioning
context container.
You can also use something more tricky like:
#parent {
display: table-cell;
vertical-align: middle;
}
#center {
margin: 0 auto;
width: 200px;
}
But *then* you need to hack for IE...
--Klaus