Bold Caption for a Table

Guys,

I am new to Vaadin and writing my first set of screens so please bare with my naive questions. How do I make the caption for a table as bold and alter the size for the same?

Regards,
Vipul

Code is
myProjectsTable = new Table(“My Projects”);
myProjectsTable.setWidth(80, Sizeable.UNITS_PERCENTAGE);
myProjectsTable.setHeight(90, Sizeable.UNITS_PERCENTAGE);
myProjectsTable.addContainerProperty(“Project”, String.class, null);
myProjectsTable.addContainerProperty(“Prod Version”, String.class, null);

You need a add an additional stylename for the table, and use a custom theme and a little CSS to change the caption style:

// Java
myProjectsTable.addStyleName("my-style");


// CSS in custom theme
.v-caption-my-style {
   font-weight: bold;
   font-size: 18px;
   }

How can I do Bold only for the first column?

This is for Valo, haven’t tested if it works for any other theme.

.v-table-header .v-table-header-cell:first-child {
  font-weight: bold;
}