# Builder Is Adding Margin: 0 To First Paragraph

**URL:** <https://forum.builder.io/t/builder-is-adding-margin-0-to-first-paragraph/3989>\
**Category:** General\
**Tags:** visual-editor\
**Created:** [August 3, 2023, 8:26pm UTC](https://forum.builder.io/t/builder-is-adding-margin-0-to-first-paragraph/3989 "2023-08-03T20:26:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![doom\_slayer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/doom_slayer/32/4664_2.png) [@doom\_slayer](https://forum.builder.io/u/doom_slayer)\
**Post date:** [August 3, 2023, 8:26pm UTC](https://forum.builder.io/t/builder-is-adding-margin-0-to-first-paragraph/3989/1 "2023-08-03T20:26:48Z")

</div>

_Please fill out as many of the following questions as possible so we can help you promptly! If you don’t know how to answer or it does not apply, feel free to remove it or leave it blank._

**Builder content link**  
Sorry I don’t want this publicly listed

**What are you trying to accomplish**  
Create multiple paragraphs in text box

**Screenshots or video link**  
I will gladly provide this but not publicly.

**Code stack you are integrating Builder with**  
Astro and GraphQL

**Reproducible code example**  
Create a textbox, add multiple paragraphs (be sure to enter between each), and publish it.

View the source and the first paragraph will have the following css:

```auto
.builder-paragraph:first-of-type {
   margin: 0;
}

```

---

<div class="post-metadata">

**Author:** ![nicke920](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@nicke920](https://forum.builder.io/u/nicke920)\
**Post date:** [August 3, 2023, 9:25pm UTC](https://forum.builder.io/t/builder-is-adding-margin-0-to-first-paragraph/3989/2 "2023-08-03T21:25:07Z")

</div>

Hi there,  
Thanks for reaching out!  
Would you be able to provide us with a screenshot of how you are experiencing this style on your page?  
If you add the text box inside of a box element, are you able to modify the margin/padding to suit your design?

---

<div class="post-metadata">

**Author:** ![doom\_slayer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/doom_slayer/32/4664_2.png) [@doom\_slayer](https://forum.builder.io/u/doom_slayer)\
**Post date:** [August 4, 2023, 3:01pm UTC](https://forum.builder.io/t/builder-is-adding-margin-0-to-first-paragraph/3989/3 "2023-08-04T15:01:21Z")

</div>

![Screen Shot 2023-08-04 at 9.54.20 AM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/c/ced559bab4f5940969f59f5f3c5c22b72a70adfc.jpeg)  
 ![Screen Shot 2023-08-04 at 9.59.05 AM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/9/9b571970d91b7da283ea3bbf0eb5652e93c04da7.png)

See attached. Notice how the margin is 0 only after the first paragraph.

---

<div class="post-metadata">

**Author:** ![nate\_78](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/nate_78/32/2771_2.png) [@nate\_78](https://forum.builder.io/u/nate_78)\
**Post date:** [August 8, 2023, 1:33pm UTC](https://forum.builder.io/t/builder-is-adding-margin-0-to-first-paragraph/3989/4 "2023-08-08T13:33:16Z")

</div>

This post talks about it as well:

> [@First paragraph spacing disappears on every page](https://forum.builder.io/t/first-paragraph-spacing-disappears-on-every-page/2246/2):
>
> Hey @ElManorAve, Thanks for reaching out! That style is caused by a conflict with Builder’s default styles and your store’s theme styles. The best way to remove this is to add the following CSS to your store’s theme styles: p:first-of-type { margin-bottom: 10px!important; } Head to your Shopify store admin, then click Online Store in the left sidebar. Then, under Current Theme, choose Actions \> Edit Code. Locate the “Assets” folder and open your “stylesheet.css” or “stylesheet.css.liquid”…

Obviously the solution provided there isn’t very satisfying. I hope they eventually remove this CSS. Whatever its intended purpose, it’s way too heavy-handed, and it’s annoying to have to work around it.

---

<div class="post-metadata">

**Author:** ![logan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/logan/32/5564_2.png) [@logan](https://forum.builder.io/u/logan)\
**Post date:** [August 8, 2023, 3:41pm UTC](https://forum.builder.io/t/builder-is-adding-margin-0-to-first-paragraph/3989/5 "2023-08-08T15:41:33Z")

</div>

~ Sent feedback on this to the Builder team! 🙏

---

<div class="post-metadata">

**Author:** ![doom\_slayer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/doom_slayer/32/4664_2.png) [@doom\_slayer](https://forum.builder.io/u/doom_slayer)\
**Post date:** [August 8, 2023, 8:40pm UTC](https://forum.builder.io/t/builder-is-adding-margin-0-to-first-paragraph/3989/6 "2023-08-08T20:40:13Z")

</div>

> [@doom\_slayer](#):
>
> `builder-paragraph:first-of-type`

I’m using Astro and not Shopify. However, I wanted to let you know this did not work.

I agree with you though. This specific ccss styling is too heavy-handed.

---

<div class="post-metadata">

**Author:** ![doom\_slayer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/doom_slayer/32/4664_2.png) [@doom\_slayer](https://forum.builder.io/u/doom_slayer)\
**Post date:** [August 9, 2023, 2:51pm UTC](https://forum.builder.io/t/builder-is-adding-margin-0-to-first-paragraph/3989/7 "2023-08-09T14:51:33Z")

</div>

I was able to get around this behavior by throwing in an [is:inline](https://docs.astro.build/en/reference/directives-reference/#isinline) directive on the Astro style tag with the `p:first-of-type` recommendation. I’m not sure why Builder is forcing `margin:0` on the first paragraph but it definitely threw a wrench in to my workflow. It would be nice if this was configurable.

---

<div class="post-metadata">

**Author:** ![millansingh](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@millansingh](https://forum.builder.io/u/millansingh)\
**Post date:** [April 17, 2024, 9:20pm UTC](https://forum.builder.io/t/builder-is-adding-margin-0-to-first-paragraph/3989/8 "2024-04-17T21:20:37Z")

</div>

This is still an issue. This (and other emotion css styles) are overriding my default

tag styles that I want to set for all

tags on the page.

---

<div class="post-metadata">

**Author:** ![amirfaisalz](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@amirfaisalz](https://forum.builder.io/u/amirfaisalz)\
**Post date:** [May 5, 2025, 6:33am UTC](https://forum.builder.io/t/builder-is-adding-margin-0-to-first-paragraph/3989/9 "2025-05-05T06:33:45Z")

</div>

Any updates, everyone? I’m having the same problem here, and I’m using Next.js.
