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

Design

Garrett Hughes
seal-mask
.a{fill-rule:evenodd;}techdegree
Garrett Hughes
Python Development Techdegree Student 32,971 Points

Why does the preview load the directory instead of the home page?

I'm trying to make a site whenever I preview it loads the directory, meaning this;


Index of /

Index.html

Untitled.html

css/


with the lower 3 items being clickable links. When I click index.html it loads the site correctly but how do I get it do stop loading the directory?

Below is my code.

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> Ruston 8 - Celebrity Theaters </title> <link rel="stylesheet" href="css/main.css"> </head> <body> <header> <a href="index.html" id="logo"> <h1> Ruston 8 - Celebrity Theaters </h1> </a> <nav> <ul> <li><a href="index.html">Home</a></li> <li><a href="osa.html">On-Screan Advertising</a></li> <li><a href="events.html">Events</a></li> <li><a href="comming.html">Comming Soon</a></li> <li><a htef="directions.html">Directions</a></li> <li><a href="gift.html">Gift Certificates</a></li> <li><a href="contact.html">Contact</a></li> <li><a href="summer.html">Summer Camp</a></li> <li><a href="birthay.html">Birthday Part</a></li> </ul> </nav> </header>

    <div>
      <prices>
        <h3> Prices </h3>
        <p class="price"> Matinee (Before 6:00pm) </p>
          <ul> 
            <li> All - $6.50 </li>
            <li>All 3D - $9.50 </li>
          </ul>
        <p class="price"> Evening (After 6:00pm) </p>
          <ul>
            <li> Adults - $8.50 </li>
            <li> Adults 3D - $11.50 </li>
            <li> Children & Sseniors - $6.50 </li>
            <li> Children & Seniors 3D - $ 9.50 </li>
          </ul>
      </prices>
    </div>


  <div>
      <showing>
        <h2> Now Playing </h2>
          <ul class="showing">
            <li></li>
        </ul>

      </showing>
  </div>


  <div>
    <footer>
      <img src="http://www.celebritytheatres.com/images/Celebrity_16.jpg">
    </footer>
  </div>

</body>

</html>

Garrett Hughes
seal-mask
.a{fill-rule:evenodd;}techdegree
Garrett Hughes
Python Development Techdegree Student 32,971 Points

I have "!DOCTYPE html", "html", and "head" in the beginning of my code, but for some reason when I paste it in here doesn't show.

1 Answer

I believe your problem is due to the name of "Index.html". I just tested myself, and with an all lowercase "index", the file loads correctly. Having the uppercase "I" will cause this.