# Email module can't force restyling

**URL:** <https://community.hubspot.com/t/email-module-cant-force-restyling/64585>\
**Category:** CMS Development\
**Created:** [September 7, 2022, 8:50am UTC](https://community.hubspot.com/t/email-module-cant-force-restyling/64585 "2022-09-07T08:50:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ow-roxas](https://avatars.discourse-cdn.com/v4/letter/o/cc9497/32.png) [@ow-roxas](https://community.hubspot.com/u/ow-roxas)\
**Post date:** [September 7, 2022, 8:50am UTC](https://community.hubspot.com/t/email-module-cant-force-restyling/64585/1 "2022-09-07T08:50:20Z")

</div>

I created an emai l and try to restyle the icon (position in the central of the div)

 ![Screenshot 2022-09-07 at 09.47.18.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/6/c6944909f218293a7a1f3499e4a323d58a7f7e89.png)

with a moduel file with the \</style\> tag and place it on the top of the email (which should be invisible).

 ![Screenshot 2022-09-07 at 09.29.26.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/8/89b54d1880cdbf9bea5dc6f92d5b4c1faf2687df.jpeg)

That being said, the code doesn’t work.

Just wondering is there any other solution or have I done something wrong with the code?

Thank you so much!

Roxas

---

<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:** [September 7, 2022, 10:46pm UTC](https://community.hubspot.com/t/email-module-cant-force-restyling/64585/2 "2022-09-07T22:46:42Z")

</div>

Hey, @ow-roxas thanks for reaching out! Let’s see if we can get the conversation going. @Anton @MFischer @DM2, do you have any quick tips for @ow-roxas?

Thank you! — Jaycee

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [September 8, 2022, 5:28am UTC](https://community.hubspot.com/t/email-module-cant-force-restyling/64585/3 "2022-09-08T05:28:05Z")

</div>

Hi @ow-roxas,

in email modules \<style\>-tags doesn’t work the same way as in page modules. The reason for that is, that many email clients will cut all \<style\>-tags that are not in the \<head\>-tag. Also: I recommend to write it like this for page modules

```lia-code-sample
{% require_css %}
<style>
...
</style>
{% end_require_css %}

```

by doing so your \<style\>-tag will be placed in the \<head\>-tag. But this doesn’t work in email modules, too.

As this is a media-query: Most clients - especially GMail - don’t understand them.

The best way, easiest and almost only way how you can achieve true responsive modules is to write a HTML template like described in the [documentation](https://developers.hubspot.com/docs/cms/building-blocks/templates/email-template-markup#responsive-email-template) since you have full control over the \<head\>-tag. A great helper tool for this is [mjml.io](https://mjml.io/).

- create a blank email template
- write the whole layout in mjml
- copy/paste the generated HTML to HubSpot
- add Hubl to template
- test it
- create email with this template
- test it
- done

Tipp: create the template first and then create modules for this special tempalte. Put every \<style\>-tag into the \<head\> of the template - not into modules. And run real-live tests. Not just the “test clients” function in HubSpot. There can be A LOT of differences.

best,

Anton
