Jeff Geiselman
asked on
CSS vertical height adjust based on content, not window
I have a contentcontainer in my CSS Stylesheet that is set to 100% height that I need to work properly. It works and sets up the heigt as 100%, but if the window is shrunk, then the page scrolled down, it only fills 100% of the window, not my content. Any ideas? This is making my content overflow outside of the div, but I want the div to strecth vertically with the content.
Here is the container:
#bodycontainer {
position:relative;
margin: 0 auto; /* This centers the container */
width: 760px;
font: Arial, Helvetica, sans-serif;
cursor:default;
background-image:url(../im ages/back. gif);
padding: 10px 15px 0 15px;
overflow:visible;
height:100%;
}
Here is the container:
#bodycontainer {
position:relative;
margin: 0 auto; /* This centers the container */
width: 760px;
font: Arial, Helvetica, sans-serif;
cursor:default;
background-image:url(../im
padding: 10px 15px 0 15px;
overflow:visible;
height:100%;
}
ASKER
yeah I set min-height to 100% and then height to auto...no luck
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I am not sure if this will work with your layout, but have you tried 'min-height: 100%'?
I hope this helps!
oceanbeach