# How to use screen size display CSS inline?

**URL:** <https://community.hubspot.com/t/how-to-use-screen-size-display-css-inline/80405>\
**Category:** CMS Development\
**Tags:** css, email, html, enterprise\
**Created:** [May 2, 2023, 3:36pm UTC](https://community.hubspot.com/t/how-to-use-screen-size-display-css-inline/80405 "2023-05-02T15:36:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HeatherThompson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/heatherthompson/32/72524_2.png) [@HeatherThompson](https://community.hubspot.com/u/HeatherThompson)\
**Post date:** [May 2, 2023, 3:36pm UTC](https://community.hubspot.com/t/how-to-use-screen-size-display-css-inline/80405/1 "2023-05-02T15:36:04Z")

</div>

Hi, I’m using drag and drop emails and have one tiny thing I need to tweak in an HTML module. Unfortunately, I’m not having luck finding the answer on StackOverflow.

I want an image to not display when the browser is below a certain width.

If I could edit the style header, this is what I would put:

\<style\>@media (max-width: 600px) {

#fadeshow1 { display: none; }

}\</style\>

and then this in the body:

\<img src=“[https://4733706.fs1.hubspotusercontent-na1.net/hubfs/4733706/top.png](https://4733706.fs1.hubspotusercontent-na1.net/hubfs/4733706/top.png)” style=“height: 100%; width: 100%;” id=“fadeshow1”\>

How do I convert this media query to inline CSS for this img?  
For context, this is the full div:

\<div style=“background-image:url([https://4733706.fs1.hubspotusercontent-na1.net/hubfs/4733706/postcard2.png](https://4733706.fs1.hubspotusercontent-na1.net/hubfs/4733706/postcard2.png)); height: 100%; background-size: contain; background-repeat: no-repeat;”\>

\<img src=“[https://4733706.fs1.hubspotusercontent-na1.net/hubfs/4733706/top.png](https://4733706.fs1.hubspotusercontent-na1.net/hubfs/4733706/top.png)” id=“fadeshow1”\>

\<p style=“margin: 70px 0 90px 0; font-size: 36px; font-weight: bold; color: #426D60;” align=“center”\>\<a href=“[https://www.indicotravels.com](https://www.indicotravels.com)” style=“text-decoration: none; color: #426D60;”\>Welcome!\</a\>\</p\>

\<img src=“[https://4733706.fs1.hubspotusercontent-na1.net/hubfs/4733706/top.png](https://4733706.fs1.hubspotusercontent-na1.net/hubfs/4733706/top.png)” id=“fadeshow1”\>

\</div\>

---

<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 3, 2023, 8:59pm UTC](https://community.hubspot.com/t/how-to-use-screen-size-display-css-inline/80405/2 "2023-05-03T20:59:49Z")

</div>

Hi, @HeatherThompson 👋 Thanks for reaching out. Let’s invite our community members to the conversation — hey @Anton @alyssamwilie, can you share any email-styling wisdom with @HeatherThompson?

Thank you! — Jaycee

---

<div class="post-metadata">

**Author:** ![alyssamwilie](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alyssamwilie/32/2072_2.png) [@alyssamwilie](https://community.hubspot.com/u/alyssamwilie)\
**Post date:** [May 3, 2023, 9:07pm UTC](https://community.hubspot.com/t/how-to-use-screen-size-display-css-inline/80405/3 "2023-05-03T21:07:38Z")

</div>

@HeatherThompson Media queries cannot be inlined and gmail wipes out any \<style\> blocks that aren’t in the \<head\>. So, unfortantely, removing an element on mobile just isn’t possible cross-client with drag-and-drop email. I’ve got my fingers crossed that _someday_ HubSpot will allow adding styles to the \<head\>.

---

<div class="post-metadata">

**Author:** ![HeatherThompson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/heatherthompson/32/72524_2.png) [@HeatherThompson](https://community.hubspot.com/u/HeatherThompson)\
**Post date:** [May 4, 2023, 8:46am UTC](https://community.hubspot.com/t/how-to-use-screen-size-display-css-inline/80405/4 "2023-05-04T08:46:12Z")

</div>

that’s unfortunate but thank you for solving this for me!
