[fixed #75] Make a Website - Building with Bootstrap - 6. Supporting Content - error: Invalid character

make-a-website
bug-fixed

#1


This is my code:
<!DOCTYPE html>
<html>
<head>
  <title>Skillfair</title>
  <meta charset="utf-8"/>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
  <link href='https://fonts.googleapis.com/css?family=Roboto:300,400,700' rel='stylesheet' type='text/css'>
  <link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
  <header class="container">
    <div class="row">
      <h1 class="col-sm-4">Skillfair</h1>
      <nav class="col-sm-8 text-right">
        <p>newest</p>
        <p>catalogue</p>
        <p>contact</p>
      </nav>
    </div>
  </header>
  <section class="jumbotron">
    <div class="container">
      <div class="row text-center">
        <h2>Homemade Goods</h2>
        <h3>This Year's Best</h3>
        <a class="btn btn-primary" href="#" role="button">See all</a>
      </div>
    </div>
  </section>
  <section class="container">
    <div class="row">
    </div>
    <div class="row">
    </div>
</section>

</body>
</html>


it said invalid character, what does that mean?


Impossible. Building with bootstrap>part six>step 2
#2

can you post your main.css code too?


#3

yea mine is having the same issue.


#4

Mistake .. Wrong answer apologies :slightly_smiling:


#5

Hi

I disagree with you. You can add as many classes to an element as you want but only one ID per element. These classes are just separated by spaces. A simple research on the web can provide some examples.

I copied your html code in my window and it worked perfectly. Could you provide your CSS code, please?


#6

Yeah me too! :slightly_smiling: your html code looks fine! I think the problem is in the main.css


#7

I'm having the same issue. The problem isn't located in the < div class="row text-center" >

The problem is in the lesson for < section class="container" >
I can get past entering this, but after that, when it asks you to enter two:

< div class="row" >
< /div >

This is where it gives the "invalid character" error. Must be a bug. I submitted a report yesterday, but I'm still having the same problem. I'd post my code, but it's identical to the one above.


#8

I would like to see someone who is having this problem post their CSS code.


#9

No problem, but keep in mind that this has to do with section class="container" The lesson hasn't even asked us to edit the CSS for this section at all yet. But maybe you know something I don't.

body {
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
}

header {
  padding: 20px 0;
}

header .row,
footer .row {
  display: flex;
  align-items: center;
}

header h1 {
  font-weight: 700;
  margin: 0;
}

header nav {
  display: flex;
  justify-content: flex-end;
}

header p {
  padding: 0 20px;
  margin: 0;
}

.jumbotron {
  display: flex;
  align-items: center;
  background-image: url('https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-4/jumbotron.jpg');
  background-size: cover;
  color: #ffffff;
  height: 500px;
  text-shadow: 0.25px 0.25px 0.25px #000000;
}

.jumbotron h2 {
  font-size: 60px;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.jumbotron h3 {
  margin: 0 0 20px;
  color: #fff;
}

section .row img {
  margin: 0 0 30px;
  width: 100%;
}

.col-md-6 {
  margin: 0 0 30px;
}

.btn.btn-primary {
  border-radius: 2px;
  border: 0px;
  color: #fbd1d5;
  text-shadow: none;
  background-color: #ffffff;
}

.btn.btn-primary:hover {
  color: #ffffff;
  background-color: #fbd1d5;
}

.btn-secondary {
  background-color: #E8DFE0;
  color: #ffffff;
  margin: 0 0 30px;
}

footer {
  font-size: 12px;
  padding: 20px 0;
}

footer .col-sm-8 {
  display: flex;
  justify-content: flex-end;
}

footer ul {
  list-style: none;
}

footer li img {
  width: 32px;
  height: 32px;
}

#10

Probably not, but it's good to see the whole thing, especially when trying to hunt down one elusive invalid character. :green_heart:


#11

I have just done several rounds of adding the code from the original post here, and resetting and trying again and I can't get the error to pop.

Could you post a screenshot of your whole web browser when the error is visible so that we can see everything that you are seeing?


#12

Sure.


#13

@albionsrefuge,
Having the same....


---error
SCRIPT5: Toegang geweigerd.

Bestand: index-e15cd898fa5906b22c02b7fc4cf8e509.html, regel: 1, kolom: 1

---error
SCRIPT5: Toegang geweigerd.

Bestand: xd_arbiter.php, regel: 1, kolom: 1

---Info
SEC7118: Voor XMLHttpRequest voor https://library.codecademy.com/users/5334fb12282ae3dde70018f9/workspaces/maw-2-0-unit-IV-exercise-4-end/upload is CORS (Cross Origin Resource Sharing) vereist.
Bestand: supporting-content


---Info
SEC7119: Voor XMLHttpRequest voor https://library.codecademy.com/users/5334fb12282ae3dde70018f9/workspaces/maw-2-0-unit-IV-exercise-4-end/upload is CORS als voorbereiding vereist.
Bestand: supporting-content


---error
SCRIPT5007: Kan de eigenschap parentNode van een niet-gedefinieerde verwijzing of een verwijzing naar een lege waarde niet ophalen
Bestand: relay.js, regel: 1, kolom: 158


---error
SCRIPT1014: Ongeldig teken
Bestand: stuff_wrapper.js, regel: 137, kolom: 7

===============================================

I am using Windows 8.1 IE11 [active-X filtered]


#14

bug it. even if you use get code it will not accept.


#15

Can you please paste in your code so we can have a look

Please paste in your code using this format

```

   replace this line with your code 

```

#16

here.

<!DOCTYPE html>
<html>
<head>
  <title>Skillfair</title>
  <meta charset="utf-8"/>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
  <link href='https://fonts.googleapis.com/css?family=Roboto:300,400,700' rel='stylesheet' type='text/css'>
  <link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
  <header class="container">
    <div class="row">
      <h1 class="col-sm-4">Skillfair</h1>
      <nav class="col-sm-8 text-right">
        <p>newest</p>
        <p>catalogue</p>
        <p>contact</p>
      </nav>
    </div>
  </header>
  <section class="jumbotron">
    <div class="container">
      <div class="row text-center">
        <h2>Homemade Goods</h2>
        <h3>This Year's Best</h3>
        <a class="btn btn-primary" href="#" role="button">See all</a>
      </div>
    </div>
  </section>
  
  <section class="container">
    <div class="row">
    </div>
    <div class="row">
    </div>
    </section>


</body>
</html>

#17

here is the CSS.

body {
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
}

header {
  padding: 20px 0;
}

header .row,
footer .row {
  display: flex;
  align-items: center;
}

header h1 {
  font-weight: 700;
  margin: 0;
}

header nav {
  display: flex;
  justify-content: flex-end;
}

header p {
  padding: 0 20px;
  margin: 0;
}

.jumbotron {
  display: flex;
  align-items: center;
  background-image: url('https://s3.amazonaws.com/codecademy-content/projects/make-a-website/lesson-4/jumbotron.jpg');
  background-size: cover;
  color: #ffffff;
  height: 500px;
  text-shadow: 0.25px 0.25px 0.25px #000000;
}

.jumbotron h2 {
  font-size: 60px;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.jumbotron h3 {
  margin: 0 0 20px;
  color: #fff;
}

section .row img {
  margin: 0 0 30px;
  width: 100%;
}

.col-md-6 {
  margin: 0 0 30px;
}

.btn.btn-primary {
  border-radius: 2px;
  border: 0px;
  color: #fbd1d5;
  text-shadow: none;
  background-color: #ffffff;
}

.btn.btn-primary:hover {
  color: #ffffff;
  background-color: #fbd1d5;
}

.btn-secondary {
  background-color: #E8DFE0;
  color: #ffffff;
  margin: 0 0 30px;
}

footer {
  font-size: 12px;
  padding: 20px 0;
}

footer .col-sm-8 {
  display: flex;
  justify-content: flex-end;
}

footer ul {
  list-style: none;
}

footer li img {
  width: 32px;
  height: 32px;
}

#18

What error are you getting ?


#19

"invalid character"
here is a screenshot


#20

This issue being looked at, Judy can give you more info @albionsrefuge