Monday, March 4, 2024

css unit's explained

  • px is fixed doesn't resize
  • rem is better for most
  • em for margins paddings widths

ems inherit the sizing from parents.

  • % relative to parent

  • vw/vh similar to ems

  • ch character length
    ch60 for average block of text.
    sets how long a line should be

No comments:

Post a Comment