Home › Forums › Support › Underline Links only in Text This topic has 11 replies, 3 voices, and was last updated 2 years, 5 months ago by David. Viewing 12 posts - 1 through 12 (of 12 total) Author Posts October 16, 2021 at 3:34 am #1965095 Mira Hello, I would like to underline links only in text, but not in buttons, navigation, header, footer or images. At the moment I tried this code: #main .entry-content a:not(.pp-button) { text-decoration: underline; } #main .entry-content a:hover:not(.pp-button) { text-decoration: none; } But there are still underlined links in Buttons or images. Thank you! October 16, 2021 at 7:13 am #1965196 DavidStaff Customer Support Hi there, try this CSS: .entry-content p > a:not(:hover) { text-decoration: underline; } It will apply to only links that are inside a paragraph, and only when its not hovered. October 17, 2021 at 6:29 am #1966017 Mira Hi there, thank you very much. I tried the code and it is working for the buttons. The text links on my images (e.g. my homepage header is covered with a text) are still underlined. Do you know how I can change this? October 17, 2021 at 6:38 am #1966025 DavidStaff Customer Support Made a slight tweak to the CSS here: https://generatepress.com/forums/topic/underline-links-only-in-text/#post-1965196 Try that. October 17, 2021 at 6:55 am #1966037 Mira That works perfectly, thank you 🙂 October 17, 2021 at 6:58 am #1966038 DavidStaff Customer Support Glad to be of help November 5, 2021 at 3:34 pm #1993254 Dan Hi there, Is not work for me. I would like to underline links only in text (content), not in buttons, navigation, header, footer or images. I have setup Customize > General: Underline links > Not on hover with Cache dynamic CSS. Clear the cache too. Can you help me, please? November 5, 2021 at 5:14 pm #1993317 DavidStaff Customer Support Hi there, can you raise a new topic, where you can share a link to your site so i can see whats required? November 5, 2021 at 8:51 pm #1993405 Dan Hi David, Here the link site: https://evanjou.ca/dialogue/ November 6, 2021 at 6:01 am #1993713 DavidStaff Customer Support The site is using Elementor – and its applying its own underline styles. Not sure if Elementor has a style setting for that. If not then try this CSS: .elementor p a { text-decoration: underline; } November 6, 2021 at 1:37 pm #1994234 Dan Hi David, It’s work as well. Thank you for your help! November 6, 2021 at 6:12 pm #1994337 DavidStaff Customer Support You’re welcome Author Posts Viewing 12 posts - 1 through 12 (of 12 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In