how to clear the last
  • tag within a
    • 后端 未结 2 466
      梦毁少年i
      梦毁少年i 2021-02-03 09:57

      I know this is pretty basic, but it is giving me hangups. I have a basic list:

      2条回答
      •  被撕碎了的回忆
        2021-02-03 10:39

        Given that you've found "[adding] a div after the last

      • ...works" why not try adding another
      • , give it a class-name of, for example clearing and:

        li.clearing {display: block; clear: both; }
        

        If you need this to take up little, or no, room then adding height: 0; background-color: transparent; border: 0 none transparent; should prevent its being visible, while still causing the clearing to occur.

        It would almost certainly be a benefit if you could add your use-case, and explain, as the comment asked: what do you want? (and I say that with trepidation, after watching too much Babylon 5 recently).

      提交回复
      热议问题