# It keeps changing my code

**URL:** <https://community.hubspot.com/t/it-keeps-changing-my-code/71072>\
**Category:** Blog, Website & Page Publishing\
**Tags:** starter\
**Created:** [December 13, 2022, 7:20am UTC](https://community.hubspot.com/t/it-keeps-changing-my-code/71072 "2022-12-13T07:20:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RonaldoTerra](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@RonaldoTerra](https://community.hubspot.com/u/RonaldoTerra)\
**Post date:** [December 13, 2022, 7:20am UTC](https://community.hubspot.com/t/it-keeps-changing-my-code/71072/1 "2022-12-13T07:20:03Z")

</div>

Hello folks.

I paste this code into the Rich Text Element (in the source code section):

```lia-code-sample
<!-- START REALTYNINJA EMBED CODE -->
<style>#embeded iframe{ width: 100%; }</style>
<div id="embeded"></div>
<script src="https://s.realtyninja.com/static/rev-00000076/js/easyXDM/easyXDM.min.js"></script>
<script src="https://ronaldoterra2.realtyninja.com/static/js/prod/embed_js.min.js" rel="responsive" url="veja-propriedades-em-lethbridge-e-regiao"></script>
<!-- END REALTYNINJA EMBED CODE -->

```

However, it keeps changing to:

```lia-code-sample
<!-- START REALTYNINJA EMBED CODE -->
<div id="embeded"> </div>
<script src="https://s.realtyninja.com/static/rev-00000076/js/easyXDM/easyXDM.min.js"></script>
<script src="https://ronaldoterra2.realtyninja.com/static/js/prod/embed_js.min.js" rel="responsive" url="veja-propriedades-em-lethbridge-e-regiao"></script>
<!-- END REALTYNINJA EMBED CODE -->

```

It messes with the layout. Any idea here?

Thanks,

Ronaldo

---

<div class="post-metadata">

**Author:** ![jnix284](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jnix284/32/29_2.png) [@jnix284](https://community.hubspot.com/u/jnix284)\
**Post date:** [December 13, 2022, 8:03pm UTC](https://community.hubspot.com/t/it-keeps-changing-my-code/71072/2 "2022-12-13T20:03:48Z")

</div>

Hi @RonaldoTerra you can’t add the \<style\> to the rich text editor.

You’ll need to [add that to the page head html instead.](https://knowledge.hubspot.com/website-pages/add-code-to-the-head-or-footer-html-of-hubspot-content#add-code-snippets-to-a-specific-page-or-post)

---

<div class="post-metadata">

**Author:** ![RonaldoTerra](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@RonaldoTerra](https://community.hubspot.com/u/RonaldoTerra)\
**Post date:** [December 13, 2022, 8:42pm UTC](https://community.hubspot.com/t/it-keeps-changing-my-code/71072/3 "2022-12-13T20:42:14Z")

</div>

Thank you! 🙂

---

<div class="post-metadata">

**Author:** ![jnix284](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jnix284/32/29_2.png) [@jnix284](https://community.hubspot.com/u/jnix284)\
**Post date:** [December 13, 2022, 9:08pm UTC](https://community.hubspot.com/t/it-keeps-changing-my-code/71072/4 "2022-12-13T21:08:59Z")

</div>

you’re welcome, glad it worked 😉

---

<div class="post-metadata">

**Author:** ![DalePease](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@DalePease](https://community.hubspot.com/u/DalePease)\
**Post date:** [April 18, 2025, 2:47pm UTC](https://community.hubspot.com/t/it-keeps-changing-my-code/71072/5 "2025-04-18T14:47:00Z")

</div>

I’m having a similar issue. Embedding the Style in the header didn’t solve it.

I paste this into a rich text module (Source code):

\<iframe src=“[https://app.priceguide.ai/estimator/recLQWpm9UFqgWTTt](https://app.priceguide.ai/estimator/recLQWpm9UFqgWTTt)” width=“100%” height=“100%” style=“width: 100%; height: 75vh; border-top: 1px solid #999; border-bottom: 1px solid #999;” frameborder=“0”\>\</iframe\>

Save it. Then open it back up and it’s converted to this:

\<iframe style=“border-top: 1px solid #999; border-bottom: 1px solid #999; margin: 0px auto; display: block;” xml=“lang” src=“[Estimator | A-1 Concrete Leveling](https://app.priceguide.ai/estimator/recLQWpm9UFqgWTTt)” width=“560” height=“315” frameborder=“0”\>\</iframe\>

I tried adding: \<style\>#iframe{width: 100%; height: 75vh;}\</style\> to the header, but it’s still showing up as a tiny iframe on the page (on desktop.)

Hubspot doesn’t seem to like width=“100%” height=“100%” and keeps converting it to: width=“560” height=“315”
