No height using Chris Coyier full width hack

Posted by ftntravis on Stack Overflow See other posts from Stack Overflow or by ftntravis
Published on 2012-07-11T03:12:02Z Indexed on 2012/07/11 3:15 UTC
Read the original article Hit count: 673

Filed under:
|
|
|

I'm using Chris Coyier's full width hack on a site I am building, but stumped on how I can get the div to have the height of whatever it is containing.

Usually I would achieve this by adding overflow:auto to the container, but if I do that it breaks the hack. Is it possible to achieve a height and still use this hack?

You can see my problem here: http://beta.revival.tv/

Here is my CSS:

#content-wrap:before, #content-wrap:after {content: ""; position: absolute; top: 0; bottom: 0; width: 9999px;}

#content-wrap:before {right: 100%;}

#content-wrap:after {left: 100%;}

#content-wrap, #content-wrap:before, #content-wrap:after {background:#666;}

#content-wrap {
position: relative;
width:1000px;
margin:0 auto;
padding:25px 0;
}

© Stack Overflow or respective owner

Related posts about css

Related posts about height