<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/em-rem-and-px-csp6ku0mc" -->

---
title: em, rem, and px | daily.dev
description: Pixels, EM’S, and REM’s are popular in the CSS world. They are often confused and mistaken with one another. em, rem, and px Ritchie Pulikottil will help you...
canonical: https://daily.dev/posts/em-rem-and-px-csp6ku0mc
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: em, rem, and px | daily.dev
og:description: Pixels, EM’S, and REM’s are popular in the CSS world. They are often confused and mistaken with one another. em, rem, and px Ritchie Pulikottil will help you...
og:url: https://daily.dev/posts/em-rem-and-px-csp6ku0mc
og:image: https://api.daily.dev/og/posts/csP6ku0Mc.png
og:image:alt: em, rem, and px
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# em, rem, and px

**[gitconnected](https://daily.dev/sources/gc)** · 3 min read · 52 upvotes · 5 comments

## Summary

Pixels, EM’S, and REM’s are popular in the CSS world. They are often confused and mistaken with one another. em, rem, and px Ritchie Pulikottil will help you understand these three knights of the internet.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://ritchiepulikottil.medium.com/em-rem-and-px-e147619c26ee>

## Community discussion

Top comments from developers on daily.dev.

**@sharansharma19** · 4 upvotes

> em : relative to it's parent
> Example div:16px inside p:2rem means 32px
>
> problem to many nested em can be mess up so rem came to rescue
>
> REM : always relative to root html

**@neeraj1005** · 1 upvotes

> Wow! amazing.. Its clear my thoughts related to em, rem and px... So basically the rem is more powerfull and usefull regarding to other (em, px).

**@braydentw** · 1 upvotes

> Wow 🤩 I always procrastinated to learn these fundamental concepts. I’m so glad I read this :D

**@doutir** · 1 upvotes

> So rem is more recommended when building something responsive? Rem is responsive correct?

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#css](https://daily.dev/tags/css)

[View this post on daily.dev](https://daily.dev/posts/em-rem-and-px-csp6ku0mc)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"em, rem, and px","url":"https://daily.dev/posts/em-rem-and-px-csp6ku0mc","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/em-rem-and-px-csp6ku0mc"},"datePublished":"2020-11-15T17:41:19.475Z","dateModified":"2021-10-07T14:17:10.317Z","description":"Pixels, EM’S, and REM’s are popular in the CSS world. They are often confused and mistaken with one another. em, rem, and px Ritchie Pulikottil will help you...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f5e65057692ecd8af057c6f7c535de77","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f5e65057692ecd8af057c6f7c535de77","isAccessibleForFree":true,"articleSection":"gitconnected","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"gitconnected","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/gc","url":"https://daily.dev/sources/gc"},"commentCount":5,"discussionUrl":"https://daily.dev/posts/em-rem-and-px-csp6ku0mc","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":52},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":5}],"keywords":"css","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"gitconnected","item":"https://daily.dev/sources/gc"},{"@type":"ListItem","position":3,"name":"em, rem, and px"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/em-rem-and-px-csp6ku0mc","comment":[{"@type":"Comment","text":"em : relative to it’s parent\nExample div:16px inside p:2rem means 32px\nproblem to many nested em can be mess up so rem came to rescue\nREM : always relative to root html","datePublished":"2020-11-15T20:43:49.561Z","url":"https://daily.dev/posts/csP6ku0Mc#c-C8PE07vQF","author":{"@type":"Person","name":"sharan","url":"https://daily.dev/sharansharma19","image":"https://media.daily.dev/image/upload/f_auto/v1636206725/avatars/W-Q7QWo1y"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4}},{"@type":"Comment","text":"Wow! amazing… Its clear my thoughts related to em, rem and px… So basically the rem is more powerfull and usefull regarding to other (em, px).","datePublished":"2020-11-16T04:37:24.334Z","url":"https://daily.dev/posts/csP6ku0Mc#c-08bxxn5eC","author":{"@type":"Person","name":"Neeraj Singh Tangariya","url":"https://daily.dev/neeraj1005","image":"https://lh3.googleusercontent.com/a-/AOh14GjX9wb8Rxn2w3QhkBxwR465ZOzsMUAYCuqGnUwwrQ=s100"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"Wow 🤩 I always procrastinated to learn these fundamental concepts. I’m so glad I read this :D","datePublished":"2020-11-18T15:19:10.507Z","url":"https://daily.dev/posts/csP6ku0Mc#c-CJxY2j_eS","author":{"@type":"Person","name":"Brayden W","url":"https://daily.dev/braydentw","image":"https://avatars1.githubusercontent.com/u/47185402?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"So rem is more recommended when building something responsive? Rem is responsive correct?","datePublished":"2020-11-19T00:23:04.949Z","url":"https://daily.dev/posts/csP6ku0Mc#c-RLGTg2FI4","author":{"@type":"Person","name":"Nathan Guedes","url":"https://daily.dev/doutir","image":"https://avatars2.githubusercontent.com/u/38724911?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
```

