Seriously, I think it's the missing height: 100% that changed the deal...
(If it's not working, trying putting it on the 'html' tag instead, or in addition to 'body', but it shouldn't fail.)
Posted: April 3rd, 2012, 09:38 AM
Hmm, got it to align by setting a height: 1000px on the body and a width: 100% on it as well (and text-align: center)...
Problem is, I couldn't get to make it work by setting height: 100%, it needed a pixel value... Which is bad for compatibility.
Posted: April 3rd, 2012, 09:42 AM
Crap, I can't get it to work.
Okay, then let's just go back to the old faux column style... A negative margin.
I don't remember the exact technique so I'll just google it :P
Posted: April 3rd, 2012, 09:45 AM
Scratch that, it works perfectly. It's just that you REALLY need to add a wrapper div...
body, html, #wrapper { width: 100%; height: 100% }
#wrapper { display: table }
#main { display: table-cell; vertical-align: middle }
That's all you need really. The rest is about fixing the margins on your #main element. CSS just won't let me apply a display rule to the body, which is why it failed in the first place. Tested on your site, works fine...
Does this work for you?
http://pmob.co.uk/pob/hoz-vert-center2.htm
Uses the exact same technique (display:table)...
Posted: April 3rd, 2012, 02:55 PM
Hey. Was looking at your code, and... Where's the table-cell definition on #page? Where's the vertical-align?