hr clear vs div clear. Which is better?

前端 未结 4 897
栀梦
栀梦 2021-01-20 18:18

This is a general question and something that dawned on me and seemed to make sense. I have seen many people use clearing divs

and
4条回答
  •  执念已碎
    2021-01-20 18:55

    I prefer the CSS only approach. Regarding the semantics between div and hr I am not sure I think hr makes any more sense to use than a div. The hr tag is meant to create a "paragraph-level thematic break".

    http://dev.w3.org/html5/markup/hr.html

    CSS only solution:

    http://www.positioniseverything.net/easyclearing.html

    
    
    
    

提交回复
热议问题