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

CSS How to Make a Website Adding Pages to a Website Build the Contact Page

Rich Braymiller
Rich Braymiller
7,119 Points

404 Error on contact page/tried seemingly everything

so I've tried everything I can think of...restarting, refreshing, code etc.

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Rich Braymiller | Designer</title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/main.css"> </head> <body> <header> <a href="index.html" id="logo"> <h1>Rich Braymiller</h1> <h2>Designer</h2>
</a> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact" class="selected">Contact</a></li> </ul> </nav>
</header> <div id-"wrapper"> <section> <img src="img/rich1.jpg" alt="Photograph of me" class="profile-photo"> <h3>About</h3> <p>Hi I'm Rich Braymiller, this is my first website design with Team Treehouse, hopefully this is just a start of great things to come!</p> <p>If you would like to follow me on twitter, my username is <a href="http://twitter.com">@rwb3456</a>.</p>

   </section>
   <footer>
    <a href="http://twitter.com"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon">
      </a>
    <a href="http://facebook.com"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon">
      </a>
    <p>&copy; Rich Braymiller</p> 
  </footer>
</div>

</body> </html>

4 Answers

Hi again Rich,

The link for your contact page looks to be missing the .html extension.

Currently it is:

<li><a href="contact" class="selected">Contact</a></li>

Try changing this (on all pages you've used it) to the following:

<li><a href="contact.html" class="selected">Contact</a></li>

Hope that helps

-Rich

Rich Braymiller
Rich Braymiller
7,119 Points

it's too bad that didn't work lol

Just want to confirm I'm fully understanding :)

  • You have a file named index.html.
  • You have another named about.html.
  • The contact page is in the same folder as the above and named contact.html.

The following is the same in all of the above (with only class="selected" being different):

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

Is that correct?

-Rich

Rich Braymiller
Rich Braymiller
7,119 Points

Yes, looks exactly like the tutorial...

If the code above matches and you've changed the wrapper line above on all pages it sounds as though the page is caching. Try the same link in another browser. Does it look the same?

-Rich

Rich Braymiller
Rich Braymiller
7,119 Points

it just worked out of nowhere! "Finally" Thanks so much Rich. Still getting the hang of all this....

No problem, it sounds as though it was caching an older version so you couldn't see the updated code. Glad you got it sorted :)

-Rich