我有2个div,一个需要固定宽度,另一个需要响应用户设备。目前,当低于一定宽度时,浮动div跳到单独的行上。有没有办法...
1)使它们都达到身体的100%高度
2)保持在同一行上,以便右侧div的宽度可以缩小,而左侧div保持其最小/最大宽度?
此外,正确的div(70%)永远不会填满70%的可用空间。
我意识到我想做的是有点矛盾,但想不出办法。
http://jsfiddle.net/ Establishment / fxQfv /
的HTML
<article>
</article>
<section>
</section>
Run Code Online (Sandbox Code Playgroud)
的CSS
article {
background: blue;
float: left;
height: 100px;
width: 30%;
min-width: 200px;
max-width: 200px;
}
section {
background: red;
float: left;
height: 100px;
width: 70%;
}
Run Code Online (Sandbox Code Playgroud)
??
article { \n background: blue;\n height: 100px;\n width: 30%;\n float:left;\n min-width: 200px;\n max-width: 200px;\n}\n\nsection { \n background: red;\n height: 100px;\n width: auto;\n}\nRun Code Online (Sandbox Code Playgroud)\n\n对于您的身高问题,请查看这篇文章:http://www.alistapart.com/articles/fauxcolumns/ \n\xe2\x80\x8b
\n| 归档时间: |
|
| 查看次数: |
7006 次 |
| 最近记录: |