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

发布于 2024-11-17 18:14:35 字数 2622 浏览 8 评论 0原文

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">&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>

或者有时,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;
}

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

这是怎么回事?

山姆

Firefox 5 renders my site very weirdly. I use Blueprint CSS framework. It was ok before Firefox 5.

For example,

enter image description here

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.

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

I created a jsFiddle example at http://jsfiddle.net/cgTaB/

What's going on?

Sam

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浪荡不羁 2024-11-24 18:14:35

我一直在摆弄你的代码,我想我发现了问题。您正在

display:inline

使用:和

float:left

标题中 。删除这些属性并向您的 span-2 类添加 width

让我知道这是否有帮助:)

I've been fiddling with your code and I think I found the problem. You are using:

display:inline

and

float:left

in your headers. Remove these properties and add a width to your span-2 class.

Let me know if this helped :)

万人眼中万个我 2024-11-24 18:14:35

问题是您将 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 the th 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 your th 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文