开发者

Why does wrapping div not expand around floating elements?

开发者 https://www.devze.com 2023-01-22 06:42 出处:网络
I have 开发者_如何学JAVAtwo columns in a center column. (They are all div tags.) When I set the inner divs to float:left, the outer div does not wrap around the inner divs.

I have 开发者_如何学JAVAtwo columns in a center column. (They are all div tags.) When I set the inner divs to float:left, the outer div does not wrap around the inner divs.

Why, and how do I fix that?


set overflow: auto on the outer div.

Why does setting overflow alter layout of child elements?


set overflow:visible for that div, or remove overflow property.

0

精彩评论

暂无评论...
验证码 换一张
取 消