Common webpage layout (div + CSS)

Source: Internet
Author: User
In my spare time, I made a web. The main interface is to use Div + CSS layout, Ajax + JavaScript For Interface Control and Data Acquisition!
Let me talk about the DIV + CSS layout.
The entire page is divided into three parts, which can be called: Header (site logo + banner), subject (left menu + right content), footer (display copyright and filing information ). I use position: relative; To set relative positioning for the three major parts. The advantage is that when the content of one part is too large, the other part will adjust the position accordingly.
Each block uses float for Left or Right layout. in the body, the left side is

# Divleft
{}{
Width: 228px;
Height: 400px;
Left: 26px;
Float: left;
Padding: 0;
Margin: 0;
Filter: revealtrans (duration = 2, transition = 3) progid: DXImageTransform. Microsoft. gradient (startcolorstr = # adde21, endcolorstr = # d8e7c2, gradienttype = 0 );

}

The right side is

# Divright
{}{ Float: left;
Left: 286px;
Width: 744px;
Height: 400px;
Padding: 0;
Filter: progid: DXImageTransform. Microsoft. gradient (startcolorstr = # f5efda, endcolorstr = # f7f7f7, gradienttype = 0 );

}

Note that float: Left; is used in both la s, so that when divleft is hidden on the left, divright on the right is automatically moved to the left, if # divright uses float: Right; Right: 0;, this effect cannot be achieved!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.