Html Firefox将桌面踢向右侧
希望我能解释清楚。我有一个显示一些图像的表格。该表是用PHP动态生成的。在每个浏览器中,表格都正确地呈现在页面的中心。在firefox中,表格被推到右边,几乎完全脱离页面,滚动条显示在页面底部,但在元素后面 这是表格的CSS,不知道这是否有帮助Html Firefox将桌面踢向右侧,html,css,firefox,Html,Css,Firefox,希望我能解释清楚。我有一个显示一些图像的表格。该表是用PHP动态生成的。在每个浏览器中,表格都正确地呈现在页面的中心。在firefox中,表格被推到右边,几乎完全脱离页面,滚动条显示在页面底部,但在元素后面 这是表格的CSS,不知道这是否有帮助 /* Portfolio Table Styles */ table { position: relative; width: 900px; margin-left: auto; margin-right: auto;
/* Portfolio Table Styles */
table {
position: relative;
width: 900px;
margin-left: auto;
margin-right: auto;
}
table td {
height: 150px;
width: 150px;
border-spacing: 30px;
padding: 10px;
}
table div {
height: 150px;
width: 150px;
overflow: hidden;
}
table img {
position: relative;
top: -20px;
left: -50px;
height: 300px;
}
希望这能把事情弄清楚。这就是firefox 7.0.1中的外观。
此外,如果您注释掉css底部的overflow-x,它会在那里修复它。但在firefox中,这没有什么区别
#portContent {
position: relative;
top: 20px;
left: 0;
display: block;
overflow-x: hidden
clear: both; /*add this line*/
请设置一个JSFIDLE。在FF5中,我觉得它很好(居中,而不是在屏幕外)。我觉得它也很好。你能发布你的HTML吗?这个答案对我来说是一个相关的问题,如果你还活着,你介意告诉我你是否知道在Firefox而不是Chrome上发生这种情况的原因吗?对于Chrome,你也需要它(os x)。有很多关于浮动和浮动问题的好文章:我有一个表格,只在Firefox、Chrome、Safari和IE上推送整个标题。谢谢你的链接和答案