<?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; body</title>
	<atom:link href="http://wpfunc.com/tag/body/feed" rel="self" type="application/rss+xml" />
	<link>http://wpfunc.com</link>
	<description>Awesome, Quick, Simple WordPress Functions!</description>
	<lastBuildDate>Thu, 01 Dec 2011 01:17:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</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://wpfunc.com/wordpress/detect-user-browser-and-apply-a-stylesheet.html</link>
		<comments>http://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></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;
After that you can save and upload to your fileserver. And you can create for all browser-base css files. [...]]]></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; title: ; notranslate">
&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; title: ; notranslate">&lt;body class=&quot;home blog logged-in safari&quot;&gt;
</pre>
<p><strong>That&#8217;s all! Have a nice day!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/detect-user-browser-and-apply-a-stylesheet.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

