CSS CSS Basics Understanding Values and Units Percentages


hey, well, how can I put this .. the pourcentage of the page, is limited at 100%, then why in some values we can pass 150%, I mean in font-sizes I get it, but in margins and paddings and stuffs, is that possible ? thanks !

2 Answers


The percentage value being used over the 100% can come in really handy in some circumstances but yes it is not used in all cases as with anything really its all about picking and choosing your moments.

For background images if you only want to use some of the image on a smaller div with your design increasing the size using percentages this can work really well.

There are limited cases were this use is good practice so using it for margins would be counter productive as well as padding but it is a very useful tool to have in the armory so well worth understanding the limits!

Hope this helps! Craig

thanks for clarifying it to me Craig, I appreciate !