CSS 遇到奇怪的问题
这是 CSS
#content {
margin-left:190px;
margin-right: 10px;
overflow: auto;
}
Firefox & Opera 结果
Chrome 结果
尝试手动将 #content
的宽度参数设置为 90%。它“解决”了问题。
谁能解释为什么会出现这个问题以及如何解决它?
注意:左侧栏的 CSS 如下
#left {
float:left;
width:180px;
}
Here is CSS
#content {
margin-left:190px;
margin-right: 10px;
overflow: auto;
}
Firefox & Opera result
Chrome Result
Tried to manually set #content
's width param to 90%. It 'fixed' issue.
Can anyone explain why this problem occurs and how can I fix it?
Note: Css for left side bar is following
#left {
float:left;
width:180px;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们对您的代码结构一无所知,请制作一个[fiddle] http://jsfiddle.net具有最少的测试用例。
检查您的表格是否继承了任何浮动或宽度。
We don't have any idea about the code structure you have, Please make a [fiddle] http://jsfiddle.net with minimum test case.
Check if your table inherit any float or width.
如果没有看到代码,很难说,但如果这些是您正在使用的表,那么您可能会找到答案(以及创建一个最小的测试用例)的地方就是研究不同的浏览器如何以不同的方式处理表/表 css。从历史上看,样式表在浏览器之间总是有点不一致。
Hard to say without seeing code, but if those are tables you are using, one place you might possibly find answers (along with creating a minimal test case) would be looking into how different browsers handle tables/table css differently. Historically, styling tables has always been a little bit inconsistent between browsers.