1

So I am new to Wordpress, on my website I recently opened the source code and am learning how to customize even more. One thing I am stuck on is how to remove underlines from hyperlink, I tried the text decoration none thing but it did not work, this is the code, what and where do I typset into it to remove underlines?

<!-- wp:paragraph {"style":{"typography":{"lineHeight":"1.5","fontSize":"30px"}}} -->
<p style="font-size:30px;line-height:1.5">
   <strong><a rel="noreferrer noopener" 
         href="https://www.youtube.com/channel/UCcW39gKRENfPwqOC3OEgexw" 
         target="_blank"
         >Here I post math videos to our YouTube page!</a>
   </strong>
</p>
<!-- /wp:paragraph -->

Thanks! also was not sure what to tag this as so sorry, this is my first WPSE question. I may have many more as I am learning to code it manually rather than use the user friendly interface. Also to see my code you may need to open editor? not sure how to display the code.

4
  • Have you used 'Inspect Element' to see what their CSS is? They may be using !important or a class that would take precedence over your styling.
    – keepkalm
    Commented Mar 26, 2021 at 18:27
  • is there a way to work around this? sorry I am very very new to HTML. not sure what inspect element is Commented Mar 26, 2021 at 18:58
  • Right-click should have it in most browsers. If you can paste the code here it would be a big help diagnosing.
    – keepkalm
    Commented Mar 26, 2021 at 19:00
  • here you go (and thanks so much): <!-- wp:paragraph {"style":{"typography":{"lineHeight":"1.5","fontSize":"30px"}}} --> <p style="font-size:30px;line-height:1.5"><strong><a rel="noreferrer noopener" href="youtube.com/channel/UCcW39gKRENfPwqOC3OEgexw" target="_blank">Here I post math videos to our YouTube page!</a></strong></p> <!-- /wp:paragraph --> Commented Mar 26, 2021 at 19:06

1 Answer 1

2

The code you said you tried, a {text-decoration:none;}, should work. Using, a {text-decoration:none!important;}, should definitely work or using an inline style, like in the <p> tag would take precedence over the stylesheet.

The more correct way would be to either edit the CSS, ideally in a child theme, and apply your own styling. Using !important in the Theme Customizer Custom CSS should be good enough for a mathematician ;-) or anyone else who is doing this as a hobby.

2
  • where in my code do I pcopy paste {text-decoration:none!important;} ? when I copy paste this before my code, doesn't work Commented Mar 26, 2021 at 19:55
  • 1
    There should be a ‘Custom CSS,’ section in the customizer. If you want it inline style=“text-decoration: none;”
    – keepkalm
    Commented Mar 27, 2021 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.