类似于这里的问题:
我正在尝试
为此,我需要将
这是全尺寸布局的 JS fiddle :
有没有办法让“Fred”框填充宽度,以便它紧靠红色框而不使用精确的像素宽度?
谢谢!
最佳答案
如果图片 div 位于信息 div 之前,您可以将其向左浮动,并根据视口(viewport)宽度将其删除(使用 media queries )。 DEMO .
作为accepted answer to the linked question说:
It doesn't make much sense to float something when you want it to expand to fill the parent
关于html - 右浮动框的宽度到最大宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12189122/