Adjust the Width of an Element Using the width Property PLEASE HELP

Tell us what’s happening:
I am doing exactly what it told me to, but whenever I try to move to the next lesson it wont let me. Am I doing something wrong? Or is there a glitch?

Your code so far


<style>
  h4 {
    text-align: center;
  }
  p {
    text-align: justify;
  }
  .links {
    margin-right: 20px;
    text-align: left;
  }
  .fullCard {
    width: 245;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 10px 5px;
    padding: 4px;
  }
  .cardContent {
    padding: 10px;
  }
</style>
<div class="fullCard">
  <div class="cardContent">
    <div class="cardText">
      <h4>Google</h4>
      <p>Google was founded by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University.</p>
    </div>
    <div class="cardLinks">
      <a href="https://en.wikipedia.org/wiki/Larry_Page" target="_blank" class="links">Larry Page</a>
      <a href="https://en.wikipedia.org/wiki/Sergey_Brin" target="_blank" class="links">Sergey Brin</a>
    </div>
  </div>
</div>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/applied-visual-design/adjust-the-width-of-an-element-using-the-width-property

There’s a syntax error here. I don’t want to give spoilers, so check that you added the width correctly. Compare with the example.

1 Like

It makes no difference, I don’t know why, it’s probably some glitch

Consider this text from the instructions for that challenge (I’ve added some emphasis to certain part):

“Values can be given in
(1) relative length units (such as em),
(2) absolute length units (such as px), or
(3) as a percentage of its containing parent element.”

Does the value you are giving to ‘width’ fall under any of those categories? If not, consider changing it so that it does.

You had

width: 245, 

did you change it to 

width: 245px

I would look at the example code, and then compare that to your own:

/* EXAMPLE */
img {
width: 220px;
}

I thought I did, but for some reason it didn’t show, it’s the small mistakes that get us.

Hi, it looks like your width doesn’t have a “px” notation?