Header, Body Left, Body Right and Footer Html CSS Example

Header, Body Left, Body Right and Footer Html CSS Example:

Html Code:
[html]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Learn</title>
</head>
<body>
<div id="container">
<div class="header">Header</div>
<div class="mainbody">
<div class="left_div"> Body Left</div>
<div class="right_div"> Body Right</div>
</div>
<div class="footer">Footer</div>
</div>
</body>
</html>
[/html]

CSS Code:
[css]
<style type="text/css">
.container {
width: 500px;
max-height: 500px;
margin: 10px;
border: 1px solid #fff;
background-color: #ffffff;
box-shadow: 0px 2px 7px #292929;
-moz-box-shadow: 0px 2px 7px #292929;
-webkit-box-shadow: 0px 2px 7px #292929;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
}
.mainbody,
.header,
.footer {
padding: 5px;
}
.mainbody {
margin-top: 0;
min-height: 150px;
max-height: 540px;
overflow: auto;
height:499px;
text-align:center;
}
.header {
height: 40px;
border-bottom: 1px solid #EEE;
background-color: #ffffff;
height: 40px;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
width:100%;
}
.footer {
height: 40px;
background-color: whiteSmoke;
border-top: 1px solid #DDD;
-webkit-border-bottom-left-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
-moz-border-radius-bottomleft: 5px;
-moz-border-radius-bottomright: 5px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
width:100%;
}
.left_div{
border:1px solid #000;
display:inline-block;
float: left;
height: 99%;
width: 49.5%;
}
.right_div{
border:1px solid #000;
display:inline-block;
float: right;
height: 99%;
width: 49.5%;
}

</style>
[/css]

Output:
header, body left, body right and footer

Download Zip:
Learn

Recommended Html/Css/jQuery Books:

Leave a Reply