Link to home
Start Free TrialLog in
Avatar of Jeff Geiselman
Jeff GeiselmanFlag for United States of America

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(../images/back.gif);
                    padding: 10px 15px 0 15px;
      overflow:visible;
      height:100%;
}
Avatar of oceanbeach
oceanbeach

Hello baldwin_it,

I am not sure if this will work with your layout, but have you tried 'min-height: 100%'?

I hope this helps!

oceanbeach
Avatar of Jeff Geiselman

ASKER

yeah I set min-height to 100% and then height to auto...no luck
ASKER CERTIFIED SOLUTION
Avatar of oceanbeach
oceanbeach

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial