Firefox,不会自动调整容器高度:100%,底部边距丢失! [英] Firefox, will not auto resize container height: 100%, bottom margin is lost!

查看:67
本文介绍了Firefox,不会自动调整容器高度:100%,底部边距丢失!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个容器,里面有4个div。我的容器被拉伸以填满整个窗口。在IE中,如果您调整窗口大小,则所有内容都会正确调整大小,容器周围的所有4个边距都可见。我试图在FF中获得相同的行为,但我似乎无法找到合适的CSS配方。


注意,如果你通过HTML和CSS代码并检查IE中的行为,我试图在FF中实现相同的行为。

I have a container and 4 div?s inside it. My container is stretched to fill the entire window. In IE, if you resize the window all the content resizes correctly, with all 4 margins around the container visible. I?m trying to get the same behavior in FF, yet I can?t seem to find the right CSS recipe.

Note, if you past the HTML and CSS code and examine the behavior in the IE, I?m trying to achieve the same behavior in FF.

展开 | 选择 | Wrap | 行号

推荐答案

我没有看到你正在谈论的调整大小问题。你是什​​么意思4边缘?您的CSS中只列出了3个。


此外,请记住,您已将overflow属性设置为隐藏。所以你添加的任何底部边距都不会显示。



谢谢,死亡
I don''t see the resizing issue you''re talking about. What do you mean 4 margins? You only have 3 listed in your CSS.

Also, please keep in mind that you have the overflow property set to hidden. So any bottom margin you add will not display.


Thanks, Death


在firefox中,左边,上边和右边是显示。但最低利润率并非如此。我尝试在不同区域设置底部边距,如html,正文,容器等。


我设置了溢出:隐藏,因为容器应该自动重新调整大小而不是滚动是必要的。在IE浏览器中看起来效果很好。


基本上,我希望容器div有4个10px的边距。当您重新调整窗口大小时,内容应缩小/扩展,但10px边距应在容器div周围保持不变。


#html {

#height:100%;

#width:100%;

#溢出:隐藏;

#margin-bottom:40px;

#}
In firefox, left, top and right margins are displayed. Yet the bottom margin is not. I tried setting the bottom margin in different area''s like html, body, container, etc.

I have set the overflow: hidden because the container should automatically re-size and no scroll is needed. In IE this looks and works great.

Basically, I want to have a container div have 4 10px margins all around. When you re-size the window the content should shrink/expand but the 10px margin should remain constant around the container div.


# html {
# height:100%;
# width:100%;
# overflow: hidden;
# margin-bottom:40px;
# }


由于溢出属性,底部边距没有显示。将它移动到#container规则,它应该可以工作。

The bottom margin isn''t being displayed because of the overflow property. Move it to your #container rule and it should work.

展开 | 选择 | Wrap | 行号


这篇关于Firefox,不会自动调整容器高度:100%,底部边距丢失!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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