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 Adding Pages to a Website Add a New Page

Javier Iniguez
Javier Iniguez
493 Points

About.html

I deleted the entire section like Nick shows in this video on the about.html and saved it but the gallery is still showing up on the About page in my workspace. I also tried deleting the about.html page and redoing it but for some reason it's still displaying the images in the gallery from the home page.

3 Answers

I'm not sure I fully understand the problem, but let me try to help.

You have your index.html - about.html and contact.html, correct?

So when you're on index.html you try clicking the NAV bar on top to go to about.html but it is still showing the gallery and same info from index.html?

If this is the problem make sure in all 3 of your .html pages that the links reflect the correct link to the pages.

This should be the links that need to be on top of every page. See the class="selected" make sure you cut and paste it to the correct link that corresponds to the correct page the user is currently on.

<a href="index.html" id="logo">
        <h1>Put your text here</h1>
        <h2>Designer</h2>
      </a>
      <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>
Javier Iniguez
Javier Iniguez
493 Points

Thank you so much for helping! So I have this right now:

<a href="index.html" id="logo">
      <h1>Vanessa Gonzales</h1>
      <h2>Designer</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>

I'm currently on the About page but when I preview it it still shows as if I'm on the home page. And the link at the top of the browser window still shows "/index.html" Also, even though I have class="selected" for the About page it's not selected at all when I preview. Any suggestions? I feel like I've been following Nicks videos pretty well I don't know where it's getting hung up!

Hi Vanessa,

I had this exact issue.

I found my error on the index.html page. I typed too fast and did not fill in the hrefs properly.

It looked like this:

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

Double check that both sheets have the same <nav> links. In my case I forgot to add in the about.html and contact.html between the quotes in the href. After I made this correction the link worked.

This is from the index.html page

  <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>

and this is from the about.html page

  <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>

Keep checking! It could be one small thing that is throwing it off. :)