Mar 4, 2008

Css Layout Example



Html code:

<body>
<form id="form1" runat="server">

<div id="mainHeader">
</div>

<div id="mainContent">
</div>
</form>
</body>

Style sheet:

#mainHeader
{
background-color: #404040;
border-top: 4px solid #EB4C07;
position: relative;
margin: 0px auto;
height: 65px;
width: 100%;
min-width: 950px;
}

#mainContent
{
position: relative;
margin: 0 auto;
max-width: 950px;
min-width: 950px;
background-color: #FFFFFF;
border: solid 1px #99CCFF;
height: 900px;
}

body
{
background-color: #E8EEFA;
margin: 0px;
}

0 comments: