Categories
CSS & HTML Tips

You can actually use percentage values for padding and margin

Which seems quite new to me as I have never used any percentage values on them before. Took some tests and I found out that all major modern browsers supported percentage values for padding and margin very well, even IE6.

This should come very handy in positioning things up according to the parent width. See how I did with the title of this site: http://www.rackspacepromocode.com

rackspace cloud sites promo code

You can resize the browser window to see how there’s always a 8% left padding to the <h1> title.

By Yang Yang

Hello, I'm Yang. I build online businesses that please people. Want to join in and post some useful articles on Kavoir.com? Shoot me a message.

3 replies on “You can actually use percentage values for padding and margin”

Comments are closed.