K-Olsen Posted October 8, 2006 Share Posted October 8, 2006 Hi!I got a problem with my container div in firefox:[color=red]#container { height: 100%; width: 800px; margin: 0 auto; padding: 0; text-align: left; background: url(container_bg.gif) center repeat-y;}[/color] it works fine in IE but in firefox the content floats outside the container when the content gets too big. please help! Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted October 8, 2006 Share Posted October 8, 2006 Could you provide a link/screenshot so I can see what you mean. A Link will be prefered then I can see your html/css Quote Link to comment Share on other sites More sharing options...
K-Olsen Posted October 8, 2006 Author Share Posted October 8, 2006 [url=http://kimingemann5.wi5.ots.dk/blog/]http://kimingemann5.wi5.ots.dk/blog/[/url] Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted October 8, 2006 Share Posted October 8, 2006 The problem is to do with the the main div (#main). As it has a float its no longer part of the same scope as the container div (#container).WHat you'll want to do is clear the float from #main, by adding the following:[code]<div style="clear:both;"></div>[/code][b]After[/b] (not before) the closing div tag for the main div (#main). Quote Link to comment Share on other sites More sharing options...
K-Olsen Posted October 8, 2006 Author Share Posted October 8, 2006 <div id="main"></div><div style="clear:both;"></div>sry it does not work. Quote Link to comment Share on other sites More sharing options...
K-Olsen Posted October 8, 2006 Author Share Posted October 8, 2006 any other suggestions?thought it had something to do with height : 100%.. Quote Link to comment Share on other sites More sharing options...
K-Olsen Posted October 8, 2006 Author Share Posted October 8, 2006 problem solved:html, body { height:auto !important; /* FF and compliant browsers should automatically size the body/html */ height:100%; /* ie will set the body/html to 100%, anything overflowing that will (incorrectly) resize it. go IE */ min-height:100%; /* when FF/etc automatically size the body/html it should be AT LEAST the height of the entire browser window, but can expand based on content. */} Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted October 8, 2006 Share Posted October 8, 2006 Yes its to with hieght: 100% in the #container clause. Either remove it or use min-height: 100; instead. Quote Link to comment Share on other sites More sharing options...
K-Olsen Posted October 8, 2006 Author Share Posted October 8, 2006 I solved some of it. how do I keep the height of the container 100% regardless of how much content on the page? 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.