Hi,
thanks for your question, and sorry for the trouble.
There’s just a small error in the first line of your “Custom CSS” code. Please change
.tablepress-id-.tablepress tbody td {
to
.tablepress tbody td {
and the font color will turn black.
Changing the font size for the header row is possible with this CSS code:
.tablepress thead th {
font-size: 12px;
}
Regards,
Tobias
Hi Tobias,
Thanks so much!
One last question, to change the table name font size etc. what is the CSS code?
I tried this…
.tablepress tablepress-table-name h2 {
font-family: Georgia;
font-size: 14px;
}
Thanks,
Andrew
Hi Andrew,
for the table name, you can use this:
.tablepress-table-name h2 {
font-family: Georgia;
font-size: 14px;
}
As that’s not in the table, you can not prepend .tablepress
to the code.
Regards,
Tobias
Hi Tobias,
That didn’t seem to work.
I tried that and these other ones
.tablepress table-name h2 {
font-family: Georgia;
font-size: 12px;
}
.tablepress tablename h2 {
font-family: Georgia;
font-size: 12px;
}
.tablepress tname h2 {
font-family: Georgia;
font-size: 12px;
}
All don’t seem to impact the table name on my
site: http://heartcirclemountain.com/rates/
Would it be something that I add in the Extra CSS Classes under Table Options?
Or do i have the code wrong.
Appreciate the help, i’m a newbie at CSS.
~Andrew
Hi Andrew,
ah, my bad. There’s indeed another small problem in the CSS code. The table name is an h2 element already, and not the h2 is a child of the table name.
So, this is the correct code:
.tablepress-table-name {
font-family: Georgia;
font-size: 12px;
}
(And no, it must not go into “Extra CSS classes”, but into the “Custom CSS” textfield on the “Plugin Options” screen.)
Regards,
Tobias
Hi Tobias,
I’d just like to change the font colour of the header rows. I’ve had a few attempts at CSS following the FAQ examples, however I’ve reached a dead end. Could you create an example for me please.
Thanks so much.
Pat
Hi Pat,
thanks for your post, and sorry for the trouble.
To change the font color of the table head row cells, you can use this “Custom CSS” code:
.tablepress thead th {
color: #ff0000;
}
If that does not work, please post a link to the page with the table, so that I can check whether the theme maybe interferes. Thanks!
Regards,
Tobias
Hi Tobias,
Thank you so much… Worked like a charm!
Kind Regards,
Pat
Hi,
no problem, you are very welcome! π Good to hear that this helped!
Best wishes,
Tobias
P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!
Hi Tobias,
Thanks again I will follow the link for rating. Just one more question using CSS. How do you change text alignment? I’ve tried using the following but I know there are a few elements missing.
.tablepress {
text-align: centre;
}
Hi,
the alignment needs to be applied to the table cells directly, and you’ll need to use American English “center”:
.tablepress th,
.tablepress td {
text-align: center;
}
Regards,
Tobias
Hi,
sure, always glad when I can help! π
And thanks for the rating, I really appreciate it!
Best wishes,
Tobias
Anonymous User 13587685
(@anonymized-13587685)
can anyone tell me how to change default font color to black using custom css ? My site is all new tricks
Hi,
thanks for your post, and sorry for the trouble.
From what I can see, you are not using the TablePress plugin, but have posted in the TablePress support forums. If this is more of a general theme support question, please open a new thread at http://wordpress.org/support/forum/themes-and-templates
If this is indeed a TablePress question, please post a link to the page with a table where you want to change this. Thanks!
Regards,
Tobias