Cross Browser (CSS) Compatibility (setting Browser Specific Property values of controls)
January 1, 2009 1 Comment
You would obviously have come across the “Browser Compatibility” issues many times while designing a webpage. For example, assigning a CSS class to any control may render well with IE but it may not get rendered that perfect way in Mozilla; and if you fix for Mozilla then IE rendering may get affected. But, we not only need to manage in between IE and Mozilla, but we also need to think about other browsers as well like Opera, Safari and Netscape etc, etc.
Here is one trick how you can you apply “Browser Specific” CSS to a control. That is, while assigning CssClass or Class to any control you can just prefix the browser name followed by colon to specify the Browser Specific CSS Class.
For Example, look at the below snippet,




