Size Your Images..,

Size Your Images..,
0

#1

Tell us what’s happening:
Okay i am still stuck here. All of the solutions i was previously given didn’t work, or i just didn’t do it right. Can someone please explain what to do, pretend I am a baby you are trying to teach this.

‘Your img element should have the class smaller-image.’
‘Your image should be 100 pixels wide. Browser zoom should be at 100%.**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;
  }
</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 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 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

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


#2

I reset the code by the way


#3

What have you tried? Where is your smaller-image class? How have you changed the img tag?


#4

I’ll give it a try.
First thing, give this img element the class of
“smaller-image”.

Then, use this class i.e. “smaller-image” in your css using class selector i.e. period (.) .
Then, use the width property for this class and give it a value of 100px.
Does this help?


#5

What exactly is your question?

Do you want your Image to be 100px?

if so:

As you might know your styles are declared in the within the tag.

So the exercise tells you exactly what to do.

‘Your img element should have the class smaller-image.’
‘Your image should be 100 pixels wide. Browser zoom should be at 100%.**Your code so far’

Step by step:

  1. in the style Tag create a class called smaller-image
    example

.example-class {
height: 200px
}

  1. add the class to the element
    in the image tage you create class="" and pass the name of your created class

with 1 minute of thinking you should figure it out now :wink:


#6

That took longer than any challenge yet, thank you.