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
Nick Johnson
11,194 PointsHtml Navigation issues
I am having some navigation issues with my html. Whenever I click on "Portfolio" at the top from another section, like contact or about, it says "404 not found"
Here is my code:
Index.html:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Nick Johnson | Student</title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Titillium+Web:600,400%7cInconsolata' 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>Nick Johnson</h1> <h2>Student</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> </header> <div id="wrapper"> <section> <ul id="gallery"> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>A Test image.</p> </a> </li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> <p>A Test image.</p> </a> </li> <li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> <p>A Test image.</p> </a> </li> <li> <a href="img/numbers-09.jpg"> <img src="img/numbers-09.jpg" alt=""> <p>A Test image.</p> </a> </li> <li> <a href="img/numbers-12.jpg"> <img src="img/numbers-12.jpg" alt=""> <p>A Test image.</p> </a> </li> </ul> </section> <footer> <a href="http://twitter.com/supernova9909"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a> <a href="http://facebook.com/Idontremember"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a> <p>© 2014 Nick Johnson.</p> <p> <a href="http://jigsaw.w3.org/css-validator/check/referer"> <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS!" /> </a> </p> </footer> </div> </body> </html>
About.html:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Nick Johnson | Student</title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Titillium+Web:600,400|Inconsolata' 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>Nick Johnson</h1> <h2>Student</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="img/doge.jpg" alt="Much Doge, Such Beuty, wow" class="profile-photo"> <h3>About</h3> <p>Such website, Very html, Much about, Wow.</p> <p>If you would like to follow me on twitter, my username is <a href="http://twitter.com/supernova9909"> @supernova9909</a>.</p> </section> <footer> <a href="http://twitter.com/supernova9909"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a> <a href="http://facebook.com/Idontremember"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a> <p>© 2014 Nick Johnson.</p> <p> <a href="http://jigsaw.w3.org/css-validator/check/referer"> <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS!" /> </a> </p> </footer> </div> </body> </html>
Contact.html:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Nick Johnson | Student</title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Titillium+Web:600,400|Inconsolata' 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>Nick Johnson</h1> <h2>Student</h2> </a> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html" class="selected">Contact</a></li> </ul> </nav> </header> <div id="wrapper"> <section id="primary"> <h3>General Information</h3> <p>Dont contact me bro</p> <p>testing text for testing reasons</p> </section> <section id="secondary"> <h3>Contact Details</h3> <ul class="contact-info"> <li class="phone"><a href="tel:LOL-UR-DUM">LOL-UR-DUM</a></li> <li class="mail"><a href="mailto:sockpuppetnova@gmail.com">sockpuppetnova@gmail.com</a></li> <li class="twitter"><a href="http://twitter.com/intent/tweet?screen_name=twitta">@twitta</a></li> </ul> </section> <footer> <a href="http://twitter.com/supernova9909"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a> <a href="http://facebook.com/Idontremember"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a> <p>© 2014 Nick Johnson.</p> <p> <a href="http://jigsaw.w3.org/css-validator/check/referer"> <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS!" /> </a> </p> </footer> </div> </body> </html>
Jacob Miller
12,466 PointsAre your about.html and contact.html files within a folder, or in the same directory as your index.html file?
Nick Johnson
11,194 PointsAll of the files are in the same directory
1 Answer
Nick Johnson
11,194 PointsI found the solution to the problem: My index.html in the file directory had a uppercase I and in my code it was lowercase. I made it all uppercase and the problem was solved. Thank you all for your help
Craig Watson
27,930 PointsCraig Watson
27,930 PointsHi Nick,
Are you working on workspaces ?
Craig