Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Emily Easton
Emily Easton
13,575 Points

How do you get rid of the line under anchor elements in WordPress?

I've been stuck on this for a while.

Its not like your usual 'underline' because I've applied the "text-decoration: none;" and its still there. - When I inspect the element and turn off the text-decoration it comes up with two lines (so it really isn't the usual anchor underline).

I was just wondering if someone could tell me why it does this/what I can do to stop it. I'm using the twenty seventeen theme and you can see what I mean here - http://m-appliances.com/contact/

Thanks :)

1 Answer

Sean T. Unwin
Sean T. Unwin
28,690 Points

It's being set by box-shadow @ line 1179 of style.css.

You can reset this with your no-underline class, or another method, with -webkit-box-shadow: none; box-shadow: none;.

Emily Easton
Emily Easton
13,575 Points

OMG THANK YOU SO MUCH!!!!!!!!!! Was killing me, life saver :)

Sean T. Unwin
Sean T. Unwin
28,690 Points

You may have to add !important if you use the no-underline class suggestion.

I would probably check where this effect is being set at line 1179 and remove that completely if it doesn't affect any other elements that you want to be underlined in this fashion.

Emily Easton
Emily Easton
13,575 Points

Okie dokie! Its worked :) Cant believe I didn't see it and I will do!