# I have problem with responsive image of Tribute Page

**URL:** <https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143>\
**Category:** Curriculum Help\
**Tags:** html, css\
**Created:** [January 12, 2021, 5:37am UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143 "2021-01-12T05:37:58Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![aninotnanau](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/aninotnanau/32/198876_2.png) [@aninotnanau](https://forum.freecodecamp.org/u/aninotnanau)\
**Post date:** [January 12, 2021, 5:37am UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143/1 "2021-01-12T05:37:59Z")

</div>

#img-div {  
display: block;  
text-align: center;  
background-color: #fff;  
padding: 25px 0 10px 0;  
margin: 0 15px;  
border-radius: 0.5%;  
}  
#image {  
max-width: 100%;  
height: auto;  
margin-bottom: 15px;  
border-radius: 2%;  
}

What is wrong in my css?

---

<div class="post-metadata">

**Author:** ![codely](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/codely/32/184577_2.png) [@codely](https://forum.freecodecamp.org/u/codely)\
**Post date:** [January 12, 2021, 5:57am UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143/2 "2021-01-12T05:57:47Z")

</div>

Hey @aninotnanau!  
Welcome to the Forum!

Can you please give a link to your project?

You host your project at [CodePen](https://codepen.io)

---

<div class="post-metadata">

**Author:** ![aninotnanau](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/aninotnanau/32/198876_2.png) [@aninotnanau](https://forum.freecodecamp.org/u/aninotnanau)\
**Post date:** [January 12, 2021, 6:10am UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143/3 "2021-01-12T06:10:36Z")

</div>

@codely  
[https://codepen.io/antonina-naumliuk/pen/JjRaNad](https://codepen.io/antonina-naumliuk/pen/JjRaNad)

---

<div class="post-metadata">

**Author:** ![codely](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/codely/32/184577_2.png) [@codely](https://forum.freecodecamp.org/u/codely)\
**Post date:** [January 12, 2021, 6:12am UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143/4 "2021-01-12T06:12:29Z")

</div>

![image](https://global.discourse-cdn.com/freecodecamp/original/3X/0/1/0148b431af96d9c57e89d610280e243b22c37526.png)  
Please verify your email to view in full mode.

---

<div class="post-metadata">

**Author:** ![codely](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/codely/32/184577_2.png) [@codely](https://forum.freecodecamp.org/u/codely)\
**Post date:** [January 12, 2021, 6:15am UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143/5 "2021-01-12T06:15:47Z")

</div>

You need to add `@media` for image.

---

<div class="post-metadata">

**Author:** ![aninotnanau](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/aninotnanau/32/198876_2.png) [@aninotnanau](https://forum.freecodecamp.org/u/aninotnanau)\
**Post date:** [January 12, 2021, 6:16am UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143/6 "2021-01-12T06:16:12Z")

</div>

And now can you see?

---

<div class="post-metadata">

**Author:** ![Roma](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/roma/32/112899_2.png) [@Roma](https://forum.freecodecamp.org/u/Roma)\
**Post date:** [January 12, 2021, 6:16am UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143/7 "2021-01-12T06:16:35Z")

</div>

@aninotnanau, when a test fails click the red button to see which test(s) are failing and text to help you correct the issue. (Be sure and read more than just the first line of the failing message.)

---

<div class="post-metadata">

**Author:** ![aninotnanau](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/aninotnanau/32/198876_2.png) [@aninotnanau](https://forum.freecodecamp.org/u/aninotnanau)\
**Post date:** [January 12, 2021, 6:17am UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143/8 "2021-01-12T06:17:24Z")

</div>

It sais I need display: block; but I already have it

---

<div class="post-metadata">

**Author:** ![aninotnanau](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/aninotnanau/32/198876_2.png) [@aninotnanau](https://forum.freecodecamp.org/u/aninotnanau)\
**Post date:** [January 12, 2021, 6:18am UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143/9 "2021-01-12T06:18:11Z")

</div>

Ok I will try with @media. Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![Roma](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/roma/32/112899_2.png) [@Roma](https://forum.freecodecamp.org/u/Roma)\
**Post date:** [January 12, 2021, 6:20am UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143/10 "2021-01-12T06:20:05Z")

</div>

A simple page such as yours does not require a media query. See my previous post.

---

<div class="post-metadata">

**Author:** ![aninotnanau](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/aninotnanau/32/198876_2.png) [@aninotnanau](https://forum.freecodecamp.org/u/aninotnanau)\
**Post date:** [January 12, 2021, 6:26am UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143/11 "2021-01-12T06:26:23Z")

</div>

![Error1](https://global.discourse-cdn.com/freecodecamp/original/3X/0/8/08f63107068ab92990b2bdb6dfd1c09b7f58f766.jpeg)

---

<div class="post-metadata">

**Author:** ![aninotnanau](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/aninotnanau/32/198876_2.png) [@aninotnanau](https://forum.freecodecamp.org/u/aninotnanau)\
**Post date:** [January 12, 2021, 6:31am UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143/12 "2021-01-12T06:31:00Z")

</div>

It doesn’t work ☹ ☹

---

<div class="post-metadata">

**Author:** ![Roma](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/roma/32/112899_2.png) [@Roma](https://forum.freecodecamp.org/u/Roma)\
**Post date:** [January 12, 2021, 7:12am UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143/13 "2021-01-12T07:12:38Z")

</div>

So reading the entire message it says the `img` element should use the “display” style property with a value of “block”.

What you have is a `div` with an `id` of “img-div” using that `value: property;` pair.

Also, within your `img` element why are you setting `margin-bottom: 15px;`? Something like `margin: auto;` would be more condusive to centering wouldn’t it?

---

<div class="post-metadata">

**Author:** ![aninotnanau](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/aninotnanau/32/198876_2.png) [@aninotnanau](https://forum.freecodecamp.org/u/aninotnanau)\
**Post date:** [January 12, 2021, 7:16am UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143/14 "2021-01-12T07:16:26Z")

</div>

Now everything is alright! Thank’s, Roma! 👍

---

<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:** [July 13, 2021, 7:16pm UTC](https://forum.freecodecamp.org/t/i-have-problem-with-responsive-image-of-tribute-page/440143/15 "2021-07-13T19:16:26Z")

</div>

Closed on July 13, 2021, 7:16pm UTC

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