# REM vs. PX in widgets

**URL:** <https://community.openhab.org/t/rem-vs-px-in-widgets/123458>\
**Category:** UIs\
**Created:** [June 11, 2021, 5:57am UTC](https://community.openhab.org/t/rem-vs-px-in-widgets/123458 "2021-06-11T05:57:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bernd\_Ritter](https://community.openhab.org/letter_avatar_proxy/v4/letter/b/71c47a/32.png) [@Bernd\_Ritter](https://community.openhab.org/u/Bernd_Ritter)\
**Post date:** [June 11, 2021, 5:57am UTC](https://community.openhab.org/t/rem-vs-px-in-widgets/123458/1 "2021-06-11T05:57:50Z")

</div>

Hello,  
in my widgets I have a mixture of REM and PX size declarations.  
I learned that REM depends on the font-size and therefore is better for correct scaling.

But also the other stuff in my widgets scales fine when using the Zoom-function of the browser.  
So when does this matter? Or this it matter at all for OH widgets?

Regards  
Bernd

---

<div class="post-metadata">

**Author:** ![Bernd\_Ritter](https://community.openhab.org/letter_avatar_proxy/v4/letter/b/71c47a/32.png) [@Bernd\_Ritter](https://community.openhab.org/u/Bernd_Ritter)\
**Post date:** [June 11, 2021, 8:16am UTC](https://community.openhab.org/t/rem-vs-px-in-widgets/123458/2 "2021-06-11T08:16:55Z")

</div>

After reading the long discussion at

> <https://stackoverflow.com/questions/11799236/should-i-use-px-or-rem-value-units-in-my-css>

I guess the answer is a clear “It depends” 😉
