简体   繁体   English

页面溢出到右侧

[英]Page overflows to right of body

I'm incredibly frustrated by this and it would be a tremendous help if someone out there knows how to quickly figure this out... 我对此感到非常沮丧,如果外面有人知道如何快速解决这个问题,那将是巨大的帮助...

What's happening is, I'm working on a site that seems to be extending out to the right of the body. 发生的是,我正在一个似乎延伸到身体右侧的站点上工作。 In other words, overflowing to the right such that the horizontal scrollbar appears. 换句话说,向右溢出使得出现水平滚动条。

You'll see what I mean: http://www.lahappy.com/blog/ 您会明白我的意思: http : //www.lahappy.com/blog/

This is killing me! 这真杀了我! Would really appreciate someone to call out what I may be missing or doing incorrectly. 非常感谢有人指出我可能遗失或做错的事情。

Thanks- 谢谢-

The problem is within #fb-root in the right sidebar. 问题出在右侧栏中的#fb-root内。 If you remove this element, the layout will fit correctly without a horizontal scroll. 如果删除此元素,则布局将正确放置而无需水平滚动。 The child iframe within this element has a width of 575px . 该元素内的子iframe的宽度为575px You can change this value to auto by setting the style for the iframe in your css as: 您可以通过将css中iframe的样式设置为以下方式将此值更改为auto

#fb-root{
    width: auto !important; 
}

This line should be placed at the end of the CSS line to overwrite any styles which may disable the width:auto style. 该行应放置在CSS行的末尾,以覆盖任何可能会禁用width:auto样式的样式。 Ideally, you shouldn't have to use !important but since you need to override a FB defined style, I'd try it out. 理想情况下,您不必使用!important但是由于您需要覆盖FB定义的样式,因此我尝试了一下。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM