williamrouse Posted December 29, 2009 Report Share Posted December 29, 2009 TODO write content TODO write content TODO write content TODO write content TODO write content TODO write content Quote Link to comment Share on other sites More sharing options...
Andrea Posted December 29, 2009 Report Share Posted December 29, 2009 This does center in IE8 - this is a direct copy/paste of your code: http://aandbwebdesign.com/misc/center2.html Quote Link to comment Share on other sites More sharing options...
falkencreative Posted December 29, 2009 Report Share Posted December 29, 2009 I also noticed that "min-height" is not supported in IE8. Is there a work around for that. Min-height is supported in IE8 -- it has worked just fine for me on a variety of projects. Are you sure you don't mean IE6? I know it doesn't work in IE6. In the case of IE6, you can fix it with a star hack (like below) or by providing an IE6 specific stylesheet using conditional comments. For modern browsers: #content { min-height: 500px; } For IE6: * html #content { height: 500px; } Quote Link to comment Share on other sites More sharing options...
williamrouse Posted December 30, 2009 Author Report Share Posted December 30, 2009 Andrea: The link seems to be broken, but I found this example: http://flumpcakes.co.uk/css/center-div-ie The min-height is not working for me on IE8. Here is the version I have: IE 8.0.60001.18702 Quote Link to comment Share on other sites More sharing options...
williamrouse Posted December 30, 2009 Author Report Share Posted December 30, 2009 TODO write content TODO write content TODO write content TODO write content TODO write content TODO write content Quote Link to comment Share on other sites More sharing options...
falkencreative Posted December 30, 2009 Report Share Posted December 30, 2009 Benjamin Falk:Does the below code work for you? Yes, that code works fine on IE8 (8.06). This link http://flumpcakes.co.uk/css/center-div-ie also centers in IE8 just fine. Quote Link to comment Share on other sites More sharing options...
williamrouse Posted December 30, 2009 Author Report Share Posted December 30, 2009 I got the code that worked for me from the web site. I now have the center working but the min-height is not working. The container stops at the last TODO... I don't know how to attach an image to show you what it looks like. Thanks! Quote Link to comment Share on other sites More sharing options...
Andrea Posted December 30, 2009 Report Share Posted December 30, 2009 The link seems to be broken, but I found this example:The link works just fine - just tried it. And your code - which is what I used EXACTLY works, too, and centers your main container. Nothing wrong with the code from the flumpcakes link you posted - but note how it mentions how it functions in IE4? It also worked for IE5 and, unless you want to really still support those, the code you first posted is the way to go. For those old browsers, you had to add the 'text-align: center' to your body tag. That would center EVERYTHING - so you needed to add the 'text-align: left' to your next division, to get everything back to normal. With IE6 and newer (all the way up to IE8.XXXXXXX), that is no longer necessary, and just giving your main division a width and adding the right and left margins of auto does the trick. Re your min-width issue (or any other issue for that matter) it would be best if you could post a link to your site so we can see what you really have out there. Quote Link to comment Share on other sites More sharing options...
williamrouse Posted December 30, 2009 Author Report Share Posted December 30, 2009 TODO write content TODO write content TODO write content TODO write content TODO write content TODO write content Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted December 30, 2009 Report Share Posted December 30, 2009 Anything put above the doctype will put ALL versions of IE in quirks mode, and therefore make them behave more like IE5. Quote Link to comment Share on other sites More sharing options...
Andrea Posted December 30, 2009 Report Share Posted December 30, 2009 Andrea: I'll have to make some demo area on my home page for you to see it...I assume you have a hosting account? Just upload a testing page there - or create a folder for this purpose But now that you've found the cause of the problem, you can just delete it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.