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 trialjennifer ray
7,875 PointsAbout page not linked?
I must have typed my code wrong somewhere and cannot find it. I do not have no about page linking. My code is below.
5 Answers
jennifer ray
7,875 PointsI see, thank you Marcus:
Marcus Parsons
15,719 PointsHey Jennifer,
I immediately saw the issue when I opened up the snapshot haha In the href
of the anchor link for the "About" page it says "index.html" when it should say "about.html".
Marcus Parsons
15,719 Points <li><a href="index.html"class="selected">Portfolio</a></li>
<li><a href="index.html">About</a></li>
<li><a href="index.html">Contact</a></li>
should at least be:
<li><a href="index.html"class="selected">Portfolio</a></li>
<li><a href="about.html">About</a></li>
<!-- contact.html is the temporary name for your future contact page :) -->
<li><a href="contact.html">Contact</a></li>
jennifer ray
7,875 PointsOf course it should cause a href is the link to the pages. Silly of me, not good studying when tired. Many thanks for your quick response.
Marcus Parsons
15,719 PointsYou are many welcomes! :D
jennifer ray
7,875 PointsI do have another question if you could help me with? What does the attribute class selected mean?
Marcus Parsons
15,719 PointsNo problem, Jen. I think you know that the class
attribute gives the element a class of course. That name "selected" is used, in this case, for a certain style to show that the selected link is the page we're currently on. For example, in the index page, you can notice that the "portfolio" page (aka index) has the class of selected. Whenever an "a" element within the "nav" element gets the class selected, it gets this style from your "main.css" stylesheet (at the very bottom of the stylesheet). This style also applies to links within the nav element when the mouse hovers over them:
nav a.selected, nav a:hover {
color: #000;
}
This style is to distinguish which page we're currently on by sight on the page because it will appear as black unlike the other links in the navigation.
jennifer ray
7,875 Pointsfantastic explanation I understand now, thank you Anymore questions I have will be coming your way :)
Marcus Parsons
15,719 PointsAnytime you wish, Jennifer! haha Happy Coding!
Marcus Parsons
15,719 PointsMarcus Parsons
15,719 PointsHey Jennifer,
Try linking to a snapshot of your workspace because that URL is not a URL you can share, unfortunately. It's specific to you. Here's how to post a snapshot: http://www.teamtreehouse.com/forum/workspace-snapshots