The Ultimate CSS Hack Pt. 2
Until all web browsers begin to interpret CSS correctly, the CSS Hack is a necessary evil. Although the series will address Internet Explorer, Safari and Opera, Firefox hacks are simply not necessary. In short, Firefox is head and shoulders above all other browsers in terms of rendering CSS correctly, so a good rule of thumb is: Write for Firefox, hack the others.Safari
Remember the "linear rule" we discussed in Pt. 1? If not, take a moment to refresh your memory before we continue. Using the "linear rule," Safari hacks are easy. Whenever CSS syntax includes the # sign in the exact location as shown below, Safari will ignore the entire CSS rule, and any other rules that follow after the # sign is read.
body {
background-color: black;
}
body {
background-color: white;#}
In the above example, ALL browsers other than Safari will have a white background. Because Safari ignores the second rule, it will show a black background. Pretty easy huh?
In general, Safari is pretty good with CSS compliance, but because Safari does NOT support styled forms, hacks are especially useful in this area.
Net Up: Opera



<< Home