Div伸展然后缠绕其他浮动的div [英] Div stretch then wrap around other floated div

查看:134
本文介绍了Div伸展然后缠绕其他浮动的div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在这里创建了一个JSFiddle,显示我的问题: http://jsfiddle.net/c2Snd/



我想要我的#left div



基本上,我想让我的#left divs包裹在我的#right潜水,就像文字一样。所以在我的JSFiddle,前2个红色框的宽度将是50%,那么底部红色框的宽度将是100%。

解决方案

看起来你只是有它...混淆:
http://jsfiddle.net/ BCBd2 / 1 /


I'm struggling trying to get the behavior that I want with CSS.

I created a JSFiddle here that shows my problem: http://jsfiddle.net/c2Snd/

I want my #left div's width to stretch, but only as far as the #right div.

Basically, I want my #left divs to wrap around my #right dive just like text would. So in my JSFiddle, the top 2 red boxes' width would be 50%, then the bottom red box's width would be 100%.

解决方案

Looks like you just about have it.. confused: http://jsfiddle.net/BCBd2/1/

这篇关于Div伸展然后缠绕其他浮动的div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆