You can actually use percentage values for padding and margin

by Yang Yang on September 21, 2009

Share This Article:
Subscribe to Kavoir: blog feed

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.

Share This Article:
Subscribe to Kavoir: blog feed

You should also read:

{ 3 comments… read them below or add one }

Yang Yang September 27, 2009 at 3:34 pm

oh is it really, let me give it a test

– migration test

Reply

Yang Yang September 27, 2009 at 8:52 pm

I love the show ip addon of firefox!

Reply

Yang Yang September 29, 2009 at 8:48 am

Is this really working?

Reply

Leave a Comment

Previous post:

Next post: