Home > Web Front-end > HTML Tutorial > How to write CSS DIV with one row and three columns (equal width and height, with spacing)? (Suitable for all browsers)_html/css_WEB-ITnose

How to write CSS DIV with one row and three columns (equal width and height, with spacing)? (Suitable for all browsers)_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:32:31
Original
1357 people have browsed it

How to write CSS DIV with one row and three columns (equal width and height, with spacing)? (Suitable for all browsers)
For example: this width is 980px and the three columns are 320px. The rest is the spacing between them. .
Suitable for all browsers!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title><style type="text/css">#wrapper { width: 980px; margin: 0 auto; }#header {width: 100%; background: #cfc;}#container { width: 100%; }#container #left,#container #content, #container #right { width: 320px; float: left }#left { background: #fc0;}#content { margin: 0 10px;background: #0c0;}#right { background: #0cf;}</style></head><body><div id="wrapper"> <div id="header">header</div> <div id="container">  <div id="left">left</div>  <div id="content">content</div>  <div id="right">right</div> </div></div></body></html>
Copy after login

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