CSS DIV single-column web page layout
CSS DIV typesetting is already a very mainstream way of web page layout. Through simple DIV typesetting, you can easily create a variety of web page layouts. This article mainly explains CSS DIV single-column web page layout design, which can be regarded as typesetting through DIV. The most entry way, after all, the basic single-column web page does not need to use floating skills.
CSS DIV single-column web page layout presentation

assumes that we want to design a single-column page, that is, there are no other fields on the left and right, but at least it should be divided into the header at the top, the main part of the body in the middle, and the most The footer and other blocks below, after dividing each block, you can easily add web content in each block. In order to be able to easily express how to discharge such web page layout, the following is divided into CSS style and The two parts of HTML Code can be completed by combining these two parts.
CSS style section
#Header{
width:360px;
height:80px;
text-align:center;
line-height:80px;
font-size:15px;
color:#fffaf3;
font-weight:bold;
background-color:#f9c81e;
}
#body{
width:360px;
height:280px;
text-align:center;
line-height:280px;
font-size:15px;
color:#f9c81e;
font-weight:bold;
background-color:#fffaf3;
}
#Footer{
width:360px;
height:80px;
text-align:center;
line-height:80px;
font-size:15px;
color:#fffaf3;
font-weight:bold;
background-color:#f9c81e;
}
</style>
- width-set DIV width
- height-set DIV height
- text-align -Set the text alignment in the DIV
- line-height -set the line height of the text in the DIV
- font-size -Set the size of the text in the DIV
- color -set the text color in DIV
- font-weight -Set the text weight in the DIV
- background-color -Set the background color of the DIV block
<div id="Body">Body 欄位</div>
<div id="Footer">Footer 欄位</div>
Post a Comment
0 Comments