WPDFD Issue #58 - January 01, 2003
The trouble with books about Internet technologies is that they go out of date so quickly. The first book about Cascading Style Sheets that I bought was 'Cascading Style Sheets - Designing for the Web' by Håkon Wium Lie and Bert Bos. I don't think the information in it is outdated, it is still a very good CSS primer and general reference, but there are some excellent new books that cover the subject in ways a little more relevant to the latest browsers.
Vertical Centering with CSS Although it is easy to centre elements horizontally in a CSS box, there is no direct equivalent of the 'valign' used for vertical alignment inside table cells – but there is a way to spoof it. When you think of absolute positioning, you probably think in terms of absolute pixels, but absolute positioning also works with percentages. For instance, if I have a box that is 250px wide by 70px high, I could position it at absolute 50% from the top and 50% from the left of the page and its top left corner would be at the centre of the browser window.