Size Your Images (help)

Size Your Images (help)
0

#1

Tell us what’s happening:
what do i need fix on the img class section. im very confused on where to put the class=".smaller-image" part

Your code so far


<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
  .red-text {
    color: red;
  }

  h2 {
    font-family: Lobster, monospace;
  }

  p {
    font-size: 16px;
    font-family: monospace;
  }

  {
  .smaller-image {
    width: 100px;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>
<main>
  <p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
  
  <a href="#"><img=class=".smaller-image" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
  
  <div>
    <p>Things cats love:</p>
    <ul>
      <li>cat nip</li>
      <li>laser pointers</li>
      <li>lasagna</li>
    </ul>
    <p>Top 3 things cats hate:</p>
    <ol>
      <li>flea treatment</li>
      <li>thunder</li>
      <li>other cats</li>
    </ol>
  </div>
  
  <form action="/submit-cat-photo">
    <label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
    <label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
    <label><input type="checkbox" name="personality" checked> Loving</label>
    <label><input type="checkbox" name="personality"> Lazy</label>
    <label><input type="checkbox" name="personality"> Energetic</label><br>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</main>

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-css/size-your-images


#2

<img=class="
How does this differ from the other elements that have class attributes?


#3

you added the .smaller-image correctly but you have a stray { curly brace above it.
just delete that extra brace to fix your syntax.


#4

i fixed that part and ran the test and it is still wrong. What else would i need to do in order to fix the problem?


#5

did you also fix this one? The class name in the html should not start with a dot.
also there should be a space, not an equal sign, between img and class


#7

I have fixed the " <img class " section of it and the code is now. What else would i need to change?
<img class=“smaller-images”


#8

you need to match the name exactly. “smaller-images” will not work because the class is called “smaller-image”


#9

i finally got it but its not letting me pass the challenge since its not reading as 100 px while my browser is at 100% zoom. do you know a fix or work around for this.


#10

i need to see your code first to make sure that it is really valid…


#11

}
smaller-image {
width: 100px;
}

<img class=“smaller-image”

That is my current code. The first challenge is completed ,


#12

you forgot the dot in the style definition for smaller-image.

When adding a class we don’t have dots, but when referencing the class in the style section we need the dot.


#13

thank you for the help