# Media Query Help - Logo Resizing

**URL:** <https://community.hubspot.com/t/media-query-help-logo-resizing/41696>\
**Category:** CMS Development\
**Tags:** html\
**Created:** [August 2, 2021, 10:51pm UTC](https://community.hubspot.com/t/media-query-help-logo-resizing/41696 "2021-08-02T22:51:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ljakiel](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ljakiel/32/13521_2.png) [@ljakiel](https://community.hubspot.com/u/ljakiel)\
**Post date:** [August 2, 2021, 10:51pm UTC](https://community.hubspot.com/t/media-query-help-logo-resizing/41696/1 "2021-08-02T22:51:11Z")

</div>

I’m trying to have our logo resize on tablet and mobile and inspecting the code have found that I can change the width to get it to look how I want. But I cannot figure out the class to target to get the media query to work.  
Ideally I would want the logo smaller (250px is what I was testing when inspecting the code) and to stay in the left corner of the page.

Here is the link to the template I am working with:  
[https://go.unearthlabs.com/eam-software-0?hs\_preview=hnoCaJeB-50350526779](https://go.unearthlabs.com/eam-software-0?hs_preview=hnoCaJeB-50350526779)

---

<div class="post-metadata">

**Author:** ![natsumimori](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/natsumimori/32/39807_2.png) [@natsumimori](https://community.hubspot.com/u/natsumimori)\
**Post date:** [August 3, 2021, 4:14am UTC](https://community.hubspot.com/t/media-query-help-logo-resizing/41696/2 "2021-08-03T04:14:56Z")

</div>

Thank you for posting @ljakiel .

I wanted to tag in our Community contributors here- @miljkovicmisa and @Sjardo , would you mind sharing your advice for @ljakiel ?

---

<div class="post-metadata">

**Author:** ![miljkovicmisa](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/miljkovicmisa/32/86357_2.png) [@miljkovicmisa](https://community.hubspot.com/u/miljkovicmisa)\
**Post date:** [August 3, 2021, 7:36am UTC](https://community.hubspot.com/t/media-query-help-logo-resizing/41696/3 "2021-08-03T07:36:32Z")

</div>

Hello @ljakiel , you can use the following snippet to achieve your request:

```lia-code-sample
/* this code adds a width of 250px to the logo image element when the windows is 1139px and smaller */
@media (max-width: 1139px) {
 .hs_cos_wrapper_type_logo img {
 width: 250px!important;
 }
}

```

 

_\*\*Note: If you are a developer, there is a better way to do it, if you are okay with writing code to a template or editing dnd template answer here with the type of the template you are using so I can show you how to add custom classes to modules._

 

_Otherwise this is perfectly okay to do and will do the job!_

 

_If my answer was helpful please mark it as a solution.\*\*_

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [August 3, 2021, 2:01pm UTC](https://community.hubspot.com/t/media-query-help-logo-resizing/41696/4 "2021-08-03T14:01:29Z")

</div>

Hi @ljakiel,  
Please use this code in your style css:-@media (max-width:992px){  
.header-container #hs\_cos\_wrapper\_module\_16239579204121650 {  
text-align: center;  
}  
.header-container #hs\_cos\_wrapper\_module\_16239579204121650 img {  
max-width: 225px;  
margin: 0 auto;  
width: 100%;  
}  
}

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.  
Thanks and Regards.

---

<div class="post-metadata">

**Author:** ![natsumimori](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/natsumimori/32/39807_2.png) [@natsumimori](https://community.hubspot.com/u/natsumimori)\
**Post date:** [August 4, 2021, 1:32am UTC](https://community.hubspot.com/t/media-query-help-logo-resizing/41696/5 "2021-08-04T01:32:55Z")

</div>

Thank you so much for your input @miljkovicmisa and [@webdew](https://community.hubspot.com/t5/user/viewprofilepage/user-id/131510) !
