# Suck in tribute page project

**URL:** <https://forum.freecodecamp.org/t/suck-in-tribute-page-project/275455>\
**Category:** General\
**Created:** [May 4, 2019, 11:28pm UTC](https://forum.freecodecamp.org/t/suck-in-tribute-page-project/275455 "2019-05-04T23:28:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![marachimeno](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/marachimeno/32/134249_2.png) [@marachimeno](https://forum.freecodecamp.org/u/marachimeno)\
**Post date:** [May 4, 2019, 11:28pm UTC](https://forum.freecodecamp.org/t/suck-in-tribute-page-project/275455/1 "2019-05-04T23:28:01Z")

</div>

Hey could you remind me how to make the `img` element responsively resize, relative to the width of its parent element, without exceeding its original size?  
thanks

---

<div class="post-metadata">

**Author:** ![gasgen](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/gasgen/32/114814_2.png) [@gasgen](https://forum.freecodecamp.org/u/gasgen)\
**Post date:** [May 5, 2019, 6:03am UTC](https://forum.freecodecamp.org/t/suck-in-tribute-page-project/275455/2 "2019-05-05T06:03:08Z")

</div>

Hi @marachimeno,

You can add to the CSS this lines:

```auto
img {
    width: 100%;
    max-width: 400px;
    height: auto;
}

```

In that example you are saying to the image: Ok…You will measure 100% of your width but you can’t be bigger than 400px (you can use the `inherit` value to make the max-width equals the width of the parent). The height in auto helps to make a proportional scale.

I hope this helps you,

---

<div class="post-metadata">

**Author:** ![marachimeno](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/marachimeno/32/134249_2.png) [@marachimeno](https://forum.freecodecamp.org/u/marachimeno)\
**Post date:** [May 5, 2019, 5:48pm UTC](https://forum.freecodecamp.org/t/suck-in-tribute-page-project/275455/3 "2019-05-05T17:48:41Z")

</div>

I can’t get it to work…

---

<div class="post-metadata">

**Author:** ![gasgen](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/gasgen/32/114814_2.png) [@gasgen](https://forum.freecodecamp.org/u/gasgen)\
**Post date:** [May 5, 2019, 6:27pm UTC](https://forum.freecodecamp.org/t/suck-in-tribute-page-project/275455/4 "2019-05-05T18:27:54Z")

</div>

Hi @marachimeno,

Share your code to review it.

---

<div class="post-metadata">

**Author:** ![marachimeno](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/marachimeno/32/134249_2.png) [@marachimeno](https://forum.freecodecamp.org/u/marachimeno)\
**Post date:** [May 5, 2019, 6:55pm UTC](https://forum.freecodecamp.org/t/suck-in-tribute-page-project/275455/5 "2019-05-05T18:55:46Z")

</div>

I already fixed it, but thanks!

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 16, 2021, 11:27am UTC](https://forum.freecodecamp.org/t/suck-in-tribute-page-project/275455/7 "2021-01-16T11:27:27Z")

</div>

Closed on January 16, 2021, 11:27am UTC


