# Help for images

**URL:** <https://forum.freecodecamp.org/t/help-for-images/34423>\
**Category:** I Built This\
**Created:** [September 6, 2016, 8:28am UTC](https://forum.freecodecamp.org/t/help-for-images/34423 "2016-09-06T08:28:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrasat](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/andrasat/32/14948_2.png) [@andrasat](https://forum.freecodecamp.org/u/andrasat)\
**Post date:** [September 6, 2016, 8:28am UTC](https://forum.freecodecamp.org/t/help-for-images/34423/1 "2016-09-06T08:28:06Z")

</div>

Hello, now i’m creating the personal portfolio project and i want to make it for my photography portfolio. As you can see in my codepen here: [https://codepen.io/andras75/full/JRjOjJ/](https://codepen.io/andras75/full/JRjOjJ/) ; the first image is not the same size as others, im wondering what cause that, because i used the img-responsive on all of them and they have the same code. the first image code starts on line 34.

Thanks!

---

<div class="post-metadata">

**Author:** ![yhabib](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/yhabib/32/164148_2.png) [@yhabib](https://forum.freecodecamp.org/u/yhabib)\
**Post date:** [September 6, 2016, 8:36am UTC](https://forum.freecodecamp.org/t/help-for-images/34423/2 "2016-09-06T08:36:08Z")

</div>

I am not a Bootstrap expert but what I saw is that the img-responsive makes the image scales relative to its parent, so when you check the parents height you can see that there are different values. I think you should try to give all the divs a fixed height, otherewise they will take the value fo the img.

---

<div class="post-metadata">

**Author:** ![andrasat](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/andrasat/32/14948_2.png) [@andrasat](https://forum.freecodecamp.org/u/andrasat)\
**Post date:** [September 6, 2016, 8:41am UTC](https://forum.freecodecamp.org/t/help-for-images/34423/3 "2016-09-06T08:41:19Z")

</div>

Ooh okay then i will try that, thanks !

---

<div class="post-metadata">

**Author:** ![ralgtrx](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ralgtrx/32/16331_2.png) [@ralgtrx](https://forum.freecodecamp.org/u/ralgtrx)\
**Post date:** [September 6, 2016, 4:16pm UTC](https://forum.freecodecamp.org/t/help-for-images/34423/4 "2016-09-06T16:16:00Z")

</div>

My personal opinion: I don’t really like using img-responsive, I think you could miss a lot of thing you should make custom to your needs, like the max-height of the images, I’d recommend you to add that max-height property to your images, that should fix the problem. You could also change the images so each one of them has the same resolution.  
I think it’s being caused by the image resolution, it’s not the same as the others, so the img-responsive class “fixes” the height to fit the weigth at its max without distorting it.  
My english can be kinda messy, sorry, not my native language 😄

---

<div class="post-metadata">

**Author:** ![andrasat](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/andrasat/32/14948_2.png) [@andrasat](https://forum.freecodecamp.org/u/andrasat)\
**Post date:** [September 7, 2016, 10:52am UTC](https://forum.freecodecamp.org/t/help-for-images/34423/5 "2016-09-07T10:52:37Z")

</div>

yeah i guess that’s maybe the case, i have a different resolution images and img-responsive has height:auto; so, i have to apply the same height to all my images. Thanks for your reply! It’s okay, english is not my native language too lol 😄

---

<div class="post-metadata">

**Author:** ![PJ-Coding](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pj-coding/32/15908_2.png) [@PJ-Coding](https://forum.freecodecamp.org/u/PJ-Coding)\
**Post date:** [September 7, 2016, 11:25am UTC](https://forum.freecodecamp.org/t/help-for-images/34423/6 "2016-09-07T11:25:45Z")

</div>

HI Andrasat

I look at your code and there i see the div class cols:

div class='col-lg-4 col-md-4 col-sm-6’  
4+4+6 = 14 it should be 12. Try it with 4+4+4 or 3+3+6  
Bootstrap is based on a 12 column layout, so be careful.

Look here (i folked and changed your pen, lets see  
[with changes](https://codepen.io/Phajava/full/JRdKYR/)

Regards  
Phajava

---

<div class="post-metadata">

**Author:** ![andrasat](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/andrasat/32/14948_2.png) [@andrasat](https://forum.freecodecamp.org/u/andrasat)\
**Post date:** [September 7, 2016, 11:39am UTC](https://forum.freecodecamp.org/t/help-for-images/34423/7 "2016-09-07T11:39:20Z")

</div>

well i thought that is used for different screen size, so in large screen size, col-lg-\* run, in medium screen size col-md-\* , and in small screen size, col-sm-\* , but thanks anyway 🙂

---

<div class="post-metadata">

**Author:** ![PJ-Coding](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pj-coding/32/15908_2.png) [@PJ-Coding](https://forum.freecodecamp.org/u/PJ-Coding)\
**Post date:** [September 7, 2016, 11:53am UTC](https://forum.freecodecamp.org/t/help-for-images/34423/8 "2016-09-07T11:53:34Z")

</div>

@Andrasat  
Of course you could/should use different cols for different sizes but it must be 12 at the end not 14.  
Did you see the new pen? Works it now for you?

---

<div class="post-metadata">

**Author:** ![andrasat](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/andrasat/32/14948_2.png) [@andrasat](https://forum.freecodecamp.org/u/andrasat)\
**Post date:** [September 7, 2016, 12:17pm UTC](https://forum.freecodecamp.org/t/help-for-images/34423/9 "2016-09-07T12:17:35Z")

</div>

well yea i know what you mean. when you try to make the page view smaller in the editor view, you can see that the images are lined up in 3 column, and i want to make it just 2 column. thats why in the last code i used `col-sm-6`.

I think the codes `col-lg-4,col-md-4,col-sm-6` are not rendered the same time, they are rendered depending on the screen size you use, like laptop/desktop screen(large and medium), tablets(small), when i use tablets to watch my webpage, only the `col-sm-6` works, the other code are just there doing nothing. Then when i use laptop, only the `col-lg-4` or `col-md-4` works.

My problem was my images had a different resolution size, so they are not aligned well. I guess i just have to upload the same resolution images so they can aligned well and have the same sizes.

Thanks for your reply!

---

<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:** [June 1, 2021, 6:08pm UTC](https://forum.freecodecamp.org/t/help-for-images/34423/10 "2021-06-01T18:08:06Z")

</div>

Closed on June 1, 2021, 6:08pm UTC


