The Little Guy Posted March 23, 2010 Share Posted March 23, 2010 I have a div that is a container, and it is centered on the page, then I have have div's inside of it which are floated. When I display it it displays weird... I want that div to be below the white box. The white box is inside the container, and the container is only as high as the y position of the red box. how can I make the container be as tall as its content? Container: #container{ margin:auto; margin-top:40px; min-height:200px; width:800px; position:relative; } Content: .content{ float:left; padding:10px; width:100%; clear:both; background-color:#FFF; -moz-border-radius:20px; -webkit-border-radius:20px; border-radius:20px; -moz-box-shadow: 0 0 10px #000; -webkit-box-shadow: 0 0 10px #000; box-shadow: 0 0 10px #000; } [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
haku Posted March 23, 2010 Share Posted March 23, 2010 Add: overflow:auto; to the container. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted March 23, 2010 Author Share Posted March 23, 2010 that worked, the only problem was that it cut off some of the content, and displayed a horizontal scrollbar 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.