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 trialLeslie Wolfe
8,700 PointsWhy are the styled elements - links still underlined?
I'm not understanding why all the pseudo class elements are underlined when we did not declare that.
2 Answers
Natasha Godwin
11,012 PointsCould you share your code? That way, we'll have more context when answering your question. Generally speaking, links are underlined by default. You can remove them in your stylesheet with the following declaration:
a {
text-decoration: none;
}
If you only want to remove the text-decoration for links within a specific div, you'll need to write its class or id, plus the normal link declaration, like so:
.class a {
text-decoration: none;
}
or
#id a {
text-decoration: none;
}
Leslie Wolfe
8,700 PointsThanks so much for responding. I tried to post this under the questions section of a particular video https://teamtreehouse.com/library/css-basics/basic-selectors/pseudoclasses
but I don't think I was successful. Natasha, the
text-decoration: none;
was all I needed to understand. Thanks so much!
Natasha Godwin
11,012 PointsGotcha. Happy to help!