Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Table Header Alignment dependant of column Alignment

Francois Regnaut
1 decade ago Jan 07, 2010 3:02pm
Jens Jansson
1 decade ago Jan 07, 2010 5:50pm
Francois Regnaut
1 decade ago Jan 08, 2010 8:14am
Adel Manatad
1 decade ago Mar 24, 2011 11:20pm

Add the following CSS rule on your custom theme's styles.css file:

.v-table-caption-container {
text-align:center;
}

.v-table-caption-container-align-center {
text-align:center;
}

...this will finally make your table header alignment "independent" of table.setColumnAlignment() calls.

You could also use ".v-table-caption-container-align-left{...}" or ".v-table-caption-container-align-right{...}" for making the headers caption left or right justified respectively.

ali akbar shahriari garaei
2 years ago Dec 17, 2020 9:42am