- This topic has 7 replies, 2 voices, and was last updated 4 years, 2 months ago by
Leo.
-
AuthorPosts
-
April 11, 2018 at 7:53 am #547364
Dale
Hi. I’d like to apply some styling CSS only to the content of my blog posts (everything that I enter inside the main editing box, but not the title or sidebars). Is there a selector I can use so I can apply it sitewide?
GeneratePress 2.0.2GP Premium 1.6.2April 11, 2018 at 11:02 am #547648Leo
StaffCustomer SupportHi there,
Not quite sure if I understand.
Can you give me an example of what you are looking to achieve?
The page you linked is a the main blog page so the selector is a bit different than the rest of the pages.
Let me know.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 11, 2018 at 2:06 pm #547779Dale
Oh sorry. I want to add underline to hyperlinks within the body of the post (not sidebars). Currently I use
.inside-article a, a:visited, a:active { text-decoration: none; } .inside-article a:hover { text-decoration: underline; text-decoration-style: dotted; }
which also applies to the title (if it’s hyperlinked), meta, and sidebars. I’d like something that only applies within the post so I can underline hyperlinks within the text——hyperlinks indicated only by certain colors can be difficult to see for people with correlating types of colorblindness, particularly if they appear in the middle of a paragraph. So I want the additional signal of underlining.
Initially I added
.inside-article a, a:visited, a:active { text-decoration: underline; text-decoration-style: solid; }
but all those lines made for a cluttered page.
April 11, 2018 at 4:44 pm #547858Leo
StaffCustomer SupportJust posts and not pages?
Try this:
.single .site-main a, .single .site-main a:visited, .single .site-main a:active { text-decoration: underline; text-decoration-style: solid; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 13, 2018 at 6:56 am #549347Dale
Thanks! That looks pretty good. It still hyperlinks the meta, but I assume there’s nothing to be done about that since meta is inside the post?
April 13, 2018 at 8:58 am #549559Leo
StaffCustomer SupportHmm try this additional one as well:
.single .site-main .entry-meta a, .single .site-main .entry-meta a:visited, .single .site-main .entry-meta a:active { text-decoration: none; }
Let me know.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 13, 2018 at 1:41 pm #549818Dale
Hmmm, that removes the underlines from the body as well. Not sure why. But I can live with the underlines in the meta. It’s not optimal, but it’s not terrible either.
April 13, 2018 at 9:30 pm #550008Leo
StaffCustomer SupportThe additional code shouldn’t remove the underline from the body.
Can you added in so I can see why?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.