# Style kirbytext()

**URL:** <https://forum.getkirby.com/t/style-kirbytext/30970>\
**Category:** Questions\
**Tags:** v4\
**Created:** [March 1, 2024, 2:57pm UTC](https://forum.getkirby.com/t/style-kirbytext/30970 "2024-03-01T14:57:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![OPopp](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/opopp/32/14961_2.png) [@OPopp](https://forum.getkirby.com/u/OPopp)\
**Post date:** [March 1, 2024, 2:57pm UTC](https://forum.getkirby.com/t/style-kirbytext/30970/1 "2024-03-01T14:57:23Z")

</div>

Hello!

I am wondering. How can I style some text that I get through kirbytext() from a textarea field?  
I am using tailwind an it doesnt apply non of my textstyles.

`<p class="text-sm text-pink"><?= $page->foerdervereininfo_text()->kt() ?></p>`

Anyone got a hint in which direction to look?

Thank you!

---

<div class="post-metadata">

**Author:** ![GB\_DESIGN](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/gb_design/32/14956_2.png) [@GB\_DESIGN](https://forum.getkirby.com/u/GB_DESIGN)\
**Post date:** [March 1, 2024, 3:08pm UTC](https://forum.getkirby.com/t/style-kirbytext/30970/2 "2024-03-01T15:08:15Z")

</div>

> [@OPopp](#):
>
> \<?= $page-\>foerdervereininfo\_text()-\>kt() ?\>

Herewith…

```auto
<p class="text-sm text-pink">
<?= $page->foerdervereininfo_text()->kt() ?>
</p>

```

…you will enclose the text block with an additional `<p>` tag, which is undesirable in your case.

```auto
<p class="text-sm text-pink">
<p>This is my textblock</p>
</p>

```

Add **inline()** to the output:

```auto
<p class="text-sm text-pink">
<?= $page->foerdervereininfo_text()->kt()->inline() ?>
</p>

```

> **[$field-\>inline()](https://getkirby.com/docs/reference/templates/field-methods/inline)**
>
> Strips all block-level HTML elements from the field value, it can be safely placed inside of other inline elements without the risk of breaking the HTML structure.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 1, 2024, 3:08pm UTC](https://forum.getkirby.com/t/style-kirbytext/30970/3 "2024-03-01T15:08:20Z")

</div>

See [Kirby meets Tailwind CSS | Kirby CMS](https://getkirby.com/docs/cookbook/setup/kirby-meets-tailwindcss#limitations)

This still has shortcomings if you want to apply extra classes to particular parts within the text.

So you either need to add your tags/classes directly in Markdown, or use Kirbytags for these text parts.

Inlining kirbytext as proposed by @GB_DESIGN only makes sense for single lines of text, not for text spanning multiple p tags.

---

<div class="post-metadata">

**Author:** ![OPopp](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/opopp/32/14961_2.png) [@OPopp](https://forum.getkirby.com/u/OPopp)\
**Post date:** [March 1, 2024, 3:10pm UTC](https://forum.getkirby.com/t/style-kirbytext/30970/4 "2024-03-01T15:10:56Z")

</div>

Great. Thanks for the input!
