Andy17 Posted August 2, 2009 Share Posted August 2, 2009 Hey, I have a container in which I have two small containers (so that I can have content to the left and right without going oldschool with tables). My problem is that the main container does not expand when one of the containers inside of it is higher. Okay, if you didn't understand that, then please look at the example below: http://test.jokeheaven.eu/ I want the container with the black background and the solid red borders to expand when the containers inside of it do. Below is the relevant parts of my code: HTML: <div id="container"> <div id="leftcontent"><center><h1>Welcome to freemail4u!</h1></center> <p>Lorem ipsum dolor sit amet and so on..............................</p> </div> <div id="rightcontent">right content</div> </div> CSS: #container { background-color:#000000; margin-left:auto; margin-right:auto; width:80%; text-align:center; border: 1px solid red; min-height:500px; /* remove after testing */ } #leftcontent { width:47.9%; text-align:left; padding:10px; padding-top:0; float:left; min-height:490px; /* remove after testing */ border-right: 1px dashed red; } #rightcontent { width:47.9%; float:left; text-align:left; padding:10px; padding-top:0; min-height:490px; /* remove after testing */ } Also, a small "bonus question": does anyone know how to make a dashed border look ok in Internet Explorer? In Firefox it is red with black background, but in IE it has white between the red dashes, which looks horrible. Thanks in advance! PS: This website is solely for practicing. Quote Link to comment Share on other sites More sharing options...
haku Posted August 2, 2009 Share Posted August 2, 2009 Main problem - add: overflow:auto; to div.container. Bonus problem - which IE? I don't see any white spots in IE7. Quote Link to comment Share on other sites More sharing options...
Andy17 Posted August 2, 2009 Author Share Posted August 2, 2009 Thanks, that fixed it. It's IE8, but I assume that if it does like this in IE8, then it does it in the previous versions as well. Here is a screenshot of what my dashed border looks like in IE8: http://test.jokeheaven.eu/border.JPG Quote Link to comment Share on other sites More sharing options...
haku Posted August 2, 2009 Share Posted August 2, 2009 IE6, IE7, and IE8 all have drastically different rendering engines, so you should always state which one you are referring to. You can never make assumptions about them! Quote Link to comment Share on other sites More sharing options...
Andy17 Posted August 3, 2009 Author Share Posted August 3, 2009 Okay. Still looking for help on the dashed border. 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.