bumbala
25 Apr 2010, 09:48 AM
Hi experts,
I am developing a website with a header (with variable height) and a content below. My problem is that I can't make the content div cover the whole page height.
My css is like this:
html, body {
margin: 0px;
padding: 0px;
width: 100%;
height: 100%;
}
#header {
width: 100%;
}
#content {
height: 100%;
width: 100%;
}
And my html code is like this:
<html>
<body>
<div id="header">blah blah blah</div>
<div id="content"></div>
</body>
</html>
The content div does not have anything in it. It is empty.
In this case, the height of the content exceeds the page height and scrollbars appear. How can I exactly fit the content div to page height?
Thank you.
I am developing a website with a header (with variable height) and a content below. My problem is that I can't make the content div cover the whole page height.
My css is like this:
html, body {
margin: 0px;
padding: 0px;
width: 100%;
height: 100%;
}
#header {
width: 100%;
}
#content {
height: 100%;
width: 100%;
}
And my html code is like this:
<html>
<body>
<div id="header">blah blah blah</div>
<div id="content"></div>
</body>
</html>
The content div does not have anything in it. It is empty.
In this case, the height of the content exceeds the page height and scrollbars appear. How can I exactly fit the content div to page height?
Thank you.