Skip to main content
Inspiring
April 8, 2020
Answered

Cannot remove underline from list text

  • April 8, 2020
  • 2 replies
  • 1325 views

I am having the toughest time trying to get an "underline" removed from text in an unordered list.  I have added: 
text-decoration: none;

list-style: none;

 

And I got rid of the bullet and any decoration on hyperlinks but this underline still remains on my listed items that are not hyperlinks.  The link to the page is below under "Contact Information" at the bottom.  Thank you!

 

https://bit.ly/2UQ1CA1

 

This topic has been closed for replies.
Correct answer Jon Fritz

Lists don't have an underline by default, so adding text-decoration: none to an <li> will have no effect. 

It looks like you have a number of structural errors in your code, including some problems with a few <a> tags. The <a> tag is where the text-decoration is coming from and needs to be repaired in order to fix your problem.

Run the validation tool at http://validator.w3.org/nu to get a listing of your code errors. Repairing them will fix your issue.

2 replies

Jon Fritz
Community Expert
Jon FritzCommunity ExpertCorrect answer
Community Expert
April 8, 2020

Lists don't have an underline by default, so adding text-decoration: none to an <li> will have no effect. 

It looks like you have a number of structural errors in your code, including some problems with a few <a> tags. The <a> tag is where the text-decoration is coming from and needs to be repaired in order to fix your problem.

Run the validation tool at http://validator.w3.org/nu to get a listing of your code errors. Repairing them will fix your issue.

Inspiring
April 9, 2020

Thank you!  I actually saw my error not too long after I posted.  Thank you all again!

BenPleysier
Community Expert
Community Expert
April 8, 2020

Have you tried

a {

  text-decoration: none !important;

  list-style: none;

}

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!