Juri Strumpflohner
Juri Strumpflohner Juri is a full stack developer and tech lead with a special passion for the web and frontend development. He creates online videos for Egghead.io, writes articles on his blog and for tech magazines, speaks at conferences and holds training workshops. Juri is also a recognized Google Developer Expert in Web Technologies

GWT DecoratorPanel style problems

1 min read

I just experienced a nice side effect that happens if you use a DecoratorPanel. In my example it contained a list of items and everything is fine.
Decorator panel with no width indication
So far, everything is shiny. Bad things start when you want your DecoratorPanel to expand on the whole width of your page. So you add a width="100%" and get this
Decorator panel borders totally not working

Of course this is a style problem. Some browsing on the web and by reading through bug reports I came out with the following piece of CSS you have to place in your main GWT application's CSS file:
.gwt-DecoratorPanel {
table-layout: fixed;
}
.gwt-DecoratorPanel .topLeft,
.gwt-DecoratorPanel .topRight {
width: 5px;
}
Refresh your browser and everything should work fine.

Questions? Thoughts? Hit me up on Twitter
comments powered by Disqus