如何使用CSS创建完美的3列布局,并支持跨浏览器? 我有3个div喜欢 div class="clm1"Some content/divdiv class="clm2"Some content/divdiv class="clm3"Some content/div 尝试谷歌搜索,但所有都是制作或css3.在基本的
我有3个div喜欢
<div class="clm1">Some content</div> <div class="clm2">Some content</div> <div class="clm3">Some content</div>
尝试谷歌搜索,但所有都是制作或css3.在基本的CSS中我需要一个完美的3列.请帮忙
更新
从某种意义上讲,完美无需大量编码,但所有浏览器都支持并且易于修改
<!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" xml:lang="en" lang="en">
<head>
<title>Bubbling!</title>
<style type="text/css">
.three-columns .column {
width:33%;
float:left;
}
</style>
</head>
<body>
<div class="three-columns">
<div id="clm1" class="column">Some content</div>
<div id="clm2" class="column">Some content <br />Some content <br />Some content <br />Some content <br /></div>
<div id="clm3" class="column">Some content <br />Some content <br />Some content <br />Some content <br />Some content</div>
</div>
</body>
</html>
在示例中,我冒昧地将类属性更改为id属性,因为它们不适合类属性.
