html - Padding: 1% to be equal of 1% body width -


i'm learning rwd myself , came idea use 1% padding in every box/div/element, site looks smart, pixel-perfect , responsive. however, 1% padding based on parent element's width, not on body's width. there way walk through problem?

you can use vh , vw css units of measure. stands viewport height , and viewport width 1vh 1% of viewport height.

the great thing counts real dimension versus of percentage, looks parent element.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -