# Bind flexible fontsize to richttext

**URL:** <https://community.weweb.io/t/bind-flexible-fontsize-to-richttext/17719>\
**Category:** How do I?\
**Created:** [April 10, 2025, 10:47pm UTC](https://community.weweb.io/t/bind-flexible-fontsize-to-richttext/17719 "2025-04-10T22:47:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![StefanSan](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@StefanSan](https://community.weweb.io/u/StefanSan)\
**Post date:** [April 10, 2025, 10:47pm UTC](https://community.weweb.io/t/bind-flexible-fontsize-to-richttext/17719/1 "2025-04-10T22:47:04Z")

</div>

Hello,

i want to bring a link in a textblock.  
(like this: here starts the normal textblock an then the Linktext comes and then the normal text goes on.)

i find out, that i can do that with the richtext-element.

but now i have the problem, that i cant bind a formula to the font-size of the richttext-element. but my fontsize depends on the screenwidth and some values in a variable.

how can i bring a formula to the richttextfields font-size?

thank you for help.  
stefan

---

<div class="post-metadata">

**Author:** ![StefanSan](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@StefanSan](https://community.weweb.io/u/StefanSan)\
**Post date:** [April 11, 2025, 12:03pm UTC](https://community.weweb.io/t/bind-flexible-fontsize-to-richttext/17719/2 "2025-04-11T12:03:34Z")

</div>

Ok, i think i must put some classes into the richtext and add some custom style css…

---

<div class="post-metadata">

**Author:** ![thijs](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/thijs/32/13651_2.png) [@thijs](https://community.weweb.io/u/thijs)\
**Post date:** [April 22, 2025, 10:20am UTC](https://community.weweb.io/t/bind-flexible-fontsize-to-richttext/17719/3 "2025-04-22T10:20:12Z")

</div>

Hi @StefanSan ,

You can control the fonts withini the rich text element by adding an HTML-element above it containing something like this:

![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/78155d43d291a6a95f392d8932a5a513b725bbb9.png)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/be19d34b86fbf647376eae09ec3d16f4c4648064.png)

---

<div class="post-metadata">

**Author:** ![StefanSan](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@StefanSan](https://community.weweb.io/u/StefanSan)\
**Post date:** [April 22, 2025, 11:31am UTC](https://community.weweb.io/t/bind-flexible-fontsize-to-richttext/17719/4 "2025-04-22T11:31:51Z")

</div>

Thank you very much. That is the way i go.
