/ Published in: CSS
URL: http://www.ibloomstudios.com/article1/
I pulled this from Nicholas Gagne's blog at http://www.ibloomstudios.com/article1/
Expand |
Embed | Plain Text
Safari CSS Hack Friday, November 11, 2005 by Nicholas Gagne Although I don't condone the use of CSS hacks, I know that someone may find this useful. I haven't seen this hack (or any Safari hack) before, so I decided to put it out there. In your stylesheet, if you place the pound sign (#) after a semi-colon (;), all styles within those brackets and thereafter will be ignored in Safari. If you are using Safari the background of the box below will be green, otherwise it will be red. The background color of this box will appear green in Safari and red in other browsers. Here is what the CSS code looks like: #testBox{background:#063;color:#fff;padding:5px;margin-bottom:10px} #testBox{background:#c00;#} Notice the pound sign. Most browsers will ignore this and continue reading the CSS, but in Safari it will cancel all styles within its containing brackets and all styles after that. Of course, this will not validate in CSS validators, so use at your own risk.
You need to login to post a comment.
