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

When i use my navigation, it does link to the right document but it doesn't show it's content. What's wrong?

This is my html code:

      <nav>
        <ul class="nav_links">
            <li><a href='index.html' class="selected">Catering</a></li>
            <li><a href='over.html'>Over MooS</a></li>
            <li><a href='contact.html'>Contact</a></li>
        </ul>
      </nav>

This is the complete code that I want to have shown when I navigate to 'over.html':

<!DOCTYPE html>
<html>
 <head>
   <title> MooS' Catering | Professionele Catering Service</title>
   <link rel="stylesheet" href="css/normalize.css">
   <link rel="stylesheet" href="css/main.css">
   <link rel="stylesheet" href="css/responsive.css">
   <link href='https://fonts.googleapis.com/css?family=Merriweather+Sans:400,700italic,700' rel='stylesheet' type='text/css'>
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
 </head>
 <body class="body">
  <main class="site-content">
    <header class="main-header">
      <h1 class="moos-catering"><a href="index.html"><span class="moos-comma">MooS<span class="comma">'</span></span> <br><span class="catering">catering</span></a></h1>
      <nav>
        <ul class="nav_links">
            <li><a href='index.html' class="selected">Catering</a></li>
            <li><a href='over.html'>Over MooS</a></li>
            <li><a href='contact.html'>Contact</a></li>
        </ul>
      </nav>
    </header>
    <div class="banner">
    </div>
    <div class="content-catering">

       <div class="column">
        <h2>Flexibel</h2>
        <div class="col-img1"></div>
        <p>Hier komt de tekst voor flexibel. Hier komt de tekst voor flexibel. Hier komt de tekst voor flexibel. Hier komt de tekst voor flexibel. Hier komt de tekst voor flexibel. Hier komt de tekst voor flexibel. Hier komt de tekst voor flexibel. </p>
      </div>

      <div class="column">
        <h2>Intro</h2>
        <div class="col-img2"></div>
        <p>Hier komt de tekst voor intro. Hier komt de tekst voor intro. Hier komt de tekst voor intro. Hier komt de tekst voor intro. Hier komt de tekst voor intro. Hier komt de tekst voor intro. Hier komt de tekst voor intro. </p>
      </div>

      <div class="column">
        <h2>Veelzijdig</h2>
        <div class="col-img3"></div>
        <p>Hier komt de tekst voor veelzijdig. Hier komt de tekst voor veelzijdig. Hier komt de tekst voor veelzijdig. Hier komt de tekst voor veelzijdig. Hier komt de tekst voor veelzijdig. </p>
      </div>

    </div>
</main>   
<footer class="main-footer">
   <span>&copy;Moos' catering.</span>
</footer>    


 </body>

</html>

I've gone ahead and fixed your html formatting. Without the correct code tags, your complete html code won't show. Be sure to check out the Markdown Cheatsheet link on this page for more info on how to correctly wrap your code.

Your HTML looks fine, so I'm assuming it's an environment problem. Are you sure the page is linked correctly? Double check all of the .html locations and file names. When it loads into the page, does it give an error? What does your browser's inspector say?

4 Answers

Not a problem. Looking over the workplace, it looks like your files are working just fine on my end. This may be a browser cache issue, where the original blank html file is loading instead. Depending on your browser, you can CTRL+F5 to clear the cache for that specific site, and see if that helps. Workplace sometimes bugs out with its caching. You can also verify this issue by visiting your workplace site link on another browser, or in a private mode tab.

Thanks for fixing the formatting! Sorry it was my first post. I double checked all the .html locations and file names and when it loads into the page it does not give an error, it displays the right link. It just doesn't show the html that I wrote for that page.

When I inspect the page and check for the source it also confirms that it's linked to the right file ('over.html').

I'm working in workspaces, could it be a problem with that like you assumed?

No problem!

It's difficult to say without seeing it. If you'd like, post a workplace snapshot link so I can take a look for you myself.

Here it is: https://w.trhou.se/z42yga9xbw

I didn't make the content for the 'over.html'-page yet so it's the same as my 'index.html' but that shouldn't be a problem, should it?

Thanks a ton! The CTRL+F5 trick worked. Have a great day :)

Glad I could help! Good luck.