- This topic has 17 replies, 3 voices, and was last updated 6 months, 3 weeks ago by
David.
-
AuthorPosts
-
September 5, 2022 at 11:04 pm #2334421
Ivaylo
Hi,
how can I increase the distance between the link text and the underline? Tried some of the already published topics in the forum, but had no luck.
Thanks!September 5, 2022 at 11:10 pm #2334426Fernando Customer Support
Hi Ivaylo,
You may alter the menu item width in Appearance > Customize > Layout > Primary navigation > Menu Item Width.
As for the underline, can you try increasing the Menu Item Height there as well?
September 6, 2022 at 12:25 am #2334483Ivaylo
I suppose I didn’t ask properly.
I need only links in the content to be underlined and the underline below the link text to be a bit farther.
When I put Underline Links in Customize – all my links are underlined and I don’t want that.
September 6, 2022 at 12:39 am #2334501Fernando Customer Support
Can you share the link to the site in question?
Moreover, may we know if you want all links in the content of both pages and posts to be underlined?
September 6, 2022 at 12:46 am #2334510Ivaylo
Only posts, thanks
September 6, 2022 at 12:54 am #2334516Fernando Customer Support
I see.
Let’s tackle that first, and then fix the menu underlines.
Try adding this CSS:
body.single-post a{ text-decoration: underline !important; }
Let us know how the links in posts go.
September 6, 2022 at 1:05 am #2334534Ivaylo
This made links in the content underline, but also in the menu.
September 6, 2022 at 1:10 am #2334545Fernando Customer Support
I see. Try this instead:
body.single-post .content-area a { text-decoration: underline !important; }
September 6, 2022 at 1:26 am #2334554Ivaylo
Looks good now. No underline in menu links only in content.
Now how to increase the distance between the link and the underline?
September 6, 2022 at 1:36 am #2334563Fernando Customer Support
Can you try this instead?:
body.single-post .content-area a { position:relative; padding-bottom: 3px; } body.single-post .content-area a:after { content:""; position:absolute; top: 100%; left:0; width: 100%; height: 1px; background-color: #000000; z-index: 999; }
This places the underline further down. You may replace the values to your preference.
September 6, 2022 at 5:14 am #2334746Ivaylo
Two problems now:
1. I see underline on Links for Breadcrumbs and Author
2. When I hover over a link in the content, it makes another underline ( appears like two underlines )September 6, 2022 at 5:15 am #2334747Ivaylo
In General-Underline Links is set to Never.
September 6, 2022 at 5:24 am #2334753Ivaylo
Would be best to have no underline when hovering over the link, as the underline will be there all the time.
September 6, 2022 at 5:35 am #2334764David
StaffCustomer SupportHi there,
1. Remove all of the underline CSS you have so far.
2. Add this CSS:
.entry-content p a:not(:hover) { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 4px; text-decoration-color: red; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 6, 2022 at 6:09 am #2334801Ivaylo
Thanks!
1. On hover I need to remove the underline – the links are underlined, but when hovering over the underline to disappears.
-
AuthorPosts
- You must be logged in to reply to this topic.