When you write a layout, make sure that the header or Landscape menu and the main content center, you can define a style, such as:
<style>
. container{
width:980px;
margin:0 Auto;
}
</style>
The head and Body section styles are placed in a label with this style:
<! DOCTYPE html>
<meta charset= "UTF-8" >
<title></title>
<style>
body{
margin:0 Auto;
Resolving body border issues
}
. header{
height:48px;
background-color:red;
}
. body{
Background-color: #dddddd;
}
. container{
width:980px;
margin:0 Auto;
}
</style>
<body>
<div class= "Header" >
<div class= "container" >
<a> Head Content </a>
</div>
</div>
<div class= "Body" >
<div class= "container" >
<p> Backbone Content </p>
<p> Backbone Content </p>
<p> Backbone Content </p>
<p> Backbone Content </p>
</div>
</div>
<div class= "Footer" ></div>
</body>
Display effect:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/87/25/wKiom1fVYV7QTDdwAAAz5W3UIW4625.png "title=" Center display. png "alt=" Wkiom1fvyv7qtddwaaaz5w3uiw4625.png "/>
This article from "Flat Light is true" blog, please be sure to keep this source http://ucode.blog.51cto.com/10837891/1851768
Layout Tips----Center your head and backbone content