side by side divs

后端 未结 7 2131
忘掉有多难
忘掉有多难 2020-12-19 01:25

I\'ve got 4 divs inside a parent div. To get them to appear side by side, I\'ve given all 4 divs a style with float:left. The divs do appear side by side, but the parent d

7条回答
  •  醉梦人生
    2020-12-19 02:07

    I think you should give the parent div a height of 100% not fixed so that it encompasses the height of child divs if they grow.

提交回复
热议问题