Posts

Showing posts from June 5, 2011

Simplest CSS hack Ever

Simple, just put '//' in front of any valid css declaration , most of the other browser will treat this as comment and ignore it, while our friend Internet Explorer will not treat this as comment and render the property. <style> .test{      color:red;      //color:green; } </style> <p class='test'>I will be green in Internet Explorer, red in all other browsers</p>