Forum Moderators: not2easy

Message Too Old, No Replies

css rules for different browsers.

         

cdmn

10:50 am on Mar 10, 2007 (gmt 0)

10+ Year Member



Hi,

just wondering, if its possible to apply css rules to different browsers.

*html or expression goes to IE.
And what about FF, OP?

Robin_reala

11:03 am on Mar 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There’s no official way to do so. Microsoft invented ‘conditional comments’ which allow you to do so for IE but for other browsers you’ll generally have to resort to CS hacks. Hacks in this sense are generally bugs in various browsers’ CSS parsers. Of course, as they’re bugs they will probably be fixed in later releases, so hacks aren’t by any means exact - it’s a permanently moving target.

I usually find it useful when coming across a situation where browsers are behaving differently to re-examing my initial code. Is it actually doing what I think it should? Can I get the effect I want in a different and more compatible way?

cdmn

11:09 am on Mar 10, 2007 (gmt 0)

10+ Year Member



I have an issue with input text field.
The font is set to 11px, and all 3 browsers react to this rule differently.

FF: lifts the field up for 2px
OP: for 1px
IE: does nothing (good)

Of course i can fix, lets say ff, with:

position: relative;
top: -2px;
top: expression(0);

But then OP goes wrong for 1px... its closed circle :/