# Template css issues

**URL:** <https://community.hubspot.com/t/template-css-issues/64466>\
**Category:** CMS Development\
**Tags:** css\
**Created:** [September 5, 2022, 3:40pm UTC](https://community.hubspot.com/t/template-css-issues/64466 "2022-09-05T15:40:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ALouvari](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@ALouvari](https://community.hubspot.com/u/ALouvari)\
**Post date:** [September 5, 2022, 3:40pm UTC](https://community.hubspot.com/t/template-css-issues/64466/1 "2022-09-05T15:40:37Z")

</div>

Hello,

I have create a new template using Design tools for my Landing Pages. While I have all the files correct (html, css), the preview page shows my template properly without any problem.

However, when I go to create a new Landing Page with this specific template, the preview of the template looks correct but when I select it, the css is not loading properly.

For example, this is a part of the template in my preview:

 ![ALouvari_2-1662392262074.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/8/5859fd63afc5086ef83199e999298d3a119a55ae.png)

And this is how it looks when I select this template in Landing Page creation:

 ![ALouvari_3-1662392369910.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/d/fdfb0ce718af4ed17b8b855f47cda1b3cc2462ec.png)

Does anyone know why this is happening and how to fix it?

Thank you very much!

---

<div class="post-metadata">

**Author:** ![Oezcan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/oezcan/32/53959_2.png) [@Oezcan](https://community.hubspot.com/u/Oezcan)\
**Post date:** [September 6, 2022, 8:55am UTC](https://community.hubspot.com/t/template-css-issues/64466/2 "2022-09-06T08:55:58Z")

</div>

Hello @ALouvari and @emacrow ,

can you show us your code pls?  
Best regards  
Özcan

---

<div class="post-metadata">

**Author:** ![ALouvari](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@ALouvari](https://community.hubspot.com/u/ALouvari)\
**Post date:** [September 6, 2022, 9:30am UTC](https://community.hubspot.com/t/template-css-issues/64466/3 "2022-09-06T09:30:13Z")

</div>

Hello @Oezcan ,

Thank you very much for your reply.

Below it’s the part of the code from the specific element of my template. I also shared the css part too, but it’s a common css code.

 ![ALouvari_0-1662456488835.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/a/4/a432d4e1d44cb1e951d9ffed280d7ca35f70e2aa.jpeg)

 ![ALouvari_1-1662456570646.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/7/37f74a6203534312048f1fffe9007ccb85039a8f.png)

Please let me know if you need any further information.

Thank you!

---

<div class="post-metadata">

**Author:** ![JanetArmstrong](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/janetarmstrong/32/99730_2.png) [@JanetArmstrong](https://community.hubspot.com/u/JanetArmstrong)\
**Post date:** [September 8, 2022, 2:23pm UTC](https://community.hubspot.com/t/template-css-issues/64466/4 "2022-09-08T14:23:36Z")

</div>

It is probably that your preview is using a different css file. Make sure you assign the css file to your template. It could be using your domain settings on the page.

---

<div class="post-metadata">

**Author:** ![ALouvari](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@ALouvari](https://community.hubspot.com/u/ALouvari)\
**Post date:** [September 13, 2022, 3:04pm UTC](https://community.hubspot.com/t/template-css-issues/64466/5 "2022-09-13T15:04:35Z")

</div>

Hello everyone,

I manage to find the solution to my issue.

It seems that I was using the IDs each module was generated by default in the preview mode as css hundlers, but once I use the template in a live Landing Page, these IDs were changing with a numbered ones.

As a solution, I created individual css classes for each one of these elements and now everything is working properly!

Thank you everyone!

---

<div class="post-metadata">

**Author:** ![MiaSrebrnjak](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/miasrebrnjak/32/10_2.png) [@MiaSrebrnjak](https://community.hubspot.com/u/MiaSrebrnjak)\
**Post date:** [September 19, 2022, 3:12pm UTC](https://community.hubspot.com/t/template-css-issues/64466/6 "2022-09-19T15:12:26Z")

</div>

Thank you for sharing the solution @ALouvari! 🙂
