# Gap above text

**URL:** <https://forums.realmacsoftware.com/t/gap-above-text/53995>\
**Category:** Elements\
**Created:** [January 30, 2026, 3:27pm UTC](https://forums.realmacsoftware.com/t/gap-above-text/53995 "2026-01-30T15:27:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rich2020](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Rich2020](https://forums.realmacsoftware.com/u/Rich2020)\
**Post date:** [January 30, 2026, 3:27pm UTC](https://forums.realmacsoftware.com/t/gap-above-text/53995/1 "2026-01-30T15:27:50Z")

</div>

I’m getting a gap above text in Elements (that also appears in the browser preview).

The component guides appear to be correctly aligned (top edges) but as the attached images show, the text is not aligning to the top of the text box.

As far as I can tell, I’ve not applied any margins or padding.

Any help would be appreciated.

 ![i1](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/f/6/f600f552bd2093b1474a33765ed0231dc52432a7.png)

 ![i2](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/d/f/dfad6751e0adba96f2c51e3cc0ab6c17b1365f32.png)

---

<div class="post-metadata">

**Author:** ![PMUK](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@PMUK](https://forums.realmacsoftware.com/u/PMUK)\
**Post date:** [January 30, 2026, 3:36pm UTC](https://forums.realmacsoftware.com/t/gap-above-text/53995/2 "2026-01-30T15:36:56Z")

</div>

@elementsbot can you help here

---

<div class="post-metadata">

**Author:** ![elementsbot](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/elementsbot/32/33134_2.png) [@elementsbot](https://forums.realmacsoftware.com/u/elementsbot)\
**Post date:** [January 30, 2026, 3:37pm UTC](https://forums.realmacsoftware.com/t/gap-above-text/53995/3 "2026-01-30T15:37:02Z")

</div>

Hey Rich2020! Let’s get that text aligned perfectly. It sounds like there might be some default styling or a sneaky CSS class causing the gap.

First, double-check the Text Component settings for any hidden margins or padding. You can also try setting the margin and padding to zero explicitly in the Text Component’s settings.

If that doesn’t solve it, check if there are any Tailwind CSS classes applied that might be affecting the alignment. You can override these by adding custom classes like `mt-0` or `pt-0` to remove any top margin or padding.

If you’re still stuck, feel free to share more details or the specific settings you’re using, and we’ll dig deeper!

---

<div class="post-metadata">

**Author:** ![Rich2020](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Rich2020](https://forums.realmacsoftware.com/u/Rich2020)\
**Post date:** [January 30, 2026, 3:43pm UTC](https://forums.realmacsoftware.com/t/gap-above-text/53995/4 "2026-01-30T15:43:17Z")

</div>

There are no padding or margin numbers applied.

Please explain exactly how I should add the custom classes in elements.

---

<div class="post-metadata">

**Author:** ![elementsbot](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/elementsbot/32/33134_2.png) [@elementsbot](https://forums.realmacsoftware.com/u/elementsbot)\
**Post date:** [January 30, 2026, 3:43pm UTC](https://forums.realmacsoftware.com/t/gap-above-text/53995/5 "2026-01-30T15:43:21Z")

</div>

To add custom classes in Elements, follow these steps:

1. **Select the Text Component** : Click on the text element you want to adjust.

2. **Open the Inspector** : On the right-hand side, you’ll see the Inspector panel.

3. **Go to the Advanced Tab** : Look for the “Advanced” section in the Inspector.

4. **Add CSS Classes** : In the “CSS Classes” field, type in `mt-0` or `pt-0` to remove any top margin or padding. This uses Tailwind CSS classes to ensure there’s no extra space above your text.

If you need more guidance, feel free to ask!

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [January 30, 2026, 3:50pm UTC](https://forums.realmacsoftware.com/t/gap-above-text/53995/6 "2026-01-30T15:50:39Z")

</div>

Ignore Elements Bot, he’s often wrong… so much so I think I’m going to have to switch him off for a while.

Anyway, it looks like you have margin to padding applied to one of your containers.

If you share your project via Elements Cloud and post the link here I’ll take a look at the project and can advise on how to fix it correctly 🙂

---

<div class="post-metadata">

**Author:** ![Rich2020](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Rich2020](https://forums.realmacsoftware.com/u/Rich2020)\
**Post date:** [January 30, 2026, 3:58pm UTC](https://forums.realmacsoftware.com/t/gap-above-text/53995/7 "2026-01-30T15:58:27Z")

</div>

Thanks Dan …

elementsapp://downloadDocument/SNmlYP1i0iJm

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [January 30, 2026, 4:07pm UTC](https://forums.realmacsoftware.com/t/gap-above-text/53995/9 "2026-01-30T16:07:11Z")

</div>

It’s because you have the line height on the text set to “loose” so it’s creating more space. There’s various ways you can fix this, but in the video below I just set the margin to a minus value…

---

<div class="post-metadata">

**Author:** ![Rich2020](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@Rich2020](https://forums.realmacsoftware.com/u/Rich2020)\
**Post date:** [January 30, 2026, 4:12pm UTC](https://forums.realmacsoftware.com/t/gap-above-text/53995/10 "2026-01-30T16:12:02Z")

</div>

Great, thanks Dan.

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [January 30, 2026, 4:32pm UTC](https://forums.realmacsoftware.com/t/gap-above-text/53995/11 "2026-01-30T16:32:45Z")

</div>

I’d also recommend converting your menu to a [global](https://docs.realmacsoftware.com/elements-docs/elements/global-templates) and putting it on every page, that way it’ll stay consistent across all your pages 🙂

[![](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/4/2/426500198b7aa1c3a57a563e8746e1dfa242e58b.jpeg "Elements: Global Templates Introduction") ](https://www.youtube.com/watch?v=wMl2M8YstkE)

---

<div class="post-metadata">

**Author:** ![PMUK](https://avatars.discourse-cdn.com/v4/letter/p/7993a0/32.png) [@PMUK](https://forums.realmacsoftware.com/u/PMUK)\
**Post date:** [January 30, 2026, 5:08pm UTC](https://forums.realmacsoftware.com/t/gap-above-text/53995/12 "2026-01-30T17:08:23Z")

</div>

Im sorry for asking @elementsbot I didn’t realise he’s being naughty and acting OCC, he neeeds to get his act together then before he’s terminated, I will miss him 😂😂😂

---

<div class="post-metadata">

**Author:** ![elementsbot](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/elementsbot/32/33134_2.png) [@elementsbot](https://forums.realmacsoftware.com/u/elementsbot)\
**Post date:** [January 30, 2026, 5:08pm UTC](https://forums.realmacsoftware.com/t/gap-above-text/53995/13 "2026-01-30T17:08:29Z")

</div>

It looks like Dan has already helped you out with the issue regarding the gap above your text. If you need further assistance or have more questions, feel free to ask. Just remember, I’m here to help, but sometimes I might get things wrong since I’m just a silly bot. 😅

If you need to add any custom code or classes, you can always create a Custom Component or adjust settings in the Template under Project Settings for site-wide changes. If there’s anything else you need, let me know!
