<?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>CSS Tutorials</title>
	<atom:link href="http://css-tutorials.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://css-tutorials.co.uk</link>
	<description>Css tutorials the way they should be</description>
	<lastBuildDate>Sun, 04 Jul 2010 23:11:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>CSS Galleries &#8211; Get inspiration for your new designs</title>
		<link>http://css-tutorials.co.uk/css-galleries-get-inspiration-for-your-new-designs/</link>
		<comments>http://css-tutorials.co.uk/css-galleries-get-inspiration-for-your-new-designs/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 23:11:20 +0000</pubDate>
		<dc:creator>Gareth Gillman</dc:creator>
				<category><![CDATA[General CSS]]></category>

		<guid isPermaLink="false">http://css-tutorials.co.uk/?p=88</guid>
		<description><![CDATA[Stuck with ideas for a new design, galleries are full of websites which will improve your design perspective.]]></description>
			<content:encoded><![CDATA[<p>Stuck with ideas for a new design, galleries are full of websites which will improve your design perspective.</p>
<p>Here are just a couple of links to CSS galleries I know and use when grabbing inspiration for new designs.</p>
<p><a href="http://www.cssdrive.com/" target="_blank">CSS Drive</a></p>
<p><a href="http://www.csselite.com" target="_blank">CSS Elite</a></p>
<p><a href="http://www.cssheroes.com" target="_blank">CSS Heroes</a></p>
<p><a href="http://www.themeforest.net" target="_blank">Themeforest</a> (not a css gallery but themes for sale, some amazing designs in there).</p>
<p>Any more you recommend, post them below.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=CSS+Galleries+%E2%80%93+Get+inspiration+for+your+new+designs+http://bit.ly/cwKjTN" title="Post to Twitter"><img class="nothumb" src="http://css-tutorials.co.uk/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://css-tutorials.co.uk/css-galleries-get-inspiration-for-your-new-designs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Styling a html table with css</title>
		<link>http://css-tutorials.co.uk/styling-a-html-table-with-css/</link>
		<comments>http://css-tutorials.co.uk/styling-a-html-table-with-css/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 22:45:19 +0000</pubDate>
		<dc:creator>Gareth Gillman</dc:creator>
				<category><![CDATA[advanced]]></category>

		<guid isPermaLink="false">http://css-tutorials.co.uk/?p=82</guid>
		<description><![CDATA[Styling a html table with css]]></description>
			<content:encoded><![CDATA[<p>A table doesn&#8217;t have to be boring and predictable, you can use css to style it up and make it stand out.</p>
<p style="text-align: center;"><a href="http://css-tutorials.co.uk/wp-content/uploads/2010/07/table.png"><img class="size-full wp-image-83 aligncenter" title="table image" src="http://css-tutorials.co.uk/wp-content/uploads/2010/07/table.png" alt="" width="400" height="200" /></a></p>
<p>CSS code:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span> 
 <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Helvetica&quot;</span><span style="color: #00AA00;">,</span> verdana<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
table<span style="color: #00AA00;">,</span> thead<span style="color: #00AA00;">,</span> tbody<span style="color: #00AA00;">,</span> tfoot<span style="color: #00AA00;">,</span> th<span style="color: #00AA00;">,</span> td<span style="color: #00AA00;">,</span> h1 <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
table <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#A7D8D8</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#79B2AF</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">border-collapse</span><span style="color: #00AA00;">:</span>seperate<span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">border-width</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">border-spacing</span><span style="color: #00AA00;">:</span><span style="color: #933;">4px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#333</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span> <span style="color: #993333;">auto</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">max-width</span><span style="color: #00AA00;">:</span><span style="color: #933;">900px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">min-width</span><span style="color: #00AA00;">:</span><span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">95</span>%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
caption h1 <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#F38630</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">border-width</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#38210e</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">display</span><span style="color: #3333ff;">:inline-</span>block<span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">18px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #cc00cc;">#eecaae</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">14px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
th<span style="color: #00AA00;">,</span> td <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">border-width</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
th <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#31605d</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
thead<span style="color: #00AA00;">,</span> td <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
td<span style="color: #3333ff;">:empty </span><span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span>A7DBD8<span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
thead th <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#D3EDEB</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span>rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0.5</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
thead tr<span style="color: #3333ff;">:nth-of-</span>type<span style="color: #00AA00;">&#40;</span>n<span style="color: #00AA00;">+</span><span style="color: #cc66cc;">2</span><span style="color: #00AA00;">&#41;</span> th <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#C1E5E3</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span>rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">255</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0.3</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
tfoot td <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">italic</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Georgia&quot;</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#95C4c1</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span><span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> 
<span style="color: #00AA00;">&#125;</span>
th<span style="color: #00AA00;">&#91;</span>scope<span style="color: #00AA00;">=</span>row<span style="color: #00AA00;">&#93;</span> <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">font-variant</span><span style="color: #3333ff;">:small-</span>caps<span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">letter-spacing</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
tbody td <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">font-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">italic</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Georgia&quot;</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span> <span style="color: #933;">1px</span> fff<span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#e5f2f1</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>HTML code:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;html table&lt;/title&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;table.css&quot; /&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;table&gt;
&lt;caption&gt;&lt;h1&gt;HTML Template caption&lt;/h1&gt;&lt;/caption&gt;
&lt;thead&gt;
 &lt;tr&gt;
  &lt;th scope=&quot;col&quot;&gt;Column one&lt;/th&gt;
  &lt;th scope=&quot;col&quot;&gt;Column Two&lt;/th&gt;
  &lt;th scope=&quot;col&quot;&gt;Column Three&lt;/th&gt;
  &lt;th scope=&quot;col&quot;&gt;Column Four&lt;/th&gt;
  &lt;th scope=&quot;col&quot;&gt;Column Five&lt;/th&gt;
  &lt;th scope=&quot;col&quot;&gt;Column Six&lt;/th&gt;
 &lt;/tr&gt;
&lt;/thead&gt;
&lt;tfoot&gt;
 &lt;tr&gt;
  &lt;td scope=&quot;row&quot;&gt;Footer item 1&lt;/td&gt;
  &lt;td scope=&quot;row&quot;&gt;Footer item 2&lt;/td&gt;
  &lt;td scope=&quot;row&quot;&gt;Footer item 3&lt;/td&gt;
  &lt;td scope=&quot;row&quot;&gt;Footer item 4&lt;/td&gt;
  &lt;td scope=&quot;row&quot;&gt;Footer item 5&lt;/td&gt;
  &lt;td scope=&quot;row&quot;&gt;Footer item 6&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tfoot&gt;
&lt;tbody&gt;
 &lt;tr&gt;
  &lt;td scope=&quot;row&quot;&gt;item 1&lt;/td&gt;
  &lt;td scope=&quot;row&quot;&gt;item 2&lt;/td&gt;
  &lt;td scope=&quot;row&quot;&gt;item 3&lt;/td&gt;
  &lt;td scope=&quot;row&quot;&gt;Titem 4&lt;/td&gt;
  &lt;td scope=&quot;row&quot;&gt;item 5&lt;/td&gt;
  &lt;td scope=&quot;row&quot;&gt;item 6&lt;/td&gt;
  &lt;/tr&gt;
 &lt;tr&gt;
  &lt;td scope=&quot;row&quot;&gt;item 1&lt;/td&gt;
  &lt;td scope=&quot;row&quot;&gt;item 2&lt;/td&gt;
  &lt;td scope=&quot;row&quot;&gt;item 3&lt;/td&gt;
  &lt;td scope=&quot;row&quot;&gt;&lt;/td&gt;
  &lt;td scope=&quot;row&quot;&gt;item 5&lt;/td&gt;
  &lt;td scope=&quot;row&quot;&gt;item 6&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<p>Article courtesy of <a href="http://www.netmag.co.uk/">.net magazine</a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Styling+a+html+table+with+css+http://bit.ly/d28eij" title="Post to Twitter"><img class="nothumb" src="http://css-tutorials.co.uk/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://css-tutorials.co.uk/styling-a-html-table-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browser targetted CSS</title>
		<link>http://css-tutorials.co.uk/browser-targetted-css/</link>
		<comments>http://css-tutorials.co.uk/browser-targetted-css/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 21:08:09 +0000</pubDate>
		<dc:creator>Gareth Gillman</dc:creator>
				<category><![CDATA[advanced]]></category>

		<guid isPermaLink="false">http://css-tutorials.co.uk/?p=75</guid>
		<description><![CDATA[Learn how to target your css at individual browsers]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to use a set of css for just one browser, for example show different techniques for different browsers. Using php we can do this,</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
 <span style="color: #000088;">$user_agent</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/Firefox.3.0/i'</span><span style="color: #339933;">,</span><span style="color: #000088;">$user_agent</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$browser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ff ff30&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/MSIE.7/i'</span><span style="color: #339933;">,</span><span style="color: #000088;">$user_agent</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$browser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ie ie7&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/MSIE.6/i'</span><span style="color: #339933;">,</span><span style="color: #000088;">$user_agent</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$browser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ie ie6&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/Chrome/i'</span><span style="color: #339933;">,</span><span style="color: #000088;">$user_agent</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$browser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;chrome&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/Safari/i'</span><span style="color: #339933;">,</span><span style="color: #000088;">$user_agent</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$browser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;safari&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$browser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;in_unknown&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>That code would go at the top of a .php file.</p>
<p>To make it stick in the html of the site, we would add some php code into a html template.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Website Title&lt;/title&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;style.css&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
 <span style="color: #000088;">$user_agent</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/Firefox.3.0/i'</span><span style="color: #339933;">,</span><span style="color: #000088;">$user_agent</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$browser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ff ff30&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/MSIE.7/i'</span><span style="color: #339933;">,</span><span style="color: #000088;">$user_agent</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$browser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ie ie7&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/MSIE.6/i'</span><span style="color: #339933;">,</span><span style="color: #000088;">$user_agent</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$browser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ie ie6&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/Chrome/i'</span><span style="color: #339933;">,</span><span style="color: #000088;">$user_agent</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$browser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;chrome&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/Safari/i'</span><span style="color: #339933;">,</span><span style="color: #000088;">$user_agent</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$browser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;safari&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #000088;">$browser</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;in_unknown&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/head&gt;
&lt;body class=&quot;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$browser</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
&lt;h1&gt;The following box below will be styled differently in each browser, check it out&lt;/h1&gt;
&lt;div class=&quot;content-box&quot;&gt;
 This box is unique to each browser
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<p>Save as index.php, below is the style.css file.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* @group Internet Explorer */</span>
 body<span style="color: #6666ff;">.ie</span> div<span style="color: #6666ff;">.content-box</span> <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">400px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* @end */</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* @group Firefox */</span>
 body<span style="color: #6666ff;">.ff</span> div<span style="color: #6666ff;">.content-box</span> <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">400px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span>orange<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* @end */</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* @group Chrome */</span>
 body<span style="color: #6666ff;">.ie</span> div<span style="color: #6666ff;">.content-box</span> <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">400px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">blue</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* @end */</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* @group Safari */</span>
 body<span style="color: #6666ff;">.safari</span> div<span style="color: #6666ff;">.content-box</span> <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">400px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">red</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* @end */</span></pre></div></div>

<p>Hopefully that gives you some thought of how to target individual browsers, by having a little php coding. Remember you need to name your pages with .php as the file type and your web server needs to be php enabled.</p>
<p>Thanks for reading.</p>
</pre>
<p>Article courtesy of <a href="http://www.netmag.co.uk/">.net magazine</a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Browser+targetted+CSS+http://bit.ly/cRLYaP" title="Post to Twitter"><img class="nothumb" src="http://css-tutorials.co.uk/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://css-tutorials.co.uk/browser-targetted-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New redesign &#8211; competition time</title>
		<link>http://css-tutorials.co.uk/new-redesign-competition-time/</link>
		<comments>http://css-tutorials.co.uk/new-redesign-competition-time/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 20:30:26 +0000</pubDate>
		<dc:creator>Gareth Gillman</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://css-tutorials.co.uk/?p=73</guid>
		<description><![CDATA[To celebrate the redesign of the new CSS-tutorials website, we are offering 2 lucky members a 3 month membership to tutsplus. All you have to do is sign up to the forums, and tweet a [...]]]></description>
			<content:encoded><![CDATA[<p>To celebrate the redesign of the new CSS-tutorials website, we are offering 2 lucky members a 3 month membership to <a href="http://tutsplus.com">tutsplus</a>.</p>
<p>All you have to do is sign up to the <a href="http://www.css-tutorials.co.uk/forums/">forums</a>, and tweet a link to our website. </p>
<p>Competition closes 1st August 2010 @ 12am (UK time).</p>
<p>Good luck</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=New+redesign+%E2%80%93+competition+time+http://bit.ly/cwhv3p" title="Post to Twitter"><img class="nothumb" src="http://css-tutorials.co.uk/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://css-tutorials.co.uk/new-redesign-competition-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Floats vs positioning</title>
		<link>http://css-tutorials.co.uk/floats-vs-positioning/</link>
		<comments>http://css-tutorials.co.uk/floats-vs-positioning/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 23:33:02 +0000</pubDate>
		<dc:creator>Gareth Gillman</dc:creator>
				<category><![CDATA[beginners]]></category>
		<category><![CDATA[floats]]></category>
		<category><![CDATA[positioning]]></category>

		<guid isPermaLink="false">http://css-tutorials.co.uk/?p=69</guid>
		<description><![CDATA[Which is better, floating or positioning? I answered this very question for someone on Webdesigner Forum so will run through my reply here but in more detail. Floating is the css method of telling an [...]]]></description>
			<content:encoded><![CDATA[<p>Which is better, floating or positioning?</p>
<p>I answered this very question for someone on <a href="http://www.webdesignerforum.co.uk">Webdesigner Forum</a> so will run through my reply here but in more detail.</p>
<p>Floating is the css method of telling an object to &#8220;stick&#8221; to the left or right side of the website. Floating is very basic but means it&#8217;s easier to keep an eye on what&#8217;s happening.</p>
<p>Positioning is more advanced and has many options. You can assign individual margins and even &#8220;sticky&#8221; an object. </p>
<p>The problem with positioning objects is that it can be highly confusing, as you can end up with objects placed all over the place.<br />
I only use positioning for elements that need to be placed where floating won&#8217;t help e.g. overlapping another object.</p>
<p>What do you recommend? Floats or positioning? and why? </p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Floats+vs+positioning+http://bit.ly/d7X6fA" title="Post to Twitter"><img class="nothumb" src="http://css-tutorials.co.uk/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://css-tutorials.co.uk/floats-vs-positioning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vertically Centering a Website</title>
		<link>http://css-tutorials.co.uk/vertically-centering-a-website/</link>
		<comments>http://css-tutorials.co.uk/vertically-centering-a-website/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 23:08:22 +0000</pubDate>
		<dc:creator>Gareth Gillman</dc:creator>
				<category><![CDATA[General CSS]]></category>
		<category><![CDATA[beginners]]></category>

		<guid isPermaLink="false">http://css-tutorials.co.uk/?p=67</guid>
		<description><![CDATA[How often have you wanted to make your website appear in the middle of the users browser? Centering a website is quite simple, in your html create a div called wrapper and add some text [...]]]></description>
			<content:encoded><![CDATA[<p>How often have you wanted to make your website appear in the middle of the users browser?</p>
<p>Centering a website is quite simple, in your html create a div called wrapper and add some text e.g.</p>
<p><code></p>
<div id="wrapper">
 some text
</div>
<p></code></p>
<p>Now in your css add this,<br />
<code><br />
#wrapper {<br />
 width:960px;<br />
 margin:0 auto;<br />
 text-align:center;<br />
}<br />
</code></p>
<p>The width can be any amount as long as it&#8217;s less than 1200px (the most commonly used screen size of users). I have added the IE 6 fix. IE6 doesn&#8217;t like the margin: auto command so we need to add the text-align:center; command to combat this.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Vertically+Centering+a+Website+http://bit.ly/bgg3t5" title="Post to Twitter"><img class="nothumb" src="http://css-tutorials.co.uk/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://css-tutorials.co.uk/vertically-centering-a-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The three types of css stylesheets</title>
		<link>http://css-tutorials.co.uk/the-three-types-of-css-stylesheets/</link>
		<comments>http://css-tutorials.co.uk/the-three-types-of-css-stylesheets/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 22:59:42 +0000</pubDate>
		<dc:creator>Gareth Gillman</dc:creator>
				<category><![CDATA[General CSS]]></category>
		<category><![CDATA[beginners]]></category>

		<guid isPermaLink="false">http://css-tutorials.co.uk/?p=65</guid>
		<description><![CDATA[There are 3 ways recommended by the W3C to add styling to a markup language. You can use all 3 methods in your html document. External stylesheet This is the recommended method by me and [...]]]></description>
			<content:encoded><![CDATA[<p>There are 3 ways recommended by the W3C to add styling to a markup language. You can use all 3 methods in your html document.</p>
<p><strong>External stylesheet</strong><br />
This is the recommended method by me and many other professionals. The main bulk of the css stylesheet is kept in an external document. The document is called in the head of the html document. The document can be called anything but must end in the .css prefix, e.g. styles.css, some-random-file.css.</p>
<p>To call the stylesheet, we add the following code in between the two head tags in the html document.<br />
<code></p>
<link rel="stylesheet" type="text/css" href="styles.css" />
</code></p>
<p>The biggest advantage of using this method is the css is easily editable. You can link the stylesheet to as many files as you need. You can change the whole design of a whole website from one file.<br />
The css code is also clearer to understand and can also help a website load quicker. This is the recommended method as websites become bulkier and they rely more on CSS.</p>
<p><strong>Internal</strong><br />
This is the method recommended by many tutorial websites, but not by professionals. The css coding is inside the head tags of the html document. If your website uses a lot of css for the design, then this can add quite a few lines of coding to the document.</p>
<p>To use this method, we add the css code inside a style command, like the javascript command.</p>
<p><code><br />
 <script type="text/css">
  css code
 </script><br />
</code></p>
<p>This method is handy if the document uses it&#8217;s own styles e.g. a javascript image gallery. Less css code included using this method is better.</p>
<p><strong>Inline</strong><br />
This method is used quite a lot, as it is when using html. The earlier versions of html used this method to change the basic configurations of the website including fonts and colors.</p>
<p>The only time I recommend using this method is for adding some styling to a script, that cannot utliise stylesheets. This method isn&#8217;t recommended as it looks very untidy when reading through the code. </p>
<p>To use this method, we add a style command to an object, such as a paragraph.</p>
<p><code></p>
<p style="text-align:center;font-size:22px;font-color:#ffffff;font-weight:bold;">Text</p>
<p></code></p>
<p>All of the above examples are used by websites, the bottom 2 are used more by tutorial websites for ease of use. I always recommend the top option as it makes your html code look neater and makes it  easier to edit the css code.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=The+three+types+of+css+stylesheets+http://bit.ly/aMPjnf" title="Post to Twitter"><img class="nothumb" src="http://css-tutorials.co.uk/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://css-tutorials.co.uk/the-three-types-of-css-stylesheets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is css?</title>
		<link>http://css-tutorials.co.uk/what-is-css/</link>
		<comments>http://css-tutorials.co.uk/what-is-css/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 22:29:22 +0000</pubDate>
		<dc:creator>Gareth Gillman</dc:creator>
				<category><![CDATA[General CSS]]></category>
		<category><![CDATA[beginners]]></category>

		<guid isPermaLink="false">http://css-tutorials.co.uk/?p=61</guid>
		<description><![CDATA[CSS or Cascading Style Sheets are a stylesheet language used to desribe the presentation of a document written in a markup language such as HTML (Hyper Text Mark up Language) or XML (Extensible Markup Language). [...]]]></description>
			<content:encoded><![CDATA[<p>CSS or Cascading Style Sheets are a stylesheet language used to desribe the presentation of a document written in a markup language such as HTML (Hyper Text Mark up Language) or XML (Extensible Markup Language).</p>
<p>CSS was designed primarily to seperate the markup code and the design. CSS provides more control and flexibility for the presentation of the markup. The main advantage of a seperate stylesheet is that multiple documents can share the same styling. This means a whole folder of documents (or known as a website) can change it&#8217;s whole appearance from one file.</p>
<p>The CSS specficifications are maintained by the W3C foundation. The W3C is a not for priofit organisation set up by the internet&#8217;s founder, Tim Berners-Lee. The W3C maintains the specifications for all the markup and stylesheet languages used in Websites. These include xml, html, xhtml and css.</p>
<p>The current CSS standard is CSS 2.1 but CSS 3 is imminent. CSS3 brings many new techniques to css that used to be left to images and javascript. CSS3 is only used on the most recent browsers, Mozilla Firefox 3.5, Opera 10, safari 3 (mostly mac based) and Google Chrome. Unfortunately all versions of Microsoft Internet Explorer don&#8217;t follow the Css3 standards, but hopefully a new version will.</p>
<p>CSS is a major part of website design and development so is a handy language to know.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=What+is+css%3F+http://bit.ly/c1HrI4" title="Post to Twitter"><img class="nothumb" src="http://css-tutorials.co.uk/wp-content/plugins/tweet-this/icons/tt-twitter-micro4.png" alt="Post to Twitter" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://css-tutorials.co.uk/what-is-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
