Why `float:left` doesn't work with a fixed width?

前端 未结 7 1308
谎友^
谎友^ 2021-01-02 06:39

I have two divs on a webpage and I would like both of them to have a fixed width and would like the first div to be floated to the left of the second div.

This sound

7条回答
  •  Happy的楠姐
    2021-01-02 07:00

    It seems to me that it is the simple rule that blocks, unless floated, always start a new line. w3.org/TR/CSS2/visuren.html#block-formatting section 9.4.1 –

提交回复
热议问题