MayoMan
MayoMan

Reputation: 4917

Styling all my buttons using CSS in GWT

My app will have a significant number of buttons which I want styled in a similar way. So I use CSS for this. Problem I see is I will have to have a line of code for each button stating the style name I want to use. To avoid this repetitive code could I instead have my own BaseButton which extends Button and apply the style to it and have all my buttons then extend this or is there a better way to do this?

Upvotes: 0

Views: 44

Answers (2)

Retired_User
Retired_User

Reputation: 1595

input[type="button"] { 
          css code here
}

Upvotes: 1

SwiftMango
SwiftMango

Reputation: 15284

If you are using the built in Button class as your basebutton, you can put this in CSS:

.gwt-Button {
   /*your style here*/
}

Upvotes: 1

Related Questions