I am trying to create a page with a title with a navigation menu and a content area that fills the rest of the page, the content is at 100% minimum height, but even when it is empty, a vertical scroll bar is displayed because of the size of the title.
Relevant part of HTML:
<body> <div id="header">Davi Andrade</div> <nav> <ul> <li><a href="/">About</a></li> <li><a href="/">Portfolio</a></li> <li><a href="/">Downloads</a></li> <li><a href="index.html">Home</a></li> </ul> </nav> <div id="content"> Text </div> </body>
And CSS:
html, body { background: #333333; font-family: "Segoe UI", "Lucida Grande", sans-serif; height: 100%; margin: 0; padding: 0; } #header { color: #b6b6b6; float: left; font-family: Megrim; font-size: 36px; margin: 18px 52px 18px 52px; text-shadow: 0 0 3px rgba(0, 18, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.5); text-transform: uppercase; } nav li a { color: white; display: block; float: right; font-size: 1.3em; list-style: none; padding: 24px 48px 24px 0; text-decoration: none; } #content { clear: both; background: #3e3e3e; box-shadow: 0 -2px 3px rgba(0,0,0,0.35), 0 -1px 0 rgba(255,255,255,0.3); min-height: 100%; }
Is there any way to fix this?
source share