Best Way to do Columns in HTML/CSS

后端 未结 7 920
执念已碎
执念已碎 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...).

    ....

    CSS:

    .clearfix { zoom: 1; }
    .clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; }
    .clearfix:after { clear: both; }
    

提交回复
热议问题