100%宽度< td>在webkit浏览器中总是至少有1个像素宽 [英] 100% width <td> in webkit browsers always at least 1 pixel wide

查看:105
本文介绍了100%宽度< td>在webkit浏览器中总是至少有1个像素宽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含面板的GWT应用程序,其中包含未定义数量的各种宽度的小部件以及底部的常用描述和工具栏。该面板始终至少与工具栏一样宽,并且在小部件更宽的情况下进行扩展。

I have a GWT app with a panel which contains contains an undefined amount of widgets with varying widths and a common description and toolbar in the bottom. The panel is always at least as wide as the toolbar and extends in case the widgets are wider.

我试图在工具栏右侧添加尾部边框是更广泛的,但我似乎无法做到正确。在Firefox和浏览器中它工作正常 - 如果有足够的小部件,边框缩小到0px。然而,在Chrome和safari中,带边框的div始终至少有1px宽,这打破了设计的其余部分。

I tried adding a trailing border to the right of the widgets when the toolbar is wider but I can't seem to get it right. In firefox and explorer it works fine - if there's enough widgets, the border shrinks to 0px. In chrome and safari however, the div with the border is always at least 1px wide, which breaks the rest of the design.

任何人都可以告诉我我在做什么错误?我简化了代码此处。红色部分是固定工具栏,黑色部分是小部件(用鼠标悬停模拟变化宽度),问题边框为橙色(ID为border)。我意识到代码可能更好,但这部分是由于GWT对基于表格面板的迷恋。

Can anyone tell me what I'm doing wrong? I simplified the code somewhat here. The red part is the fixed toolbar, the black part are the widgets (varying width simulated with mouse-over), and the problematic border is orange (with ID "border"). I realize the code could be nicer, but it's partly due to GWT's obsession with table based panels.

希望这个问题很有意义。

Hopefully this question makes sense.

谢谢。

Thanks.

推荐答案

你试过了:display:none;我相信webkit默认情况下将显示设置为表格单元。

have you tried: display:none; I believe webkit sets the display to table-cell by default.

这篇关于100%宽度< td>在webkit浏览器中总是至少有1个像素宽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆