CSS Units for Layouts

Units you should know:

  • px – fixed pixel size
  • % – percentage of parent element
  • em, rem – relative to font-size
  • vw, vh – viewport width and height
  • fr – fractional unit used in Grid

Practice Task:
Try building the same layout using px, %, and fr to see how they behave differently.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *