Up vote 0 down vote favorite share g+ share fb share tw.
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. 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. 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. Html css webkit link|improve this question asked Apr 14 '11 at 9:16Mrki966.
It should only be 0px if the widgets are wider than the toolbar, not if there's any at all. I'm trying to avoid having to calculate it in Java(script) because it'll cause problems when the widgets change width (which is animated to make things worse). – Mrki Apr 14 '11 at 11:14 What happens if it's 0px an dthe widgets are more slim than the toolbar?
– Aaron Digulla Apr 15 '11 at 7:52 In that case the border is from the end of the widgets to the end of the toolbar as it should be. You can check the testing example at livenetlife.com/test.html – Mrki Apr 15 '11 at 11:46 This is really odd. Sorry, I have no solution.
– Aaron Digulla Apr 15 '11 at 14:29.
Have you tried: display:none; I believe webkit sets the display to table-cell by default.
That would again require me to check whether the border is necessary or not and cause either crappy animations or loads of cpu time. It appears to be a bug in WebKit: bugs.webkit.org/show_bug.cgi?id=39381. Thanks anyway.
– Mrki May 3 '11 at 8:42.