Focus

This is the blog for my web design, development and marketing company, Red Kite Creative. Mostly what I'll be writing about is work-related but anything is fair game. Read more about me here...


View Debbie Campbell's profile on LinkedIn

What I'm Reading



View my bookstore













Vertical centering in CSS

April 30th, 2007 by debbie campbell

Centering a block of text (or anything else) vertically within a div has been a longstanding problem where tables seem to have the advantage.

I recently came across this article about vertical centering and tried using the bottommost code snippet today with good results in FF, IE6, Opera and Netscape. It’s a bit clumsy, but it does the trick there - however this doesn’t work in IE7.

I wound up using the topmost snippet - with hacks, which I don’t like using, but I was pressed for time this morning… I’m going to revisit this when I have an opportunity to see if I can figure out what to do about IE7 and the non-hacked example.

Posted in CSS, Web Design |

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment a bit. Please stay on topic. If you submit spam or irrelevant comments, it will be deleted and your IP will be banned.