Aleksandar • Vacić

iOS bits and pieces

Relaxed dead centre layout

This post is more of a reminder for me than anything new, as I need this splash thing from time to time and never can remember where I keep it.

95% of code is from Dušan Janovský. I merely simplified it, thus instead of 3 or 4 nested divs, you need just one div, for the actual content. html and body play the role of table and table-cell respectivelly. Pure semantics. :)

For IE6 and IE7, I opted for the expression property, masked under conditional comments. No other solution I encountered is flexible enough.

This solution has 100% of the available height to spread, because there is no fixed height set for the content div.