流体布局中不需要的水平滚动条
http://www.two Five Five Five.com/asctest/
我正在帮助一位朋友处理此网站,它是一个流畅的、基于%的设计(我没有使用它的经验)。
由于某种原因,我得到一个水平滚动条,它滚动到右侧的空白区域。我完全不知道是什么导致页面比应有的更宽,我已经三次检查了代码,一切似乎都按顺序进行;我越来越绝望了!
任何帮助将不胜感激。
http://www.twofivefivefive.com/asctest/
I am helping a friend with this site, and it is a fluid, % based design (which I have no experience working with).
For some reason, I am getting a horizontal scroll bar, that scrolls into blank space on the right side. I haven't the faintest clue what is causing the page to be wider than it should be, I've triple checked the code and everything seems to be in order; I am getting desperate!
Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
全部都在
内。
和
均将 CSS“position”属性设置为“relative”然后是“left”属性,为其提供相对于页面左侧的偏移量。但是,该元素保持相同的宽度 (100%) 并被推到右侧。
如果你设置“margin-left”而不是“left”,元素将有左边距,但不会向右推,因为“left”仍然位于容器的左边缘(所以 div#topTitle 应该有
margin-left: 270px;
设置并且没有设置“left”属性,div#topNav 应该设置margin-left: 281px;
(261px 从“left”属性和额外的 20px 已设置为 margin-left),没有“left”属性。It's all inside the
<div id="header">
. The<div id="topTitle">
and the<div id="topNav">
both have the CSS "position" property set to "relative" and then the "left" property to give it an offset from the left side of the page. However, the element maintains its same width (100%) and is pushed off to the right side.If you set "margin-left" instead of "left", the elements will have a left margin but will not push off towards the right because the "left" is still at the left edge of the container (so div#topTitle should have
margin-left: 270px;
set and not have the "left" property set and div#topNav should havemargin-left: 281px;
set (261px "migrated" from the "left" property and an extra 20px that was already set as margin-left) with no "left" property.