<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WpFunc &#187; chrome</title>
	<atom:link href="http://www.wpfunc.com/tag/chrome/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wpfunc.com</link>
	<description>Awesome, Quick, Simple WordPress Functions!</description>
	<lastBuildDate>Fri, 09 Jul 2010 09:05:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Detect User Browser And Apply A StyleSheet</title>
		<link>http://www.wpfunc.com/wordpress/detect-user-browser-and-apply-a-stylesheet.html</link>
		<comments>http://www.wpfunc.com/wordpress/detect-user-browser-and-apply-a-stylesheet.html#comments</comments>
		<pubDate>Tue, 15 Sep 2009 12:49:38 +0000</pubDate>
		<dc:creator>KaiseRCrazY</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[body]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[ns4]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=168</guid>
		<description><![CDATA[You can detect user/visitors browser type and you can apply browser-base css styleshet for your theme. That&#8217;s siple and very useful. Firstly you have add this code below to your theme&#8217;s function.php. Let&#8217;s Begin&#8230;

Her is the code;

&#60;?php
add_filter('body_class','browser_body_class');
function browser_body_class($classes) {
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;

if($is_lynx) $classes[] = 'lynx';
elseif($is_gecko) $classes[] = 'gecko';
elseif($is_opera) $classes[] = [...]<hr /><div style="text-align:center;">
<a href="http://aweber.com/?339698" title="Email Marketing">
<img src="http://www.aweber.com/banners/email_marketing/468x60_an.gif" alt="Email Marketing $19/Month!" style="border:none;" /></a>
</div><hr />


Related posts:<ol><li><a href='http://www.wpfunc.com/wordpress/small-security-hole-in-wordpress.html' rel='bookmark' title='Permanent Link: Small Security Hole in WordPress!'>Small Security Hole in WordPress!</a></li>
<li><a href='http://www.wpfunc.com/wordpress/udegbunam-asked-how-i-hide-my-content-from-ie6-users.html' rel='bookmark' title='Permanent Link: Udegbunam Asked &#8220;How i hide my content from IE6 Users?&#8221;'>Udegbunam Asked &#8220;How i hide my content from IE6 Users?&#8221;</a></li>
<li><a href='http://www.wpfunc.com/wordpress/how-to-add-author-name-to-author-archive.html' rel='bookmark' title='Permanent Link: How to Add Author Name to Author Archive'>How to Add Author Name to Author Archive</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">You can detect user/visitors browser type and you can apply browser-base css styleshet for your theme. That&#8217;s siple and very useful. Firstly you have add this code below to your theme&#8217;s function.php. Let&#8217;s Begin&#8230;<span id="more-168"></span></p>
<p style="text-align: justify;"><span class="attention">We will change our <strong>functions.php</strong>. If you don&#8217;t know about WordPress coding or PHP dont touch this file. And <strong>Make backup</strong> if you know about WP and PHP!</span></p>
<h3>Her is the code;</h3>
<pre class="brush: plain;">
&lt;?php
add_filter('body_class','browser_body_class');
function browser_body_class($classes) {
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;

if($is_lynx) $classes[] = 'lynx';
elseif($is_gecko) $classes[] = 'gecko';
elseif($is_opera) $classes[] = 'opera';
elseif($is_NS4) $classes[] = 'ns4';
elseif($is_safari) $classes[] = 'safari';
elseif($is_chrome) $classes[] = 'chrome';
elseif($is_IE) $classes[] = 'ie';
else $classes[] = 'unknown';

if($is_iphone) $classes[] = 'iphone';
return $classes;
}
?&gt;
</pre>
<p>After that you can save and upload to your fileserver. And you can create for all browser-base css files. And you can use this code with your <em>body</em> class like the example;</p>
<pre class="brush: plain;">&lt;body class=&quot;home blog logged-in safari&quot;&gt;
</pre>
<p><strong>That&#8217;s all! Have a nice day!</strong></p>
<a rel='nofollow' target='_blank'  href='http://delicious.com/post?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdetect-user-browser-and-apply-a-stylesheet.html&amp;title=Detect%20User%20Browser%20And%20Apply%20A%20StyleSheet&amp;notes=You%20can%20detect%20user%2Fvisitors%20browser%20type%20and%20you%20can%20apply%20browser-base%20css%20styleshet%20for%20your%20theme.%20That%27s%20siple%20and%20very%20useful.%20Firstly%20you%20have%20add%20this%20code%20below%20to%20your%20theme%27s%20function.php.%20Let%27s%20Begin...%0D%0A%0D%0A%0D%0AHer%20is%20the%20code%3B%0D%0A%5Bcode%5D%0D%0A%26lt%3B'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/delicious.png' class='sociable-img sociable-hovers ' title='del.icio.us' alt='del.icio.us' /></a><a rel='nofollow' target='_blank'  href='http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdetect-user-browser-and-apply-a-stylesheet.html&amp;title=Detect%20User%20Browser%20And%20Apply%20A%20StyleSheet&amp;bodytext=You%20can%20detect%20user%2Fvisitors%20browser%20type%20and%20you%20can%20apply%20browser-base%20css%20styleshet%20for%20your%20theme.%20That%27s%20siple%20and%20very%20useful.%20Firstly%20you%20have%20add%20this%20code%20below%20to%20your%20theme%27s%20function.php.%20Let%27s%20Begin...%0D%0A%0D%0A%0D%0AHer%20is%20the%20code%3B%0D%0A%5Bcode%5D%0D%0A%26lt%3B'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/digg.png' class='sociable-img sociable-hovers ' title='Digg' alt='Digg' /></a><a rel='nofollow' target='_blank'  href='http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdetect-user-browser-and-apply-a-stylesheet.html&amp;t=Detect%20User%20Browser%20And%20Apply%20A%20StyleSheet'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/facebook.png' class='sociable-img sociable-hovers ' title='Facebook' alt='Facebook' /></a><a rel='nofollow' target='_blank'  href='http://www.friendfeed.com/share?title=Detect%20User%20Browser%20And%20Apply%20A%20StyleSheet&amp;link=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdetect-user-browser-and-apply-a-stylesheet.html'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/friendfeed.png' class='sociable-img sociable-hovers ' title='FriendFeed' alt='FriendFeed' /></a><a rel='nofollow' target='_blank'  href='http://reddit.com/submit?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdetect-user-browser-and-apply-a-stylesheet.html&amp;title=Detect%20User%20Browser%20And%20Apply%20A%20StyleSheet'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/reddit.png' class='sociable-img sociable-hovers ' title='Reddit' alt='Reddit' /></a><a rel='nofollow' target='_blank'  href='http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdetect-user-browser-and-apply-a-stylesheet.html&amp;title=Detect%20User%20Browser%20And%20Apply%20A%20StyleSheet'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/stumbleupon.png' class='sociable-img sociable-hovers ' title='StumbleUpon' alt='StumbleUpon' /></a><a rel='nofollow' target='_blank'  href='http://technorati.com/faves?add=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdetect-user-browser-and-apply-a-stylesheet.html'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/technorati.png' class='sociable-img sociable-hovers ' title='Technorati' alt='Technorati' /></a><a rel='nofollow' target='_blank'  href='http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdetect-user-browser-and-apply-a-stylesheet.html&amp;partner=sociable'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/pdf.png' class='sociable-img sociable-hovers ' title='PDF' alt='PDF' /></a><a rel='nofollow' target='_blank'  href='http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdetect-user-browser-and-apply-a-stylesheet.html&amp;partner=sociable'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/printfriendly.png' class='sociable-img sociable-hovers ' title='Print' alt='Print' /></a><br/><br/>

<p>Related posts:<ol><li><a href='http://www.wpfunc.com/wordpress/small-security-hole-in-wordpress.html' rel='bookmark' title='Permanent Link: Small Security Hole in WordPress!'>Small Security Hole in WordPress!</a></li>
<li><a href='http://www.wpfunc.com/wordpress/udegbunam-asked-how-i-hide-my-content-from-ie6-users.html' rel='bookmark' title='Permanent Link: Udegbunam Asked &#8220;How i hide my content from IE6 Users?&#8221;'>Udegbunam Asked &#8220;How i hide my content from IE6 Users?&#8221;</a></li>
<li><a href='http://www.wpfunc.com/wordpress/how-to-add-author-name-to-author-archive.html' rel='bookmark' title='Permanent Link: How to Add Author Name to Author Archive'>How to Add Author Name to Author Archive</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpfunc.com/wordpress/detect-user-browser-and-apply-a-stylesheet.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
