Hello Guys i am Facing a problem which is annoying ..

If i use " width=100%; " Site Works Fine on Internet Explorer, But Not on Firefox.
If i use " width=auto; " Site Works Fine in Firefox but not on Internet Explorer.

Can anybody tell me how to fix this or can anybody tell me a way in which we can guess Browser like.

Like if Browser is Firefox then Use stylefox.css.
If Browser is Internet Explorer, then use styleie.css.

9 Years
Discussion Span
Last Post by MidiMagic

You didn't tell me how the site fails, or provide a link to the site.

Don't use either of the choices you gave. They are deprecated. Use CSS with width: 100%; Remember that IE and FF handle the styles surrounding block objects differently.

When you have a block object with a defined size:

- FF puts the surrounding styles (margin, border, padding) OUTSIDE the defined size.

- IE crams the surrounding styles INSIDE the defined size.

The cure is to not put surrounding styles on block objects of a defined size. Instead, nest two block objects (e.g. divs), one with surrounding styles and the other with the defined size. Nest them in the order you want the measurements to take effect.

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.