Page is a not externally linkable
SuzyUK - 5:46 am on May 27, 2007 (gmt 0)
The examples were written with a full Doctype in mind, though most of them (#1, #2, #5) will work without it. Note: Browser Support = IE5 thru 7 both modes as detailed above, FF, Opera all seem OK. I'm asking for Mac tests, I only know about the IE/Mac issue from what I've read which is why I'm asking a test for that You know I actually had the examples written with hacks :o and changed them into a general conditional for clarity, as everyone has their own way - but yes you're right It's likely that either way you do it the conditional will need checked on the arrival of IE8. The way I've written the conditional with hacks should ensure that IE8 sees what IE7 sees and that should be good enough for it as what they're seeing is not a workaround but instead just a different method. The chosen methods *should* still work in 8 so there's not much reason to hide it yet and if by chance 8 starts supporting the table properties then you might want to go hiding it but hopefully we will have the choice ;) [edited by: SuzyUK at 5:51 am (utc) on May 27, 2007]
Can you confirm the browser support for these techniques? I see you mention IE5/Mac, but does this work in IE5/Win, or is support for "standards-compliant browsers plus IE6"? I am assuming that Standards-compliance Mode (with a full doctype) is required for all the techniques.
If in Quirks mode, or IE5.x support is required they will all need the usual body: text align-center workaround to compensate for margin: 0 auto; if you require horizontal centering too.
All that #3 requires to make it work in either mode is 100% height on the middle div - inheritance chain
#4 the line-height one, the simplest one has an IE bug *if* it's images (or another replaced element) that you're centering. It doesn't matter which mode it affects IE6 and below, sorry not to have noticed that before, but that explains why #3 method exists! There is another workaround which involves adding 2 x extra spans (inline elements), so I'll leave it as #3 for images, #4 for text ;) Also, assuming maximum forward-compatibility with regards to the hacks for IE, would it be better to use lte IE 7 rather than specifying all variants of IE (IE8 might even get it right, you never know!) lte IE 7 would be a good way if you want to isolate it completely