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

前端 未结 7 1301
谎友^
谎友^ 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条回答
  •  北海茫月
    2021-01-02 07:03

    in case you want both containers to float besides each other, you can rather use a span instead of a div. That might bring the problem to an end.

提交回复
热议问题