Jump to content
Banner by ~ Ice Princess Silky

web Web Coding Help Needed


Commander Frost

Recommended Posts

I'm going to move this to Media Web, since this isn't MLPF related. 

 

You are missing </div> ... you need to close the tag. 

  • Brohoof 3
Link to comment
Share on other sites

For future reference it's good to keep in mind that all opened tags of any sort should be closed. Even if technically speaking a tag doesn't have to be explicitly closed to be in use it's better for consistency and brevity to close it anyway. As soon as you open a tag it might help to add a closing tag after it and then put whatever needs to go inside between the two so you don't forget to do it later.

  • Brohoof 4
Link to comment
Share on other sites

For future reference it's good to keep in mind that all opened tags of any sort should be closed. Even if technically speaking a tag doesn't have to be explicitly closed to be in use it's better for consistency and brevity to close it anyway. As soon as you open a tag it might help to add a closing tag after it and then put whatever needs to go inside between the two so you don't forget to do it later.

 

Agreed, and to add to that , once you are finished with CodeAcademy you may want to download at least the free version of Sublime Text as it has code completion and will auto close your HTML tags for you. :)

  • Brohoof 2
Link to comment
Share on other sites

(edited)

What am I doing wrong now....?
jhcqDtF.png

 

I checked the tags, They all seem to be closed....

Also, here's the Typed verion:
 

<!DOCTYPE html>
<html>
 
  <head>
    
    <link rel="stylesheet" href="main.css">
    
  </head>
 
  <body>
    <div class="nav">
      <div class="container">
        <ul class="pull-left">
          <li><a href="#">Name</a></li>
          <li><a href="#">Browse</a></li>
        </ul>
        <ul class="pull-right">
          <li><a href="#">Sign Up</a></li>
          <li><a href="#">Log In</a></li>
          <li><a href="#">Help</a></li>
        </ul>
      </div>
    </div>
 
    <div class="jumbotron">
      <div class="container">
        <h1>Find a place to stay.</h1>
        <p>Rent from people in over 34,000 cities and 192 countries.</p>
        <a href="#">Learn More</a>
      </div>
    </div> 
<div class="neighborhood-guides">
<div class="container">
<h2>Neighborhood Guides</h2>
<p>Not sure where to stay? We've created neighborhood guides for cities all around the world</p>
<div class="row">
<div class="col-md-4">
<div class="thumbnail">
</div>
<div class="thumbnail">
</div>
<div class="col-md-4">
<div class="thumbnail">
</div>
<div class="thumbnail">
<div>
</div>
<div class="col-md-4">
 <div class="thumbnail">
 </div>
</div>
 
    <div class="learn-more">
 <div class="container">
<div class="row">
     <div class="col-md-4">
<h3>Travel</h3>
<p>From apartments and rooms to treehouses and boats: stay in unique spaces in 192 countries.</p>
<p><a href="#">See how to travel on Airbnb</a></p>
     </div>
 <div class="col-md-4">
<h3>Host</h3>
<p>Renting out your unused space could pay your bills or fund your next vacation.</p>
<p><a href="#">Learn more about hosting</a></p>
 </div>
 <div class="col-md-4">
<h3>Trust and Safety</h3>
<p>From Verified ID to our worldwide customer support team, we've got your back.</p>
<p><a href="#">Learn about trust at Airbnb</a></p>
 </div>
   </div>
 </div>
</div>
  </body>
</html>
Edited by CorruptedFrost
  • Brohoof 1
Link to comment
Share on other sites

So I noticed that in line 52 that you open and close a div without doing anything in it. Code Academy can be really finicky with what does and doesn't work in it's code. Sometimes your code can be good or harmless but they want you to do it exactly their way and it can make people think their code is wrong when it's not actually doing anything harmful. Try fixing that first.

Link to comment
Share on other sites

So I noticed that in line 52 that you open and close a div without doing anything in it. Code Academy can be really finicky with what does and doesn't work in it's code. Sometimes your code can be good or harmless but they want you to do it exactly their way and it can make people think their code is wrong when it's not actually doing anything harmful. Try fixing that first.

eKjBhaY.png

 

Here? Where, I don't know whats happening....

Link to comment
Share on other sites

I'm at church so I can't get really into it, but a quick search of just the code says you have 22 instances of <div and only 16 of </div, and IIRC you can't have unclosed divs, so that's a problem.

  • Brohoof 1
Link to comment
Share on other sites

It seems you've moved things around a bit from the previous picture. It's hard to say without seeing the entire code as it is right now but it looks like you still aren't closing all of the div classes properly so the code thinks you should still be adding another one when you just haven't closed a previous one.

 

The following part could potentially confuse you more than it will help you. You are warned.

 

 

Closing tags works like this, and I'm sorry if you already fully understand it but I'm throwing this in just so you have something to reference:

 

<div1> <---Opening main div to do the first thing
    <div2> <---Opening secondary div to do the second thing
    </div2> <---Closing the SECONDARY div to tell the code that the second thing is done.
</div1> <---Closing the FIRST div to tell the code that everything inside it, including the second thing, is done.
Your code will not actually look like this and is only meant to be an example. The numbers are to help you understand which div tags open and close which. If you haven't closed all of your div tags, be sure to do so.

 

If you close only one div, or close a div before everything in it is done, then you're telling the HTML reader that it's done with whatever the last opened div was doing. It will not cover the div that opened before it.

 

Link to comment
Share on other sites

Naw, it's just horribly long-winded. :D

Thats what I find annoying about a lot of coding...

It's just so time consuming

I'm doing GSCE Computing and we were doing a pretty big program, and it took me like 45 minutes to realize I'd missed a colon on ONE line. After I put it in the whole thing worked... :(

  • Brohoof 1
Link to comment
Share on other sites

Thats what I find annoying about a lot of coding...

It's just so time consuming

I'm doing GSCE Computing and we were doing a pretty big program, and it took me like 45 minutes to realize I'd missed a colon on ONE line. After I put it in the whole thing worked... :(

Sounds about right. The hard part isn't the program itself, it's getting shit to work. Computers only know what you tell it so if you forget to tell it something it'll have the biggest fit in the world. :lol:

  • Brohoof 1
Link to comment
Share on other sites

It seems you've moved things around a bit from the previous picture. It's hard to say without seeing the entire code as it is right now but it looks like you still aren't closing all of the div classes properly so the code thinks you should still be adding another one when you just haven't closed a previous one.

 

The following part could potentially confuse you more than it will help you. You are warned.

 

 

Closing tags works like this, and I'm sorry if you already fully understand it but I'm throwing this in just so you have something to reference:

 

<div1> <---Opening main div to do the first thing
    <div2> <---Opening secondary div to do the second thing
    </div2> <---Closing the SECONDARY div to tell the code that the second thing is done.
</div1> <---Closing the FIRST div to tell the code that everything inside it, including the second thing, is done.
Your code will not actually look like this and is only meant to be an example. The numbers are to help you understand which div tags open and close which. If you haven't closed all of your div tags, be sure to do so.

 

If you close only one div, or close a div before everything in it is done, then you're telling the HTML reader that it's done with whatever the last opened div was doing. It will not cover the div that opened before it.

 

<!DOCTYPE html>
<html>
 
  <head>
    
    <link rel="stylesheet" href="main.css">
    
  </head>
 
  <body>
    <div class="nav">
      <div class="container">
        <ul class="pull-left">
          <li><a href="#">Name</a></li>
          <li><a href="#">Browse</a></li>
        </ul>
        <ul class="pull-right">
          <li><a href="#">Sign Up</a></li>
          <li><a href="#">Log In</a></li>
          <li><a href="#">Help</a></li>
        </ul>
      </div>
    </div>
 
    <div class="jumbotron">
      <div class="container">
        <h1>Find a place to stay.</h1>
        <p>Rent from people in over 34,000 cities and 192 countries.</p>
        <a href="#">Learn More</a>
      </div>
    </div> 
<div class="neighborhood-guides">
<div class="container">
<h2>Neighborhood Guides</h2>
<p>Not sure where to stay? We've created neighborhood guides for cities all around the world</p>
<div class="row">
<div class="col-md-4">
<div class="thumbnail">
</div>
<div class="thumbnail">
</div>
<div class="col-md-4">
<div class="thumbnail">
</div>
<div class="thumbnail">
</div>
</div>
<div class="col-md-4">
<div class="thumbnail">
</div>
 </div>
</div>
 
    <div class="learn-more">
 <div class="container">
<div class="row">
     <div class="col-md-4">
<h3>Travel</h3>
<p>From apartments and rooms to treehouses and boats: stay in unique spaces in 192 countries.</p>
<p><a href="#">See how to travel on Airbnb</a></p>
     </div>
 <div class="col-md-4">
<h3>Host</h3>
<p>Renting out your unused space could pay your bills or fund your next vacation.</p>
<p><a href="#">Learn more about hosting</a></p>
 </div>
 <div class="col-md-4">
<h3>Trust and Safety</h3>
<p>From Verified ID to our worldwide customer support team, we've got your back.</p>
<p><a href="#">Learn about trust at Airbnb</a></p>
 </div>
   </div>
 </div>
</div>
  </body>
</html>

 

I re-did the lesson and it STILL isn't working.

Link to comment
Share on other sites

Thats what I find annoying about a lot of coding...

It's just so time consuming

I'm doing GSCE Computing and we were doing a pretty big program, and it took me like 45 minutes to realize I'd missed a colon on ONE line. After I put it in the whole thing worked... :(

That's pretty much par the course for coding. Forgot one character somewhere, whole thing is broken. Spend your lunch trying to find it because the deadline is this afternoon.

  • Brohoof 1
Link to comment
Share on other sites

First thing's first: You only have one thumbnail div in the third column while the others have two. Try creating a second thumbnail with the given url there since that seems to be what the error message is having a fit about.

 

I also don't think you properly closed the first column div correctly because the second column, according to the code, is a part of that. Maybe even the third.

 

Try the first part and if that still doesn't work try looking at your closed divs more closely. Get a piece of paper and draw it out if you have to. Point to what is closing what and make sure all are closed in the proper order.

Link to comment
Share on other sites

First thing's first: You only have one thumbnail div in the third column while the others have two. Try creating a second thumbnail with the given url there since that seems to be what the error message is having a fit about.

 

I also don't think you properly closed the first column div correctly because the second column, according to the code, is a part of that. Maybe even the third.

 

Try the first part and if that still doesn't work try looking at your closed divs more closely. Get a piece of paper and draw it out if you have to. Point to what is closing what and make sure all are closed in the proper order.

FQnANgu.png

 

It's already there! ;~;.  I funno wat to dooo.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Join the herd!

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...