Link has underline even with text-decoration: none !important
I am working on a project for a friend. They use Material Design Bootstrap for their site. Its currently behind a wall, otherwise I would just show you the issue.
The problem is the dropdown menu appears to display an underline as part of the links, this does not appear to happen on the mdbootstrap.com site though.
I've even added
text-decoration: none !important;
as part of the styles on the achor element.
I've included an image of all of the computed styles as according to the browser. I've also included a picture of the Element in the dev console to show it does not have an :after
that might be adding it.
The weird thing is, I can do text-decoration-line: overline;
and I will get both the underline and overline?



12 Replies
maybe the text decoration is on the
<li>
or <ul>
wait
you have invalid html
your <li>
is inside a <u>
OH MY GOD
I CANT SPELL
you want to change it to
<ul>
<u>
is the underline element
that's why you can't get rid of the underlineI would have lost my mind and never found that stupid spelling mistake
I love you with all my heart. haha
i only caught by chance
thank you so much, I have been staring at this for like 45 minutes
I was getting to the point where pulling my hair out seemed reasonable. haha
🤣
confirmation bias is a damn hell of a drug
you read
<ul>
because you expected <ul>
but it was <u>
all this time
i read <ul>
at first tooPretty much. Sometimes you just need a second pair of eyes. Its why I tried to post screen shots of everything possible related since I couldn't share the code itself easily.
well, putting the chunk you think has issues on codepen or jsfiddle would let you catch this mistake easily
you would see the underline if you didn't put any css
and it wouldn't look like a list
Thats good advice, I will remember that next time.
the idea of it is to try to reproduce the bug with as little code as possible, and then you can share the codepen or jsfiddle
but hey, the screenshots were enough
I'm glad you got it fixed before your lucious locks were in any real danger!