I've currently got the #border div at 100% of the page height, but am trying to get the #container div to stretch to 100% inside #border. At the moment #container only stretches to fit the content inside it.
* {
margin: 0;
}
html, body {
height:100%;
font-family: Georgia, Times, "Times New Roman", serif;
font-size:13px;
line-height:19px;
color:#333333;
background: #f5f1ec;
text-align: left;
}
#border {
background: #f5f1ec;
border:solid 1px #FFFFFF;
width: 880px;
margin: 40px auto 0;
padding:10px;
height: auto !important;
min-height: 100%;
height: 100%;
}
#container {
background: #FFFFFF;
padding: 10px 50px 0;
height: 100%;
}
Syntax: To set a div element height to 100% of the browser window, it can simply use the following property of CSS: height:100vh; Example: HTML.
To set the height of the div element to 100% use height:100% the div element. It will set the height of the div element to 100% relative to the containing block.
Solved:
#container {
background: #FFFFFF;
padding: 10px 50px 0;
height: 100%;
width:780px;
position:absolute;
}
Try #container{min-height:inherit;position:absolute;}
and add overflow:hidden;
to #border.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With