<?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>Daniel Dumas &#187; Tutorials</title>
	<atom:link href="http://danieldumas.com/tag/tutorials/feed" rel="self" type="application/rss+xml" />
	<link>http://danieldumas.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 30 Apr 2012 06:16:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Separating CSS Style sheet for Different Browsers using PHP</title>
		<link>http://danieldumas.com/separating-css-style-sheet-for-different-browsers-using-php.php</link>
		<comments>http://danieldumas.com/separating-css-style-sheet-for-different-browsers-using-php.php#comments</comments>
		<pubDate>Mon, 15 Sep 2008 22:25:34 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://danieldumas.com/?p=76</guid>
		<description><![CDATA[Separating Stylesheet for IE6, Internet Explorer, Firefox, Opera, Safari, Chrome, and other browser.]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Hi everyone today im going to start my tips / tutorials in web development, and i will focus today on separating a stylesheet for different browsers. if you read my last post i talked about separating my blog style sheet using php because IE6(Internet Explorer 6.0) handled my layout differently than version  7.0 and other browser like Firefox, Opera, Safari and Google Chrome. actually the only problem that i encountered with IE6 is its incompatibility to render transparent .PNG images and some spacing issues, the <span id="more-76"></span>transparent corners of my images becomes grayish when i use IE6 to access my site. so what i did is.. i use PHP to display .GIF images when the visitor is using IE6 and .PNG when not. . i use the function <em>String Find</em> and the Super Global Varialble <em>$_SERVER</em> to get my visitors browser information. .</p>
<p style="text-align: justify;">here is the actual code that i use. .</p>
<pre name="code" class="php">&lt;?php $browser = $_SERVER['HTTP_USER_AGENT']; ?&gt;
&lt;?php if (strstr($browser, "MSIE 6.0")) { ?&gt;
&lt;link rel="stylesheet" href="ie6style.css" type="text/css" media="screen" /&gt;
&lt;?php }else{ ?&gt;
&lt;link rel="stylesheet" href="default.css" type="text/css" media="screen" /&gt;
&lt;?php } ?&gt;</pre>
<p style="text-align: justify;"><em>$_SERVER['HTP_USER_AGENT']</em> will return the users browser information, which i inserted in the variable <em>$browser, </em>then i use the string function <em>strstr</em> which is String Find. for IE6 use &#8220;MSIE 6.0&#8243;, IE7 &#8220;MSIE 7.0&#8243; for all versions of Internet Explorer just use &#8220;MSIE&#8221;.</p>
<p style="text-align: justify;">to separate styles of other browser you may use the following in the string find function. .</p>
<p><strong>IE &#8211; &#8220;MSIE&#8221;</strong></p>
<p><strong>Firefox &#8211; &#8220;Firefox&#8221;</strong></p>
<p><strong>Safari &#8211; &#8220;Safari&#8221;</strong></p>
<p><strong>Opera &#8211; &#8220;Opera&#8221;</strong></p>
<p><strong>Chrome &#8211; &#8220;Chrome&#8221;</strong></p>
<p>for specific browser version just type space after the browser name then type the version number.</p>
<p>if you are separating style only for Internet Explorer you may also use Conditional Statement</p>
<p>this does not require PHP or Javacript.</p>
<p>the code is.</p>
<pre name="code" class="html">&lt;!--[if IE]&gt;
// put your ie stylesheet here
&lt;![endif]--&gt;</pre>
<pre name="code" class="html">&lt;!--[if !IE]--&gt;
// put your default stylesheet here
&lt;![endif]--&gt;</pre>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-shr">
<ul class="socials">
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://danieldumas.com/separating-css-style-sheet-for-different-browsers-using-php.php&amp;t=Separating+CSS+Style+sheet+for+Different+Browsers+using+PHP" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://danieldumas.com/separating-css-style-sheet-for-different-browsers-using-php.php&amp;feed=comments-rss2" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://danieldumas.com/separating-css-style-sheet-for-different-browsers-using-php.php&amp;title=Separating+CSS+Style+sheet+for+Different+Browsers+using+PHP" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://danieldumas.com/separating-css-style-sheet-for-different-browsers-using-php.php&amp;title=Separating+CSS+Style+sheet+for+Different+Browsers+using+PHP" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://danieldumas.com/separating-css-style-sheet-for-different-browsers-using-php.php&amp;title=Separating+CSS+Style+sheet+for+Different+Browsers+using+PHP&amp;srcUrl=http://danieldumas.com/separating-css-style-sheet-for-different-browsers-using-php.php&amp;srcTitle=Separating+CSS+Style+sheet+for+Different+Browsers+using+PHP&amp;snippet=Separating%20Stylesheet%20for%20IE6%2C%20Internet%20Explorer%2C%20Firefox%2C%20Opera%2C%20Safari%2C%20Chrome%2C%20and%20other%20browser." rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://danieldumas.com/separating-css-style-sheet-for-different-browsers-using-php.php&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://danieldumas.com/separating-css-style-sheet-for-different-browsers-using-php.php&amp;title=Separating+CSS+Style+sheet+for+Different+Browsers+using+PHP" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://danieldumas.com/separating-css-style-sheet-for-different-browsers-using-php.php&amp;title=Separating+CSS+Style+sheet+for+Different+Browsers+using+PHP" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://technorati.com/faves?add=http://danieldumas.com/separating-css-style-sheet-for-different-browsers-using-php.php" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Separating+CSS+Style+sheet+for+Different+Browsers+using+PHP+-+http://b2l.me/ah3q3k&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-yahoobuzz">
			<a href="http://buzz.yahoo.com/submit/?submitUrl=http://danieldumas.com/separating-css-style-sheet-for-different-browsers-using-php.php&amp;submitHeadline=Separating+CSS+Style+sheet+for+Different+Browsers+using+PHP&amp;submitSummary=Separating%20Stylesheet%20for%20IE6%2C%20Internet%20Explorer%2C%20Firefox%2C%20Opera%2C%20Safari%2C%20Chrome%2C%20and%20other%20browser.&amp;submitCategory=science&amp;submitAssetType=text" rel="nofollow" class="external" title="Buzz up!">Buzz up!</a>
		</li>
		<li class="shr-tumblr">
			<a href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fdanieldumas.com%2Fseparating-css-style-sheet-for-different-browsers-using-php.php&amp;t=Separating+CSS+Style+sheet+for+Different+Browsers+using+PHP" rel="nofollow" class="external" title="Share this on Tumblr">Share this on Tumblr</a>
		</li>
		<li class="shr-yahoomail">
			<a href="http://compose.mail.yahoo.com/?Subject=Separating+CSS+Style+sheet+for+Different+Browsers+using+PHP&amp;body=Link: http://danieldumas.com/separating-css-style-sheet-for-different-browsers-using-php.php (sent via shareaholic)%0D%0A%0D%0A----%0D%0A Separating%20Stylesheet%20for%20IE6%2C%20Internet%20Explorer%2C%20Firefox%2C%20Opera%2C%20Safari%2C%20Chrome%2C%20and%20other%20browser." rel="nofollow" class="external" title="Email this via Yahoo! Mail">Email this via Yahoo! Mail</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://danieldumas.com/separating-css-style-sheet-for-different-browsers-using-php.php/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

