# Tribute page. Center image

**URL:** <https://forum.freecodecamp.org/t/tribute-page-center-image/144814>\
**Category:** General\
**Created:** [August 30, 2017, 4:08pm UTC](https://forum.freecodecamp.org/t/tribute-page-center-image/144814 "2017-08-30T16:08:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dveem](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dveem/32/64272_2.png) [@Dveem](https://forum.freecodecamp.org/u/Dveem)\
**Post date:** [August 30, 2017, 4:08pm UTC](https://forum.freecodecamp.org/t/tribute-page-center-image/144814/1 "2017-08-30T16:08:55Z")

</div>

**Tell us what’s happening:**

I cant figure out for the life of me how to center an image for my tribute page… I am stuck…  
Can anyone please help me?  
This is my code.

[https://codepen.io/dveem/pen/mMQLRj](https://codepen.io/dveem/pen/mMQLRj)

=======

# Cerati -

## _Rocker - Leyend_
 ![]()

Find out more about him!! Here's the wiki page, and [N is a Number](https://www.youtube.com) cool decumentary about the awesome ddddddddddddddddddddddddddddddd .

---

<div class="post-metadata">

**Author:** ![Dveem](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dveem/32/64272_2.png) [@Dveem](https://forum.freecodecamp.org/u/Dveem)\
**Post date:** [August 30, 2017, 4:12pm UTC](https://forum.freecodecamp.org/t/tribute-page-center-image/144814/2 "2017-08-30T16:12:27Z")

</div>

I was missing a semicolon on the image but the issue is still the same… dont know how to center it.

---

<div class="post-metadata">

**Author:** ![rafa\_who](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/rafa_who/32/65349_2.png) [@rafa\_who](https://forum.freecodecamp.org/u/rafa_who)\
**Post date:** [August 30, 2017, 7:20pm UTC](https://forum.freecodecamp.org/t/tribute-page-center-image/144814/3 "2017-08-30T19:20:25Z")

</div>

Hi,  
one of the forms of putting an image on the center is to add a class in wich the left-margin and right-margin make the image align, like this:

```auto
.center{
   margin-left: 200px;
   margin-right: 200px;
} 

```

I don’t know if the number of pixels to align that image is 200, I have tried in my tribute page and it aligns with 700 but the number is probably going to vary because of the size of your image, so the pixels are around 200.

---

<div class="post-metadata">

**Author:** ![Dveem](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dveem/32/64272_2.png) [@Dveem](https://forum.freecodecamp.org/u/Dveem)\
**Post date:** [August 30, 2017, 8:59pm UTC](https://forum.freecodecamp.org/t/tribute-page-center-image/144814/4 "2017-08-30T20:59:00Z")

</div>

Thanks so much for the suggestion Rafa! what finally worked for me was using the text-centered class on the tag… like this:

```
  <div class="thumbnail text-center whitebg-img"><img src="http://caras.perfil.com/wp-content/forum/uploads/2017/08/cerati-1.jpg">
```

---

<div class="post-metadata">

**Author:** ![rafa\_who](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/rafa_who/32/65349_2.png) [@rafa\_who](https://forum.freecodecamp.org/u/rafa_who)\
**Post date:** [August 31, 2017, 11:12am UTC](https://forum.freecodecamp.org/t/tribute-page-center-image/144814/5 "2017-08-31T11:12:48Z")

</div>

Your welcome and I wish you good luck doing the tribute page, bye!

---

<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 17, 2021, 8:40pm UTC](https://forum.freecodecamp.org/t/tribute-page-center-image/144814/6 "2021-01-17T20:40:51Z")

</div>

Closed on January 17, 2021, 8:40pm UTC


