How to resize text effectively with EM/REM units

Sdílet
Vložit
  • čas přidán 5. 10. 2021
  • Become a CSS wizard with my 6+ hour masterclass only at chriscourses.com/courses/css/...
    Em and Rem units are used to size your text elements relative to one another. By assigning em units to your elements, you can change all of their font sizes at once, simply by changing the font size of the elements' root tag. With rem units, you can change all elements' font size by changing the default font size of your root html tag.
    These two units come in very handy if you ever need to scale things up or down as your site grows. When to use each is a little tricky, so let's learn a little more on how to use each with the above video.

Komentáře • 44

  • @Heavenira
    @Heavenira Před 2 lety +32

    Never knew how these units worked, I just kinda threw text in a pile and mixed around their units until my site looked about right. Thank you for this excellent demonstration.

    • @webizy369
      @webizy369 Před rokem

      i think i never understand why should i use rem sadly instead of px

    • @dumptruck3354
      @dumptruck3354 Před rokem +4

      @@webizy369 pixels are absolute units whereas ems rems etc are relative units so if a user changes font size in their browser in case of pixels its hard coded so the text will not change but in case of rem units the text will change according to the root element so its better

  • @razerukat2134
    @razerukat2134 Před rokem +2

    The best video for Em and Rem for me. Short and covers what I need to know in just 3 minutes🤩

  • @floogi123
    @floogi123 Před 2 lety +12

    This just apreared in my recomended and as a new web developer this was a great and clear comparison between the units! You learn something new every day, and great video!

    • @ChrisCourses
      @ChrisCourses  Před 2 lety +2

      Glad it was helpful! I'm still learning every day just as well, so hope to continue sharing my knowledge as I go 🙌

  • @kumareshmusk
    @kumareshmusk Před 2 lety +8

    Edit's and visual exaplanation literally good 🔥

  • @jordanroywhite
    @jordanroywhite Před rokem +1

    Thank you! I finally took the time today to fully understand these units.
    By the way, your videos helped me a lot back in 2017-2018 when I was working on a project and needed to use HTML5 Canvas. You’re the man Chris!

  • @ShreyaskarART
    @ShreyaskarART Před 10 měsíci

    Your chris courses website clone was my first html css project, since then I've been learning and now Ive covered ReactJs. Thanks man! Underrated channel.

  • @ANSEYA89
    @ANSEYA89 Před rokem

    Em vs Rem explained in just 3 minutes, brilliant!

  • @cultistsash
    @cultistsash Před 2 lety

    This was very concise and easy to understand. Thank you. 🤘🏻

  • @Hello_VVolf
    @Hello_VVolf Před rokem

    wow, you are so underrated bro. You deserve more views!

  • @mananwebandall1203
    @mananwebandall1203 Před 2 lety +3

    your videos are of very high quality and awesome content, you deserve more than a Million subs

    • @ChrisCourses
      @ChrisCourses  Před 2 lety +1

      I wish man, don't get recommended very often from CZcams 😅

    • @QkysenQ
      @QkysenQ Před měsícem

      youtube is pathetic, you are the best!! thank u so much man but i guess it's for the good atleast now i can flex these skills infront of my mates hehe ^-^@@ChrisCourses

  • @caveman3703
    @caveman3703 Před 8 měsíci

    Very good editing and a good explanation

  • @BrennanCarpenfield
    @BrennanCarpenfield Před rokem

    Flawless video!

  • @johncharles4146
    @johncharles4146 Před rokem

    thanks for the excellent explanation.

  • @richardparker123
    @richardparker123 Před 2 lety +2

    STRAIGHT TO THE POINT?? OH MY GOSH THANK YOU. Thank you for not drawing this out for 12 minutes. I can’t stand that trend.
    I’m gonna have to go back and look at more of your videos.

    • @ChrisCourses
      @ChrisCourses  Před 2 lety +2

      Thanks man, just started doing some of these concise videos within the past couple of months, so admittedly don't have too many of them. Nevertheless, I think some of the code adventures and shorts are some of my best, so be sure to check them out!

  • @AmatuerHourCoding
    @AmatuerHourCoding Před 2 lety

    Sweet video!

  • @bluwoo8197
    @bluwoo8197 Před rokem

    this is beautiful

  • @gonglongdong6869
    @gonglongdong6869 Před rokem

    what are cool tools you used for making these cool footages ? :)

  • @SamiullahKhan
    @SamiullahKhan Před 2 lety +4

    Why I get the feeling of fireship 😀

    • @ChrisCourses
      @ChrisCourses  Před 2 lety +3

      Fireship definitely inspired me to do some ~2 minute videos, he's awesome.

  • @lipi6535
    @lipi6535 Před 2 lety

    Awesome explanation.

    • @ChrisCourses
      @ChrisCourses  Před 2 lety +1

      Thank you! Was a topic that used to trip me up-figured it could use some detailing.

  • @3bkareeno
    @3bkareeno Před rokem

    This is really helpful. Short and to the point. Thank you.

  • @kunalrajput4539
    @kunalrajput4539 Před rokem

    great video

  • @keyen3
    @keyen3 Před 2 lety

    This is a great video. Have you considered making these a series? Edit: nvm, I see you've made one. Watching now. Thanks

    • @ChrisCourses
      @ChrisCourses  Před 2 lety

      Thanks to your suggestion haha. Might try some shorts and see how those do, don't mind making these videos, they're typically quick and only take 2 days or so.

  • @afrasp570
    @afrasp570 Před měsícem

    Thanks

  • @abrandnewcompany
    @abrandnewcompany Před 2 lety

    Devloper for life

  • @arielp7582
    @arielp7582 Před rokem

    Love how you explained it unlike those other videos that take 25 minutes to explain it. If you need 25 minutes to explain em, them you're not a good teacher 😂

  • @-aravan
    @-aravan Před 2 lety

    the vedio is so good
    but what is the music name i lovet

  • @matthewd8970
    @matthewd8970 Před rokem

    So basically, if you use REM units, you only have to change the font-size on the html tag to basically grow/shrink your entire website?

  • @lakehighland
    @lakehighland Před 2 lety

    O hell ya nother CC yum yum yum

  • @SmashBro7510
    @SmashBro7510 Před 2 lety

    here's something fun to do, put the video in 2x speed and spam the left arrow key. Have fun :)

  • @edmundnokrach5291
    @edmundnokrach5291 Před 2 lety

    Im gonna be honest, I was suspicous after that gameplay you showed, but it wo

  • @Pyraptor
    @Pyraptor Před 2 lety

    em seems useless because you forgot the main point of em, thats an inherited property, so if you do something like p { font-size: 0.5em } , you can nest p tags and get smaller letters in each level of nesting. Kinda stupid use case anyways.

  • @Kamil-rf5qn
    @Kamil-rf5qn Před 3 měsíci +1

    Why do other youtubers need 15-20 minute videos to explain this concept and babble when this was explained perfectly in less than 3 minutes here....

  • @scienceblossom6197
    @scienceblossom6197 Před rokem

    I knew this but it doesn't "demystify" it really, how would a normal user who doesn't know dev-tools stuff increase root's font-size? How is it useful? I even read a Medium article on it that it's just hype and pixels are more explicit and readable and rems are one of those big of things that everyone boasts about but has no serious impact.