I'm struggling with the CSS on a page I'm working on. I have a header and main content each enclosed in div tags, with the header set to a height of 250px and the main content set to a height of 100%. I've also set the html and body heights to 100% to address issues with container size on the page.
The problem now is that the page exceeds the browser size, displaying scroll bars which I don't want to remove since the page content may surpass the browser size.
HTML CODE:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test Page Height 100% Issue</title>
<link href='../style/test.css' rel='stylesheet' type='text/css' />
</head>
<body>
<div class='head'>Header</div>
<div class='content'>Main Content</div>
</body>
</html>
CSS:
html { height:100%;0 } body { height:100%; } div.head { width:100%; height:250px; } div.content { width:100%; height:100%; }
Is there a way to keep everything on one page at maximum size without scroll bars, while maintaining a height of 100%?