Jump to content

Container not as tall as its content


The Little Guy

Recommended Posts

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]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.