Page 192 - CSS
P. 192

To target Internet Explorer 6 and Internet Explorer 7, start your properties with *:


         .hide-on-ie6-and-ie7 {
             *display : none; // This line is processed only on IE6 and IE7
         }


        Non-alphanumeric prefixes (other than hyphens and underscores) are ignored in IE6 and IE7, so
        this hack works for any unprefixed property: value pair.


        Internet Explorer 8 only


        To target Internet Explorer 8, wrap your selectors inside @media \0 screen { }:


         @media \0 screen {
             .hide-on-ie8 {
                 display : none;
             }
         }


        Everything between @media \0 screen { } is processed only by I


        Adding Inline Block support to IE6 and IE7



         display: inline-block;


        The display property with the value of inline-block is not supported by Internet Explorer 6 and 7. A
        work-around for this is:


         zoom: 1;
         *display: inline;


        The zoom property triggers the hasLayout feature of elements, and it is available only in Internet
        Explorer. The *display makes sure that the invalid property executes only on the affected
        browsers. Other browsers will simply ignore the rule.

        Read Internet Explorer Hacks online: https://riptutorial.com/css/topic/5056/internet-explorer-hacks




























        https://riptutorial.com/                                                                             170
   187   188   189   190   191   192   193   194   195   196   197