Following code overflows my browser window

Posted by oneat on Stack Overflow See other posts from Stack Overflow or by oneat
Published on 2011-02-14T15:22:17Z Indexed on 2011/02/14 15:25 UTC
Read the original article Hit count: 330

Filed under:
|
|

Why following HTML (CSS) code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>

    <body>
<style type="text/css">
    *{margin:0px 0px 0px 0px; padding:0px 0px 0px 0px;}
        div#header{width:100%;height:10%;min-width:100px;height:30%;background-color:red;}
        div#left_bar{width:20%;height:85%;float:left;background-color:green;}
        div#content{width:80%;height:85%;float:left;background-color:yellow;}
        div#foot{width:100%;height:5%;clear:both;background-color:black;}
</style>

    <div id="header">a</div>
    <div id="left_bar">s</div>
    <div id="content">d</div>
    <div id="foot">f</div>
    </body>
</html>

Fails to fill my browser's (firefox 3.6.13 linux) window?
I mean that I have to scroll down to see bottom. Any ideas?

© Stack Overflow or respective owner

Related posts about html

Related posts about css