# How to remove fixed image width?

**URL:** <https://community.hubspot.com/t/how-to-remove-fixed-image-width/2551>\
**Category:** CMS Development\
**Tags:** css, html\
**Created:** [June 28, 2017, 9:04pm UTC](https://community.hubspot.com/t/how-to-remove-fixed-image-width/2551 "2017-06-28T21:04:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jobnomade](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jobnomade/32/31184_2.png) [@jobnomade](https://community.hubspot.com/u/jobnomade)\
**Post date:** [June 28, 2017, 9:04pm UTC](https://community.hubspot.com/t/how-to-remove-fixed-image-width/2551/1 "2017-06-28T21:04:42Z")

</div>

Hi,

I would like to remove the fixed width property of images.

Example

`<img src="//static.hubspot.com/final/img/content/email-template-images/placeholder_200x200.png" class="hs-image-widget " style="width:320px;border-width:0px;border:0px;" width="320" alt="" title="">`

This is the standard output. As I want to override the width with an relative value like 100%, I don’t find any option to remove it. Is there a way to remove the fixed width?

---

<div class="post-metadata">

**Author:** ![Jsum](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jsum/32/20405_2.png) [@Jsum](https://community.hubspot.com/u/Jsum)\
**Post date:** [June 29, 2017, 3:47pm UTC](https://community.hubspot.com/t/how-to-remove-fixed-image-width/2551/2 "2017-06-29T15:47:10Z")

</div>

@jobnomade,

Just use an important tag in your css:

```auto
img {
 width: 100% !important;
 height: auto !important;
}

```

---

<div class="post-metadata">

**Author:** ![JTPwellness](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@JTPwellness](https://community.hubspot.com/u/JTPwellness)\
**Post date:** [May 4, 2025, 3:11pm UTC](https://community.hubspot.com/t/how-to-remove-fixed-image-width/2551/3 "2025-05-04T15:11:59Z")

</div>

Thank you so much for this - I’m new to HTML and so I would really appreciate it if you could advise on how I can apply your suggested code to my containers.

I have a row of 5 buttons, each with an image and link. The images are the correct size on a desktop screen but then are oversized on a mobile view so I need to remove the fixed size which is causing this. Please can you show me how I would apply your code to the following code (i have replaced the tile images and links for privacy):

\<center\>\<a href=“TILE-LINK”\>\<img src=“TILE-IMAGE”\>\</a\>\<a href=" TILE-LINK “\>\< TILE-IMAGE “\>\</a\>\<a href=” TILE-LINK”\>\<img src=" TILE-IMAGE “\>\</a\>\<a href=” TILE-LINK"\>\<img src=" TILE-IMAGE “\>\</a\>\<a href=” TILE-LINK"\>\<img src=" TILE-IMAGE "\>\</a\>\</center\>

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [May 5, 2025, 3:07pm UTC](https://community.hubspot.com/t/how-to-remove-fixed-image-width/2551/4 "2025-05-05T15:07:34Z")

</div>

Hey, @JTPwellness You might want to create a new post for this one. You didn’t do anything wrong, and this post is almost 8 years old and may not get the visibility you want for your question. — Jaycee

---

<div class="post-metadata">

**Author:** ![JTPwellness](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@JTPwellness](https://community.hubspot.com/u/JTPwellness)\
**Post date:** [May 6, 2025, 3:10pm UTC](https://community.hubspot.com/t/how-to-remove-fixed-image-width/2551/5 "2025-05-06T15:10:48Z")

</div>

[@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074) Thanks for the tip - I’ll start a new post now!
