[ New messages · Members · Forum rules · Search · RSS ]
Page 1 of 11
Coredownloadz Forum » Web developments and Ecommerce » Programming Softwares » Include different classes for different browsers (How to include classes for different browsers)
Include different classes for different browsers
guitarmantraDate: Thursday, 2009-06-04, 7:23 AM | Message # 1
Colonel
Group: Administrators
Messages: 220
Awards: 3
Reputation: 2
Status: Offline
Thanks to Microsoft and Internet Explorer, the bigger problem for every front-end developper is definitely cross-browser compatibility. Even if Internet Explorer introduced conditional tags to include styles only for IE, it can be good to be able to deal with other browsers as well.

This code works with the JQuery framework, so of course make sure you have it installed on your website.
Paste the following code in the head part of your html document or in a separate .js file:
Code

$(document).ready(function(){
     $('html').addClass($.browser);
});

Now you can preprend your styles with .msie, .mozilla, .opera, .safari or .other depending on the targeted browser.
Attachments: 6361583.jpg(16Kb)


www.coredownloadz.ucoz.com
 
FileServe BitShare emoticon(
Coredownloadz Forum » Web developments and Ecommerce » Programming Softwares » Include different classes for different browsers (How to include classes for different browsers)
Page 1 of 11
Search: