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 How to Make a Website Customizing Colors and Fonts Use Classes in CSS

tyler stoddard
tyler stoddard
2,043 Points

having a issue with my "about" and "contact" tabs not being links anymore.

having a issue with my "about" and "contact" tabs not being links anymore.

In the lesson they had me apply a class "selected" to the portfolio tab and "hover" on the other tabs but now the portfolio link works but the about and contact don't.

nav a, nav a:visited { color: #fff; }

nav a.selected, nav a:hover { color: #000; }

body { background-color: #fff; color: #999;

}

<header> <a href="index.html" id="logo"> <h1>Tyler Stoddard</h1> <h2>Designer</h2> </a> <nav> <ul> <li><a href="index.html" class="selected">Portfolio</a></li> <li><a href="about.html"></a>About</li> <li><a href="contact.html"></a>Contact</li> </ul> </nav> </header>

1 Answer

Looks like the text content for the links is outside the anchor elements. Move the "About" and "Contact" texts inside the anchor elements, so that they come before the closing </a> tags

<header>
<nav> <ul> 
<li><a href="index.html" class="selected">Portfolio</a></li> 
<li><a href="about.html">About</a></li> 
<li><a href="contact.html">Contact</a></li> 
</ul> </nav> 
</header>