If a div has “clear:right”, nothing should float to the right of it, should it?

前端 未结 5 1978
暗喜
暗喜 2021-02-15 11:04

I seem to have gotten confused as to what the css \"clear\" keyword means.

I have a number of div elements, all with \"float:left\". The second last div element also has

5条回答
  •  半阙折子戏
    2021-02-15 11:43

    There isn't anything floating to the right of it. The Problem you're facing is that you already sent all your content prior to the time, and then you're telling the time to float to the left. It's still floating to the left, it's just stacking on top of the content that's already there to the left.

    But yes, clearing to the right makes that element break down past all elements which are floated to the right before it. Clear does not affect elements after it.

    Have you tried using a simple
    after your title?

提交回复
热议问题