Firefox 行跨度问题

发布于 2024-12-02 02:34:36 字数 357 浏览 0 评论 0原文

我需要有关 Firefox 中的 rowspan 的一些帮助。 我需要 1 个大单元格和 30 行(每行 7 个单元格)与大单元格相邻的较小单元格。 它的工作原理与我在 Chrome 中想要的完全一样,但是 FF 拉伸所有较小的单元格以使整个表格成为矩形或正方形。

http://stinak.com/?s=1&u=1 (例如 Collections/ S/S 2012)

我想强制 FF 使这些表格看起来与 Chrome 中的相同。这意味着即使行数少于 rowspan 中设置的行数,也将所有行对齐在顶部。

I need some help with rowspan in firefox.
I need 1 big cell and 30 rows (7 cells per row) of smaller cells next to the big one.
It works exactly as I want in Chrome, but FF stretchs all smaller cells to make whole table rectangle or square shaped.

Experiencing this issue at http://stinak.com/?s=1&u=1 (eg. Collections/ S/S 2012)

I would like to force FF to make these tables look same as in Chrome. It means align all rows on top even if there are less rows than is set in rowspan.

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

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

发布评论

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

评论(1

婴鹅 2024-12-09 02:34:36

我不知道规范对此有什么规定,但 Chrome 的行为看起来是错误的。我的其他浏览器(Opera、Firefox 和 Internet Explorer)都不会以这种方式呈现表格。

我认为摆脱表格会更容易:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title></title>
<style type="text/css"><!--
div.gallery{
    width: 750px;
    font-size: 0;
    overflow: hidden;
}
div.gallery div.large{
    float: left;
    width: 400px;
}
div.gallery div.thumbs{
    float: left;
    width: 350px;
}
div.gallery div.thumbs div{
    display: inline-block;
}
--></style>
</head>
<body>


<div class="gallery">
    <div class="large"><img src="http://placehold.it/400x600"></div>

    <div class="thumbs">
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>

            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>

            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>

            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>

            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
        </div>
</div>

</body>
</html>

用表格完成精确的像素布局可能是一场噩梦。

I don't know what specs have to say about this but Chrome's behaviour looks wrong. None of my other browsers (Opera, Firefox and Internet Explorer) render the table that way.

I think it'd be easier to get rid of the table:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title></title>
<style type="text/css"><!--
div.gallery{
    width: 750px;
    font-size: 0;
    overflow: hidden;
}
div.gallery div.large{
    float: left;
    width: 400px;
}
div.gallery div.thumbs{
    float: left;
    width: 350px;
}
div.gallery div.thumbs div{
    display: inline-block;
}
--></style>
</head>
<body>


<div class="gallery">
    <div class="large"><img src="http://placehold.it/400x600"></div>

    <div class="thumbs">
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>

            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>

            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>

            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>

            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
            <div><a href="javascript:;"><img src="http://placehold.it/50x75"></a></div>
        </div>
</div>

</body>
</html>

Accomplishing exact pixel layouts with tables can be a nightmare.

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