CSS+DIV一行三列,等宽高,有间距怎么写??
CSS+DIV一行三列(等宽高,有间距)怎么写?(适合所有浏览器)
比如:这个宽为980px 然后三列都320px 剩下的就是他们中间的间距.
适合所有浏览器的写法!
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 > <div >header</div> <div > <div >left</div> <div >content</div> <div >right</div> </div> </div> </body> </html>
- 上一篇 »html元素类型 块级元素、内联元素,又叫行内元素和内联块级元素。
- 下一篇 »CSS 文本