Best Way to do Columns in HTML/CSS

后端 未结 7 869
执念已碎
执念已碎 2020-12-04 23:33

I\'m looking for a way to display 3 columns of content. I\'ve found a way to display wrap-around columns, but I don\'t want that for this page. I\'m looking for a way to say

相关标签:
7条回答
  • 2020-12-05 00:27

    In addition to the 3 floated column structure (which I would suggest as well), you have to insert a clearfix to prevent layoutproblems with elements after the columncontainer (keep the columncontainer in the flow, so to speak...).

    <div id="contentBox" class="clearfix">
    ....
    </div>
    

    CSS:

    .clearfix { zoom: 1; }
    .clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; }
    .clearfix:after { clear: both; }
    
    0 讨论(0)
提交回复
热议问题