ryan.od Posted November 22, 2006 Share Posted November 22, 2006 OK, I am using the following technique for centering my page:#container{ width:800px; margin:0px auto;}This has worked fine until I installed and tested it in IE7. Now, when I scale the text down, the page slides off to the left.Anyone have any thoughts on this?The page is www.finwebdesign.comThanks.RyanOD Link to comment https://forums.phpfreaks.com/topic/28043-centering-in-ie7/ Share on other sites More sharing options...
wildteen88 Posted November 22, 2006 Share Posted November 22, 2006 Not sure what you mean there. I have IE7 installed and your site display fine when Window is maximixed (1280 x 1024) and when I reduce the width of the window until I cannot resize the window any smaller (100px or so) , Instead i get a horizontal scroll bar, which is the same behaviour I get with FF too. Link to comment https://forums.phpfreaks.com/topic/28043-centering-in-ie7/#findComment-128702 Share on other sites More sharing options...
exploo Posted November 25, 2006 Share Posted November 25, 2006 I haven't checked your site with IE, but i remember having a similiar problem with a site i made.I had to set body { text-align: center; }to get the container centered in IE.and of course also text-align: left; in the container../Magnus Link to comment https://forums.phpfreaks.com/topic/28043-centering-in-ie7/#findComment-130272 Share on other sites More sharing options...
ToonMariner Posted November 26, 2006 Share Posted November 26, 2006 you sohould not use text-align to centre block level elements.In order to get margin: auto to work in centering a page the parent container must be given some width - either % or fixed width. Link to comment https://forums.phpfreaks.com/topic/28043-centering-in-ie7/#findComment-130726 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.