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

HTML

kevin Neo
PLUS
kevin Neo
Courses Plus Student 1,417 Points

text-decoration: none; not working on links.

I want to take out the link style, the underline but no matter if I place my css as .logo/a/header. the text decoration still does not work.

<header> <a href="index.html" class="logo"><h1>Bob</h1></a> </header>

under my css I put

.logo { text-decoration: none; }

3 Answers

Bryce Santos
Bryce Santos
11,157 Points

Weird. It worked both ways for me in Dreamweaver.

Edit: To make sure, you linked the HTML+CSS documents as well, right?

kevin Neo
kevin Neo
Courses Plus Student 1,417 Points

thanks somehow my css was not in the right folder weird.

Sjors Theuns
Sjors Theuns
6,091 Points

Your CSS is fine. I would rearrange the HTML like:

<h1><a href="index.html" class="logo">Bob</a></h1>

I think that should work.

Edit: are you sure you CSS file is properly linked to your HTML file?

kevin Neo
kevin Neo
Courses Plus Student 1,417 Points

thanks, how about links? It should work on links too right? <nav> <ul> <li><a href="index.html">HOME</a></li> </ul> </nav>

css

nav ul{ text-decoration: none; list-style: none; color: grey; }

Bryce Santos
Bryce Santos
11,157 Points

Assuming your nav looks like this:

<nav>
<ul>
<li>
<a href="index.html">Home</a>
</li>
</ul> 
</nav>

then your css should be

nav ul{  
list-style: none;
color: grey;
}

a { 
text-decoration: none;
}

Edit: Sorry, I keep making mistakes, so I keep editing. Lol, this should be right now, though.