Is there a simple conditional statement, css command, html, jquery, javascript or simple PHP dynamic way of detecting the current browser?
Using javascript:
navigator.appCodeName
Stores the browser codename:
navigator.appName
Is the name of the browser.
But I would recommend using jQuery for more efficiency and less headaches:
if ($.browser.webkit) {
$("#div ul li").css( "display","inline-table" );
} else if ( $.browser.msie ) {
$("#div ul li").css( "display","inline" );
} else {
$("#div ul li").css( "display","inline-table" );
}
EDIT: According to jQuery.com:
webkit (Chrome and Safari)
safari (deprecated)
opera
msie (Internet Explorer)
mozilla (Firefox)
Source: JQuery Site