kendalwood Posted March 10, 2011 Share Posted March 10, 2011 Is there a Chrome tag like this IE one <!--[if IE]> <![endif]--> <!--[if !IE]><!--> <!--<![endif]--> I have use the above tag in my wordpress site, and the only browser it doesn't work in is Google Chrome. Quote Link to comment https://forums.phpfreaks.com/topic/230225-google-chrome-tag/ Share on other sites More sharing options...
HuggieBear Posted March 10, 2011 Share Posted March 10, 2011 This is a PHP forum, and that isn't PHP. Those look HTML comments to aid CSS rules. Quote Link to comment https://forums.phpfreaks.com/topic/230225-google-chrome-tag/#findComment-1185642 Share on other sites More sharing options...
HuggieBear Posted March 10, 2011 Share Posted March 10, 2011 In PHP you could try checking $_SERVER["HTTP_USER_AGENT"] for the string, as mine shows up as this Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13 Quote Link to comment https://forums.phpfreaks.com/topic/230225-google-chrome-tag/#findComment-1185646 Share on other sites More sharing options...
cssfreakie Posted March 11, 2011 Share Posted March 11, 2011 and no there is no chrome tag Quote Link to comment https://forums.phpfreaks.com/topic/230225-google-chrome-tag/#findComment-1186055 Share on other sites More sharing options...
silkfire Posted March 11, 2011 Share Posted March 11, 2011 I do browser sniffing very often when I want a site to look identical in Chrome (which is same as Safari/WebKit), IE and Firefox, especially with CSS: ... style="width: 190px; margin-top: 12px; <?=((strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') !== false) ? 'font-family: "Tahoma"; font-size: 17px; height: 16px;' : 'font-size: 13px')?>"> Quote Link to comment https://forums.phpfreaks.com/topic/230225-google-chrome-tag/#findComment-1186057 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.