100% in CSS can mean different things

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 propertyPercentage 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
Source: What does 100% mean in CSS?


Level up your skills with useful UX, web development, and productivity tips via e-mail.


If you have any thoughts, please contact me on LinkedIn or see the contact page for more options.