Reputation: 20571
How add some style only to GWT container, not to all widget that container contains? For example I need to style CaptionPanel's caption (make it bigger and change color). But when I add style to entire CaptionPanel then all widgets inside inherits added style too.
Upvotes: 0
Views: 450
Reputation: 64541
CSS 101: restrict your style to the legend
element that's a child of the CaptionPanel
. E.g.
myCaptionPanel.addStyleName("foo");
.foo > legend { color: red; }
/* use ".foo legend" above, without the ">" if you need to support IE6 */
Upvotes: 1