Make a Website - Exercise 11. Add a Div - Not sure what's going wrong?


#1

Hi!

I am stuck on this exercise, everything looks correct to me but when I hit "Run" it won't let me move onto the next step of the exercise.

The instructions:

"First, we will enclose all the elements between <body>...</body> in a div element with a class attribute of "container". "

Below is my code:

<!DOCTYPE html>
<html>
<head>
  <title>Ollie Bike Sharing</title>
  <meta charset="utf-8"/>
  <link rel="stylesheet" type="text/css" href="main.css">
</head>
  <body>
         <div class="containter">
         <h2>Ollie</h2>
            <ul>
                <li>sign up</li>
                 <li>search bikes</li>
                 <li> reserve a bike</li>
                 <li> about us</li>
            </ul> 
        <h1>Ollie Bike Sharing</h1>
        <h3>Share Your Pedals with the World.</h3>
<p>
  Need a set of wheels while you're in town? Use Ollie to pair your perfect vacation with a stylish, affordable bike rental.
  Here is a list of <a href="cities.html">list</a> of cities where you can find us.
</p>
<video width="350" height="200" controls>
  <source src="https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-1/ollie.mp4"
          type="video/mp4">
</video>
    </div>
    </body>
</html>

#2

Close all elements between what? And are you receiving an error message? If so, what is it? Can you also post a screenshot or link to the exercise? That could help.


#3

Hi

Sorry, this is my first help request... :frowning:

I don't get an error message, just a red cross on the first instruction which then means I cannot proceed to the second instruction. I have taken a screen grab of the everything after I hit "run". I hope this explains it better.

https://www.codecademy.com/en/courses/make-a-website/lessons/site-structure/exercises/add-div?action=resume


#4

I'm sorry, I was not able to find any mistakes in your code. It looks right, but I could be overlooking something. This was my code for the exercise. You can compare and try it out. If you do find your mistake, please let me know. Thanks and hope that helps!

<!DOCTYPE html>
<html>
<head>
  <title>Ollie Bike Sharing</title>
  <meta charset="utf-8"/>
  <link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
  <div class="container">
 <div class="nav"> 
  	<h2> Ollie </h2>
  <ul>
    <li> Sign Up </li>
    <li> Search Bikes </li>
    <li> Reserve A Bike </li>
    <li> About Us </li>
    <li> Contact Us </li>
  </ul>
    </div>
 <div class="main">
  <h1> Ollie Bike Sharing </h1>
  <h3> Share Your Pedals with the World. </h3>
  <p> Do you need a new set of wheels while you are in town? Use Ollie to pair your perfect vacation with a stylish, affordable rental. With plenty of choices, rent the vehicle that is right for you! Here is a <a href="cities.html"> list </a> of cities where you can find us. Free bike sharing now available in 27 cities.
  </p>
  <video width="400" height="250" controls>
  <source src="https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-1/ollie.mp4" type="video/mp4">
</video>
</div>
  </div>    
</body>
</html>

#5

Hi

Thanks for having a look. I basically logged out, restarted my PC and signed in again and it worked. It must have just been a bug or something.

Really appreciate you trying to help. :slight_smile:


#6

Of course, no problem! I'm glad you figured it out!


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.