Firefox 5渲染与以前的版本有很大不同

时间:2011-06-29 16:28:23

标签: css firefox firefox-5

Firefox 5非常奇怪地呈现我的网站。我使用Blueprint CSS框架。在Firefox 5之前就可以了。

例如,

enter image description here

捕获的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">&nbsp;</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">&nbsp;</span></a>
</td>
</tr>
<tr class="even">
<td></td>
<td colspan="2">
<p>acts_as_list :scope =&gt; :parent (_id is optional. Use symbol instead of string)</p>
<p>acts_as_list :scope =&gt; 'board_name = \'#{board_name}\''</p>
<p>If scope column is not 'xxx_id', use the form above.</p>
<p>use single quote.</p>
<p>&nbsp;</p>
<p>http://macdiggs.com/2007/08/27/customizing-scope-in-acts_as_list/</p>
</td>
</tr>
</tbody></table>
<hr>
</div>

或者有时,tr中的细胞被包裹在多行中。

enter image description here

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;
}

我在http://jsfiddle.net/cgTaB/

创建了一个jsFiddle示例

发生了什么事?

萨姆

2 个答案:

答案 0 :(得分:1)

我一直在弄乱你的代码,我想我发现了问题。您正在使用:

display:inline

float:left
标头中的

。删除这些属性并向width课程添加span-2

如果这有帮助,请告诉我们。)

答案 1 :(得分:0)

问题在于您将display: inline的样式应用于th元素。虽然没有明确定义为块元素th elements are considered block elements,因为它们可以包含块级元素。

虽然这对设计师而言可能只是一个无辜的错误,但我更倾向于认为这是因为blueprint.css是一个糟糕的样式表;)

如果您将display: table-cell元素应用于blueprint.css 之后的th元素,就像this update to your jsfiddle一样,它应该显示正常。

尽可能快地转储蓝图的另一个原因。