The div tag not working on notepad++


#1

Hey guys. I have been using the code below to test the div tag in notepad++ but it does not give the same results as the one in the exercise. When I run the code on my browser, the sections aren't grouped and I do not understand why. kindly assist. This 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="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>
      </ul>
    </div>
    <div class="main">
      <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 <a href="cities.html">list</a> of cities where you can find us.</p>
      <video width="320" height="240" 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>

#2

This can't be accurate. Please post your code here.


#3

Hi @claryn,

Do you also have a file called main.css in the same folder as your .html file?


#4

Hi, yes. Different files but saved in the same folder.


#5

hey, how/why is it not accurate?

<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>
      </ul>
    </div>
    <div class="main">
      <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 <a href="cities.html">list</a> of cities where you can find us.</p>
      <video width="320" height="240" 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>

#6

I mean your CSS code.

Also, have you tried with a different browser and set the zoom factor to default (by pressing CTRL + 0)?


#7

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