Opera 中的额外空间

发布于 2024-09-06 01:11:01 字数 898 浏览 1 评论 0原文

我正在尝试在表格的 td 内放置一个进度条。代码如下:

<td style="width: 150px;">
        <div style="height: 16px; max-height: 16px; overflow: hidden; border: 1px solid #80C622;">
            <div style="height: 16px; width: 10%; background-color: #bbea7d;"></div>
            <div style="margin-top: -16px; text-align: center;">
                1470/14166
            </div>
        </div>
</td>

Chrome、Firefox、Safari 和 (!) IE 可以正确显示它,而 Opera 会扩展该行,因此上面有一些额外的空间。

它应该是这样的:http://ipicture.ru/uploads/100616/16el6B3lB1。 png

这是它在 Opera 中的外观: http://ipicture.ru/uploads/ 100616/fE4Ad63N1l.png

如何解决此问题?

UPD。哦,是的,我使用 Opera 10.53。

I'm trying to put a progress bar inside td of my table. Here's the code:

<td style="width: 150px;">
        <div style="height: 16px; max-height: 16px; overflow: hidden; border: 1px solid #80C622;">
            <div style="height: 16px; width: 10%; background-color: #bbea7d;"></div>
            <div style="margin-top: -16px; text-align: center;">
                1470/14166
            </div>
        </div>
</td>

Chrome, Firefox, Safari and (!) IE displays it correctly, whereas Opera extends the row so there is some extra space above.

Here's how it's supposed to look like: http://ipicture.ru/uploads/100616/16el6B3lB1.png

Here's how it looks in Opera: http://ipicture.ru/uploads/100616/fE4Ad63N1l.png

How do I fix this?

UPD. Oh yeah, I use Opera 10.53.

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

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

发布评论

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

评论(1

彩扇题诗 2024-09-13 01:11:01

尝试将浮动赋予 div 并固定外部 div 的宽度(一旦赋予浮动,这将是必需的)。这只是我的猜测。

Try giving the float to divs and fix width to the outer div (this would be required once you give the float). this is just my guess.

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