Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] 100% height goes a few pixels off the page?

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #207769
    sokengv
    Participant

    I’m trying to make a box 100% height of the page. But in both Chrome and IE, the following extends a few pixels off the bottom of the page so I have to scroll. Why? Why is there a scrollbar here?

    <!doctype html>
    <html >
    <head>
    <style type="text/css">
    html, body
    {
    margin: 0px;
    padding: 0px;
    height: 100%;
    }
    div {
    border:5px solid black;
    height: 100%;
    }
    </style>
    </head>
    <body >
    <div >This flows a few pixels off the bottom of the page</div>
    </body>
    </html>

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.