Click here to Skip to main content
16,004,806 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello
can anyone help me achieve this layout using html div and css?
It is centerd page layout with masthead and footer
<ahref>http://s12.postimg.org/4641gv00d/layout.jpg[^].
give html and css code separately
Posted

1 solution

XML
html code
<div id="header">
</div>
<div id="wrapper">

</div>
<div id="footer">
</div>


and css file:
body
{
text-align: center;
background-color:#ffd79b;
min-width:760px;

}




#header
{
top:0px;
border:3px solid orange;
margin:0 auto;
width:1000px;
height:300px;
background-color:white;

}


#wrapper
{ width:1000px;


margin:0 auto;


text-align: left;
border:3px solid orange;
height:500px;
position:relative;
background-color:white;


}
#footer
{
margin:0 auto;
width:1000px;
margin-top:auto;
border:3px solid orange;
height:100px;
background-color:white;
}
 
Share this answer
 
v2
Comments
Karn Singh 21-Sep-13 10:13am    
in css file it is margin: 0 auto and not smiley auto

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900