css3 - CSS Rem Unit for Element Sizes -


i've noticed rem unit can usable element's sizes, not font-sizes. , usefull html font-size property.

html { font-size:1vw } @media , (max-width:720px) {     html { font-size:10px } } #el { width:20rem;height:5rem } 

but proper , trustable?

i think thats you.

i apply:

  • rem font-sizes px callback, best !
  • em paddings , margins
  • px, %, vw , vh element sizes
  • and media queries use em, rem , px used too.

you can mess children element if use em font-size, not recommended.

rem size elements interesting, i'm enjoying lot vw , vh responsive behaviors cases % not enough.

and can cool stuff css calc function

like width: calc(100% - 85px); fixed size within design.

this recommended read units :) hope you.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -