Archived topic
Read Theme - Table hyperlink color
8 replies · Started by Amit on June 7, 2021
Hi David,
I followed your code and I was able to get what I want as stated below.
.single-post .entry-content p a, .single-post .entry-content li a {
color: red;
}
.single-post .entry-content p a:hover, .single-post .entry-content li a:hover {
color: green;
}
However, the WordPress table on the post didn't change the hyperlinked text color. Could you please assist me with the modified code so if there is any table in the post then that should also be of color red or whatever colod I want?
Best Regards
Amit
Hi there,
Can you link us to a page with a sample table content? So we can inspect the class it uses so we can include it on the CSS selector write up.
You can use the private information text field to provide the site detail. Let us know. :D
Yup here you go
Thanks!
I've inspected the site and the table you've constructed doesn't contain any anchor links but rather, a text string of the URL.
See sample inspection here - https://share.getcloudapp.com/04u2gX5z
It's a text rather than an anchor link, that's why the CSS wasn't working.
Do you want these table items to turn into links?
If so, you'll have to manually edit the table to turn the texts into links like this - https://share.getcloudapp.com/12u4DnLE
If you want these to stay as texts but have the same text color styling, you can try this CSS:
.single-post .entry-content table tbody > tr:not(:first-child) > td:last-child {
color: red;
}
.single-post .entry-content table tbody > tr:not(:first-child) > td:last-child:hover {
color: green;
}
This will only imitate the color for default and hover state. It won't be an actual link you can click.
ok maybe I sent the wrong link. try this one, please.
Screenshot has the hyperlink marked in red
For that one, this CSS should work.
.single-post .entry-content a {
color: red;
}
.single-post .entry-content a:hover {
color: green;
}
Thanks a ton. This did the trick :) Appreciate it.
resolving it.
Nice one. Glad you got it sorted. :D