- This topic has 5 replies, 2 voices, and was last updated 1 year, 1 month ago by
David.
-
AuthorPosts
-
March 9, 2020 at 5:01 pm #1190230
Rob
Hi GP guys!
Loving the theme and currently working on the Mellow version.
I have customised my hyperlinks using the following CSS:
body:not(.blog):not(.search-results):not(.archive) .inside-article a {
text-decoration:none;
border-bottom: 1px solid #7bdcb5;
box-shadow: inset 0 -1.5px 0 #7bdcb5;
transition: background 0.1s cubic-bezier(.33,.66,.66,1);
}
body:not(.blog):not(.search-results):not(.archive).inside-article
a:hover {
text-decoration:none;
border-bottom:none;
box-shadow:none;
}I am not sure if this is good CSS, but it does what I wanted, except I cannot seem to find a way to ensure is does not apply to the date and author (entry-meta?) and also hyperlinks in image captions.
Can you advise on the appropriate CSS that needs to be added to achieve this? The only other CSS I have added that may affect things is this to adjust the caption size:
.wp-block-image figcaption {
text-align: center;
font-size: 14px;
}I realise that this is perhaps more of a coding question than something specific to GP, but if it’s an easy one to solve, I’d be grateful for any pointers!
Many thanks.
March 10, 2020 at 3:56 am #1190577David
StaffCustomer SupportHi there,
you could try this:
.single .entry-content a { text-decoration:none; border-bottom: 1px solid #7bdcb5; box-shadow: inset 0 -1.5px 0 #7bdcb5; transition: background 0.1s cubic-bezier(.33,.66,.66,1); } .single .entry-content a:hover { text-decoration:none; border-bottom:none; box-shadow:none; }
This will target
<a>
tags within the entry-content on single posts onlyDocumentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 10, 2020 at 4:14 am #1190591Rob
Superb, David – thank you. That solves the entry-meta problem.
However, I still have the hyperlinks in the image captions underlined. What do I need to do to exclude them from the customization and keep them with the default theme setting?
Regards,
Rob
March 10, 2020 at 5:48 am #1190673David
StaffCustomer SupportOk so add this to remove them from any captions:
.single .entry-content figcaption a { border: unset; box-shadow: unset; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 10, 2020 at 7:00 am #1190921Rob
Thank you so much, David. Worked a treat!
I really appreciate you taking the time to sort this out for me.
Wish you a great day ahead!
Rob
March 10, 2020 at 8:48 am #1191054David
StaffCustomer SupportYou’re welcome – glad to be of help
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.