How many times have you wondered what 100% means in this context? Maybe not as many as this
in JavaScript ;), but it’s worth getting to know it better once and for all (or at least having a quick cheatsheet).
CSS property | Percentage value meaning |
---|---|
height | % of parent’s height |
width | % of parent’s width |
top | % of parent’s height |
left | % of parent’s width |
margin-top | % of parent’s width |
margin-left | % of parent’s width |
padding-top | % of parent’s width |
padding-left | % of parent’s width |
translate-top | % of self’s height |
translate-left | % of self’s width |
Newsletter
Level up your skills with useful web development & UX tips via e-mail.
Comments
If you have any thoughts, please contact me on LinkedIn or see the contact page for more options.