How to Add different background color to table body

Hi

i have 3 tables. i want to change the background color of every table differently such that Table A should b blue , b should b green and C should b Red

So for i know .v-table-body CSS class generically change the color of table body. but how to use it specifically for every table so that every table should have different color

Hi Muhammad,

Just call table.addStyleName("table1") with unique names for each table and you’ll be able to apply different styling to each easily.

Please do not post multiple copies of the same question.

As Marcus whote, you can do table.addStyleName(“table1”) and then

.table1 .v-table-body { ... }

Once you have the Vaadin side done (addStyleName()), I would recommend reading some CSS tutorials and experimenting with tools like FireBug that let you see and even modify CSS rules on the fly before editing your theme.

Thanks Henri Sara. your Solution Works Well for me. Henri Actually I am new to vaadin and Vaddin is using a different approach for applying css. so i faced difficulty.

Thanks Marcus,

Your solution is worked well