## How can I make a CSS Wrapper adjust height automatically?

Tags: css

### Problem :

I've been looking around for a while today and can't find a question that answers my specific problem.

I am designing my website and the content is in the center placed inside a div, which is the wrapper. My problem is that even though the height is set at 100%, if I add to much content, the wrapper does no stretch with the content, so the text ends up being placed outside the wrapper; it is still centered with it.

How can I fix this? The CSS I have is:

#wrapper {
position: absolute;
left: 50%;
width: 800px;
height: 100%;
min-height: 100%;
margin-bottom: 0px;
margin-left: -400px;
background-color: #F7F7F7;
}


### Solution :

Change

#wrapper{height:100%;}


to

#wrapper{height:auto;}


Fiddle here.