...

View Full Version : Need a code for Div



AsinNetworks
11-13-2011, 09:16 PM
Actually I suck with divs never had a good luck today also was doing a project of my friend and stuck in div I need 3 divs :


1st with 100% height left floating 20% width
2nd with 20% height aligned center with 80% width
3rd with 20% height aligned below the 2nd div with 80% height



I will be thankful :)

Mr.
11-13-2011, 11:28 PM
but will you thank the user for their post if you get the answer?

Sammy12
11-13-2011, 11:59 PM
<!DOCTYPE html>
<html>
<head>
<title>Homepage</title>
<meta charset="UTF-8"/>
<style type="text/css">
* { margin: 0; padding: 0; }
body {
font: 100%/1.28 Arial, Helvetica, sans-serif;
color: #444;
}
html, body {
height: 100%;
}
#page {
height: 100%;
}
#main {
min-height: 100%;
}
#left-panel {
float: left;
width: 20%;
height: 100%;
background-color: #AAA;
}
#main {
width: 80%;
height: 100%;
float: left;
background-color: #DDD;
}
#main #c {
height: 20%;
background-color: #CCC;
}
#main #d {
height: 80%;
background-color: #EEE;
}
.clear {
clear: both;
}
</style>
</head>
<body>
<div id="page">
<div id="left-panel">

</div>
<div id="main">
<div id="c">

</div>
<div id="d">

</div>
</div>
<div class="clear"></div>
</div>
</body>
</html>


if you want a more expert level fluid layout, you can download an example free!:
http://css-tricks.com/138-the-perfect-fluid-width-layout/

AsinNetworks
11-14-2011, 04:13 AM
I figured out this last night only but anyways thank you for taking out time and coding this :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum