Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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>