Hi,
thanks for your post, and sorry for the trouble.
Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!
Regards,
Tobias
hello this site is offline at this time because it is not finished yet.
Hi,
ok, then what did you try to center the text?
Usually, some “Custom CSS” like
.tablepress-id-123 tbody td {
text-align: center;
}
is sufficient.
Regards,
Tobias
hello
i tryed this custom css of you, but it doesn’t work
Why you can not select cell alignment when creating the table. this would be better then always change the costum css.
how can i change the background colour of one cell?
Hi,
the reason why such things have to be done with CSS code is that this is much more flexible than any user interface would ever be.
For example, changing the background color is also very easy with CSS code. For an example, see https://tablepress.org/faq/highlight-cells-or-content/
In order to find out why the code for centering is not working for you, I’ll need to take a look at the site. Can you somehow bring it online, at least as a test site?
Regards,
Tobias
this code will be center the body, my first line is headupline and this is not center.
.tablepress-id- how can i take id 1 till 7 in one code
Hi,
to center the header row as well, just extend the code to
.tablepress-id-123 thead th,
.tablepress-id-123 tbody td {
text-align: center;
}
For multiple tables, it would have to look like
.tablepress-id-1 thead th,
.tablepress-id-1 tbody td,
.tablepress-id-2 thead th,
.tablepress-id-2 tbody td,
.tablepress-id-3 thead th,
.tablepress-id-3 tbody td {
text-align: center;
}
and so on.
Alternatively, you could make this the default setting for all TablePress tables with a shorter version:
.tablepress thead th,
.tablepress tbody td {
text-align: center;
}
Regards,
Tobias