GWT DecoratorPanel style problems

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.

Posts you might also be interested in..

Credits: Hoctro | Jack Book

2 Comments:

Anonymous said...

Thanks for this solution !

Magallo said...

Hi! I'm interesented on your panel. It looks pretty nice In particular I like the title bar at the top. Could you possibly post the uibinder xml (if used) or the code of the whole panel? Thanks.

Post a Comment