Archived topic
Bold text but only in articles
5 replies · Started by Swadhin on December 1, 2021
Hi there,
I tried making links on my articles (both pages and posts) appear bold. I used the following code:
#content a, a:not(.button) {
font-weight: bold !important;
}
But it made all links bold like meta data link, link in the post navigation etc.
I tried using this code too:
p a:link, p a:hover, p a:active, p a:visited, a:not(.button) {
font-weight: bold !important;
}
But it too had the same effect.
I want something that only makes the text links inside the article bold. No other links (buttons, post meta, navigation, etc).
Thank you,
-Swadhin
Hi there,
Try this:
body.single .entry-content a:not(.button) {
font-weight: bold !important;
}
Let us know how it goes. :)
Hi Elvin,
I just found this code somewhere and am currently using it.
p a:not(.button) {
font-weight: bold !important;
}
Which do you recommend? This code or yours? I'll go change to the one you provided if it is better.
Thank you,
-Swadhin
Hi there,
your CSS is fine.
Thank you David. :)
You're welcome