Monday, May 4, 2009

Some scenarios, we need to apply styles only specific to browser. So, here is a small way to hack apply styles only for IE - We need to add inline comments (//) at start of the line.
min-height:300px; /*For other browsers*/
//min-height:380px; /*For IE */

// comments won't read by Mozilla.

Categories: , ,

1 comment:

  1. Great i never knew this one.

    What i was using was
    *html min-height:200px; //for IE6 specific


    *+html min-height:200px; //works for every version greater than or equal to IE6