# Problem with Styling HTML Form (width and margin)

**URL:** <https://community.hubspot.com/t/problem-with-styling-html-form-width-and-margin/79937>\
**Category:** CMS Development\
**Tags:** html, forms\
**Created:** [April 24, 2023, 5:03pm UTC](https://community.hubspot.com/t/problem-with-styling-html-form-width-and-margin/79937 "2023-04-24T17:03:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![EBricenoLeone](https://avatars.discourse-cdn.com/v4/letter/e/e19b73/32.png) [@EBricenoLeone](https://community.hubspot.com/u/EBricenoLeone)\
**Post date:** [April 24, 2023, 5:03pm UTC](https://community.hubspot.com/t/problem-with-styling-html-form-width-and-margin/79937/1 "2023-04-24T17:03:01Z")

</div>

Hi, I’m having a problem with a customs form embedded in my LP, but I don’t have the skill to write in HTML.

Look what’s going on with the margins on the Mobile.

Here’s my ugly code:

`<iframe style="margin-right: 0px auto; margin-left 100% ; display: block; margin-left 100% display: block; margin: 0px auto; display: block;" xml="lang" src="https://app.livestorm.co/p/0b53ed7a-4ef7-4a6a-8644-6f0bffc9d347/form" width="700" height="700" frameborder="0"></iframe>`

Please, need a little bit of help. How can I fix this?

 ![Screenshot 2023-04-24 at 12.56.13 PM.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/e/3e3a268acf958dfaf483f95bdd5fecade2bf354f.png)

---

<div class="post-metadata">

**Author:** ![ChrisoKlepke](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/chrisoklepke/32/11213_2.png) [@ChrisoKlepke](https://community.hubspot.com/u/ChrisoKlepke)\
**Post date:** [April 24, 2023, 8:05pm UTC](https://community.hubspot.com/t/problem-with-styling-html-form-width-and-margin/79937/2 "2023-04-24T20:05:39Z")

</div>

Hey [@EBriceñoLeone](https://community.hubspot.com/t5/user/viewprofilepage/user-id/558266) ,

I think the community can help out here. Do you mind sharing a preview or live link? It might be a bit easier to troubleshoot.

Cheers,

Chriso

---

<div class="post-metadata">

**Author:** ![EBricenoLeone](https://avatars.discourse-cdn.com/v4/letter/e/e19b73/32.png) [@EBricenoLeone](https://community.hubspot.com/u/EBricenoLeone)\
**Post date:** [April 24, 2023, 9:06pm UTC](https://community.hubspot.com/t/problem-with-styling-html-form-width-and-margin/79937/3 "2023-04-24T21:06:17Z")

</div>

You right, I edited the original post.

---

<div class="post-metadata">

**Author:** ![ankitparmar09](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ankitparmar09/32/64399_2.png) [@ankitparmar09](https://community.hubspot.com/u/ankitparmar09)\
**Post date:** [April 25, 2023, 1:01pm UTC](https://community.hubspot.com/t/problem-with-styling-html-form-width-and-margin/79937/4 "2023-04-25T13:01:51Z")

</div>

Hello [@EBriceñoLeone](https://community.hubspot.com/t5/user/viewprofilepage/user-id/558266)

Yes, it is doable. You can use the below CSS, it can help you.

Try

`iframe {width: 100%;height: 100%;}`

OR

`iframe {width: 100% !important;height: 100% !important;}`

 ![image.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/a/0/a0669cb6faf9ee161ec3e1186a9847b3fc3713b7.jpeg)

---

<div class="post-metadata">

**Author:** ![ChrisoKlepke](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/chrisoklepke/32/11213_2.png) [@ChrisoKlepke](https://community.hubspot.com/u/ChrisoKlepke)\
**Post date:** [April 25, 2023, 1:47pm UTC](https://community.hubspot.com/t/problem-with-styling-html-form-width-and-margin/79937/5 "2023-04-25T13:47:12Z")

</div>

Hey @ankitparmar09,

since width and height are already attributes on the iframe tag, wouldn’t it make more sense to just modify these?

[@EBriceñoLeone](https://community.hubspot.com/t5/user/viewprofilepage/user-id/558266), I wasn’t able to find a link, unfortunately. But maybe @ankitparmar09 answer already covered your question.

Cheers,

Chriso
