Firefox 5 渲染与之前版本有很大不同
Firefox 5 使我的网站呈现非常奇怪。我使用 Blueprint CSS 框架。在 Firefox 5 之前是可以的。
例如,
捕获的 HTML 代码是:
<div class="span-24 last">
<table class="stripe">
<thead>
<tr>
<th class="span-2">Date</th>
<th class="span-15">Subject</th>
<th class="span-2">Actions</th>
</tr>
</thead>
<tbody><tr>
<td>09/28/2009</td>
<td>
<a class="subject" href="/posts/278?locale=en">acts_as_list scope</a>
</td>
<td>
<a title="Edit" class="icon" href="/posts/278/edit?locale=en"><span class="ss_sprite ss_page_white_edit"> </span></a>
<a title="Delete" rel="nofollow" data-method="delete" data-confirm="Are you sure?" class="icon" href="/posts/278?locale=en"><span class="ss_sprite ss_delete"> </span></a>
</td>
</tr>
<tr class="even">
<td></td>
<td colspan="2">
<p>acts_as_list :scope => :parent (_id is optional. Use symbol instead of string)</p>
<p>acts_as_list :scope => 'board_name = \'#{board_name}\''</p>
<p>If scope column is not 'xxx_id', use the form above.</p>
<p>use single quote.</p>
<p> </p>
<p>http://macdiggs.com/2007/08/27/customizing-scope-in-acts_as_list/</p>
</td>
</tr>
</tbody></table>
<hr>
</div>
或者有时,th tr 中的单元格被包裹在多行中。
Here's related css:
.column, .span-1, .span-2, .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9, .span-10, .span-11, .span-12, .span-13, .span-14, .span-15, .span-16, .span-17, .span-18, .span-19, .span-20, .span-21, .span-22, .span-23, .span-24 {
display: inline;
float: left;
margin-right: 10px;
}
* html .column, * html .span-1, * html .span-2, * html .span-3, * html .span-4, * html .span-5, * html .span-6, * html .span-7, * html .span-8, * html .span-9, * html .span-10, * html .span-11, * html .span-12, * html .span-13, * html .span-14, * html .span-15, * html .span-16, * html .span-17, * html .span-18, * html .span-19, * html .span-20, * html .span-21, * html .span-22, * html .span-23, * html .span-24 {
overflow-x: hidden;
}
.span-15 {
width: 590px;
}
这是怎么回事?
山姆
Firefox 5 renders my site very weirdly. I use Blueprint CSS framework. It was ok before Firefox 5.
For example,
The HTML code for the capture is:
<div class="span-24 last">
<table class="stripe">
<thead>
<tr>
<th class="span-2">Date</th>
<th class="span-15">Subject</th>
<th class="span-2">Actions</th>
</tr>
</thead>
<tbody><tr>
<td>09/28/2009</td>
<td>
<a class="subject" href="/posts/278?locale=en">acts_as_list scope</a>
</td>
<td>
<a title="Edit" class="icon" href="/posts/278/edit?locale=en"><span class="ss_sprite ss_page_white_edit"> </span></a>
<a title="Delete" rel="nofollow" data-method="delete" data-confirm="Are you sure?" class="icon" href="/posts/278?locale=en"><span class="ss_sprite ss_delete"> </span></a>
</td>
</tr>
<tr class="even">
<td></td>
<td colspan="2">
<p>acts_as_list :scope => :parent (_id is optional. Use symbol instead of string)</p>
<p>acts_as_list :scope => 'board_name = \'#{board_name}\''</p>
<p>If scope column is not 'xxx_id', use the form above.</p>
<p>use single quote.</p>
<p> </p>
<p>http://macdiggs.com/2007/08/27/customizing-scope-in-acts_as_list/</p>
</td>
</tr>
</tbody></table>
<hr>
</div>
Or sometimes, th cells in a tr are wrapped in multiple lines.
Here's related css:
.column, .span-1, .span-2, .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-9, .span-10, .span-11, .span-12, .span-13, .span-14, .span-15, .span-16, .span-17, .span-18, .span-19, .span-20, .span-21, .span-22, .span-23, .span-24 {
display: inline;
float: left;
margin-right: 10px;
}
* html .column, * html .span-1, * html .span-2, * html .span-3, * html .span-4, * html .span-5, * html .span-6, * html .span-7, * html .span-8, * html .span-9, * html .span-10, * html .span-11, * html .span-12, * html .span-13, * html .span-14, * html .span-15, * html .span-16, * html .span-17, * html .span-18, * html .span-19, * html .span-20, * html .span-21, * html .span-22, * html .span-23, * html .span-24 {
overflow-x: hidden;
}
.span-15 {
width: 590px;
}
I created a jsFiddle example at http://jsfiddle.net/cgTaB/
What's going on?
Sam
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我一直在摆弄你的代码,我想我发现了问题。您正在
使用:和
标题中 。删除这些属性并向您的
span-2
类添加width
。让我知道这是否有帮助:)
I've been fiddling with your code and I think I found the problem. You are using:
and
in your headers. Remove these properties and add a
width
to yourspan-2
class.Let me know if this helped :)
问题是您将
display: inline
样式应用于第th
元素。尽管没有明确定义为块元素,但第一个元素被视为块元素,因为它们可以包含块级元素。虽然这可能只是设计者的一个无心错误,但我更愿意认为这是因为 blueprint.css 是一个糟糕的样式表;)
如果您将
display: table-cell
应用于您的th
元素在blueprint.css之后,如对您的jsfiddle的更新< /a>,应该显示良好。尽快转储蓝图的另一个原因。
The problem is that you're applying a style of
display: inline
to theth
elements. Although not explicitly defined as block elements, th elements are considered block elements because they can contain block-level elements.While this may have been just an innocent mistake on the designer's part, I prefer to think that it's because blueprint.css is a poor stylesheet ;)
If you apply
display: table-cell
to yourth
elements after blueprint.css, as in this update to your jsfiddle, it should display fine.Another reason to dump blueprint as fast as you can.