How to change the tabbar color in vaadin? -


Want to change the color of the Hello tab when the tab wad is focused on? Anyone can help me .. It is a good idea to use a device like Firebug to inspect the DOM structure of components.

. For example, when the tab sheet in the sample inspects the DOM structure of the example, you will see that the style class in all tabs is v-tabsheet-tabitem. If you select the first tab, then it will find the following style category "v-tabsheet-tabitemcell", "v-tabsheet-tabitemcell-first" and "v-tabsheet-tabitemcell-selected-first". If you select the second tab, then it will find the following style classes: "v-tabsheet-tabitemcell" and "v-tabsheet-tabitemcell-selected". As you will see, the modifying styles are slightly dependent on the tab's position in the tabet.

Regarding changing the color of the tab, let's take a look at the CSS of the selected tab.

  .v-tabsheet-tabitemcell-selected {background-image: url (normal / img / vertical-sprites.png); Background-position: left -1444px; }  

As you can see, the actual CSS is not complicated. The technique used in CSS is not a common practice, it uses a customization. All background images are included in a single PGG image and the background image position is adjusted so that we can get the picture that we want to show in the background. What you need to do, make your own theme and modify that image to meet your needs. For more details on how to create a custom theme, please check Waden's book.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -