Table caption center align

Table x = new Table(“Table Caption”);
The “Table Caption” will be on left side of table, is there a way to make it on center of table.
I tried the following style, the text was changed, but the align won’t
x.setStyleName(“centertable”);

.v-caption-centertable .v-captiontext {
    text-align:center;
    font-weight: bold;        
    float:right;
}

Thank you in advance!

The following should work. Did you tried it?

.v-caption-centertable {text-align: center;}

Yes, I have that in my style already.
It doesn’t work.

The above snippet work for me on Valo theme. See attached screenshot.
Is that the result you want?

28429.png

Yes, that’s what I want.
I found the problem.
Thanks!