Sunday, May 11, 2008

Stokely CSS Hack for Macintosh Safari Browser

This new Safari Hack should be hidden from Mozilla, Netscape for PC, Ie4-6 PC, IE 4-5 Mac, Netscape for MAC, and Opera. It uses a hack to narrow the agents focus, then relies on a difference in how IE 6, Safari, and Netscape parse properties using brackets [].

/*\*/
html*#test1 {
[color:blue;/*seen only by safari*/
font-size:30px;
font-weight:bold;

]color:green;/*seen only by IE6 for PC*/
_font-size:12px;
_font-weight:normal;
}/**/

Or

/*\*/
html*#test2 {
color:blue;/*seen only by safari*/
font-size:30px;
font-weight:bold;
_color:green;/*seen only by IE6 for PC*/
_font-size:12px;
_font-weight:normal;
}/**/

No comments: