hi all,
can anyone help on the fact that the "padding:5%" (or any other percentage) is not working in ie (i.e. ie7, which i have checked). It's working fine in FireFox.
thanks in advance.

9 Years
Discussion Span
Last Post by MidiMagic

Hi don't put % in css

give as pixel i will take in all browsers


Already I told to him same answer


Percent does work in padding. I use it all the time.

The problem is the main incompatibility between IE and the other browsers:

Putting size styles (width, height, or the size of an image) and nonzero surrounding styles (margin, border, padding) in the same tag or defined style causes the trouble.

IE puts the surrounding styles INSIDE the defined sizes.

All other browsers follow the standard and put the surrounding styles OUTSIDE the size styles.

The cure is to nest two tag pairs, one with the defined sizes, and the other with the surrounding styles. Use a div pair for the extra tag pair. Now you can control the order of nesting.

This will fix the problem. It also fixes IE object positioning problems.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.