Home > Web Front-end > CSS Tutorial > CSS Web Page Layout Introductory Tutorial 7: Two Columns with Fixed Width Centered_Basic Tutorial

CSS Web Page Layout Introductory Tutorial 7: Two Columns with Fixed Width Centered_Basic Tutorial

WBOY
Release: 2016-05-16 12:07:14
Original
1409 people have browsed it

In one column of fixed width, we use margin:0px auto; this setting allows a div to be displayed in the center, and in two columns, what needs to be controlled is that the left side of the left column is equal to the right side of the right column. Therefore, using margin: 0px auto; does not seem to be able to achieve a smooth effect. At this time, a nested design of divs is needed to complete. You can use a centered div as a container, and rotate the two divs divided into two columns. In the container, to achieve the display of two columns, combined with the above code, the new XHTML code structure is as follows:

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template