# Resizing pixel width to 100

**URL:** <https://forum.freecodecamp.org/t/resizing-pixel-width-to-100/446948>\
**Category:** Curriculum Help\
**Tags:** html, css\
**Created:** [February 18, 2021, 4:00am UTC](https://forum.freecodecamp.org/t/resizing-pixel-width-to-100/446948 "2021-02-18T04:00:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ray90](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Ray90](https://forum.freecodecamp.org/u/Ray90)\
**Post date:** [February 18, 2021, 4:00am UTC](https://forum.freecodecamp.org/t/resizing-pixel-width-to-100/446948/1 "2021-02-18T04:00:19Z")

</div>

I can’t figure out how to resize the pixel width.

```
  **Your code so far**

```

```html

<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 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="https://freecatphotoapp.com/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_11_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15`.

**Challenge:** Size Your Images

**Link to the challenge:**

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/responsive-web-design/basic-css/size-your-images)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [February 18, 2021, 4:05am UTC](https://forum.freecodecamp.org/t/resizing-pixel-width-to-100/446948/2 "2021-02-18T04:05:31Z")

</div>

Hi @Ray90 !

Classes need quotes around them

Add quotes here

> [@Ray90](#):
>
> `class=smaller-image`

This is the correct way to write classes

> [@Ray90](#):
>
> `class="red-text"`

Here is the FCC example:

```auto
<style>
  .larger-image {
    width: 500px;
  }
</style>

```

Just change the class name and width size and the test will pass.

---

<div class="post-metadata">

**Author:** ![Ray90](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Ray90](https://forum.freecodecamp.org/u/Ray90)\
**Post date:** [February 19, 2021, 9:39pm UTC](https://forum.freecodecamp.org/t/resizing-pixel-width-to-100/446948/3 "2021-02-19T21:39:50Z")

</div>

Hi Jwilins !

Thanks so much for responding. I have this `<a href="#"><img class= "smaller-image" {width:100px;}` but it’s still saying my image should be 100px.

Thank you !

---

<div class="post-metadata">

**Author:** ![tannerpace](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tannerpace/32/200731_2.png) [@tannerpace](https://forum.freecodecamp.org/u/tannerpace)\
**Post date:** [February 19, 2021, 9:52pm UTC](https://forum.freecodecamp.org/t/resizing-pixel-width-to-100/446948/4 "2021-02-19T21:52:07Z")

</div>

```auto

<img class="smaller-image" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>

   

```

Looks good  
However one needs to fix the css. Try targeting the html element inside the  
css

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

</style>

```

---

<div class="post-metadata">

**Author:** ![jwilkins.oboe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jwilkins.oboe/32/179497_2.png) [@jwilkins.oboe](https://forum.freecodecamp.org/u/jwilkins.oboe)\
**Post date:** [February 19, 2021, 10:44pm UTC](https://forum.freecodecamp.org/t/resizing-pixel-width-to-100/446948/5 "2021-02-19T22:44:05Z")

</div>

It would help to see your full code.

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (`</>`) to add backticks around text.

 ![Pre-formatted-text](https://global.discourse-cdn.com/freecodecamp/original/3X/1/b/1b18854f1059217f29370444396145cc3a0cd8ae.gif)

See [this post](https://forum.freecodecamp.org/t/forum-code-formatting/25574) to find the backtick on your keyboard.  
**Note:** Backticks (`) are not single quotes (’).

---

<div class="post-metadata">

**Author:** ![Ray90](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Ray90](https://forum.freecodecamp.org/u/Ray90)\
**Post date:** [March 3, 2021, 3:53am UTC](https://forum.freecodecamp.org/t/resizing-pixel-width-to-100/446948/6 "2021-03-03T03:53:32Z")

</div>

I appreciate all of your help !

---

<div class="post-metadata">

**Author:** ![Ray90](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Ray90](https://forum.freecodecamp.org/u/Ray90)\
**Post date:** [March 3, 2021, 3:54am UTC](https://forum.freecodecamp.org/t/resizing-pixel-width-to-100/446948/7 "2021-03-03T03:54:02Z")

</div>

Thank you so much ! Got passed it 🙂

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [September 1, 2021, 3:54pm UTC](https://forum.freecodecamp.org/t/resizing-pixel-width-to-100/446948/8 "2021-09-01T15:54:52Z")

</div>

Closed on September 1, 2021, 3:54pm UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
