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 trialChristopher Vicini
Courses Plus Student 12,191 PointsI can't seem to figure out why my "about" and "contact" pages do not stay highlighted dark green when they are selected.
However, my "portfolio" tab remains highlighted when selected.....
Christopher Vicini
Courses Plus Student 12,191 PointsThis is the code for the about.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Christopher Vicini | Publicist</title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Roboto:400,400italic,900|Roboto+Slab:400,700' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/responsive.css"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <header> <a href="index.html" id="logo"> <h1>Christopher Vicini</h1> <h2>Publicist</h2> </a> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html" class:"selected">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <div id="wrapper"> <section> <img src="img2/ChristopherVicini.jpg" alt="Photograph of Christopher Vicini" class="profile-photo"> <h3>About</h3> <p>Hi, I'm Christopher Vicini. This is my design portfolio that I coded from scratch thanks to <a href="http://teamtreehouse.com">Treehouse</a>. When I'm not learning how to code I am either working on my startup PR firm, vicinipr.com, or enjoying the company of great friends.</p> <p> If you would like to follow me on twitter, my user name is <a href="https://twitter.com/cmvicini">@CMVICINI</a></p> </section> <footer> <a href="https://twitter.com/cmvicini"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a> <a href="https://twitter.com/vicinipr"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a> <p>© 2014 Christopher Vicini.</p> </footer> </div> </body> </html>
3 Answers
Zachary Green
16,359 Pointsyou have a typo. it should be class="selected"
Christopher Vicini
Courses Plus Student 12,191 PointsOh! Thank you so much. So appreciated!
Tim Rohweder
25,527 PointsCan you post your code so we can look at it?
Christopher Vicini
Courses Plus Student 12,191 PointsCode for css.main or code for about.html and contact.html?
Walden Wang
5,657 Points<a href="about.html" class:"selected">About</a> should be <a href="about.html" class="selected">About</a>
Zachary Green
16,359 PointsZachary Green
16,359 Pointsdo you use an id of active or something for the css to target?