Div定位问题 [英] Div positioning problem
本文介绍了Div定位问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个小问题.我在内容div中有2个div,它们都向左浮动.这在高分辨率的笔记本电脑上确实能很好地工作,但是当我以较低的分辨率进行测试时,右侧的div会出现在下面.
I have a slight issue. I have 2 divs within a content div, and they are both floated left. This works really well on my laptop with its high resolution, but when I test with lower resolutions the div on the right drops below. Is there a way to just make a scroll bar appear and not let the second div drop?
推荐答案
我自己找到了解决方案.只需在内容div中添加宽度和高度,然后添加溢出:自动.
Found the solution myself. Just add a width and height to the content div, and then add overflow: auto.
这篇关于Div定位问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文