这是更多的 HTML,但对我来说效果很好。
HTML
<div id="hold">
<div class="innerHold"><div class="inner col1">
Column won
</div></div>
<div class="innerHold"><div class="inner col2">
Col Two
</div></div>
<div class="innerHold"><div class="inner col3">
Col 3
</div></div>
<div class="clear"></div>
</div>
CSS
#hold{
width: 65%;
margin: 0px auto;
}
.innerHold{
float: left;
width:33.33333%;
/* make sure left/right margins or left/right padding are 0px here
- it'll mess with the width otherwise*/
margin-left:0px;
margin-right:0px;
padding-left:0px;
padding-right:0px;
}
.inner{
/* Here set your columns padding, borders, and margin
- or in the class names as I do below */
margin:0px;
}
.col1, .col2{
margin-right:10px;
}
.clear{
clear:both;
}
http://jsfiddle.net/daCrosby/NR2kX/1/