<?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>36Flavours.com &#187; CSS</title>
	<atom:link href="http://36flavours.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://36flavours.com</link>
	<description>A taste of something different...</description>
	<lastBuildDate>Mon, 19 Apr 2010 20:01:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>WP &#8211; Add class name to first paragraph in blog post</title>
		<link>http://36flavours.com/2009/08/wp-add-class-name-to-first-paragraph-in-blog-post/</link>
		<comments>http://36flavours.com/2009/08/wp-add-class-name-to-first-paragraph-in-blog-post/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 15:04:27 +0000</pubDate>
		<dc:creator>Steve Whiteley</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[formatting]]></category>
		<category><![CDATA[function]]></category>

		<guid isPermaLink="false">http://36flavours.com/?p=273</guid>
		<description><![CDATA[When re-designing my blog I wanted to display the first paragraph of each blog post in bold text. A CSS3 selector could have been used, but wouldn&#8217;t work in older browsers such as IE6. Instead I decided to write a very simple function to add a class name to the first paragraph by filtering the [...]]]></description>
			<content:encoded><![CDATA[<p class="first">When re-designing my blog I wanted to display the <strong>first paragraph</strong> of each blog post in <strong>bold text</strong>. A CSS3 selector could have been used, but wouldn&#8217;t work in older browsers such as <strong>IE6</strong>.</p>
<p>Instead I decided to write a very simple function to add a class name to the first paragraph by filtering the content, then setting the styles accordingly in my theme CSS file.<span id="more-273"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> first_paragraph<span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/&lt;p([^&gt;]+)?&gt;/'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;p$1 class=&quot;first&quot;&gt;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_content'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'first_paragraph'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>By default this will append <em>class=&#8221;first&#8221;</em> to the first p tag in your post.</p>
<p>If you want to use this function on your own blog, just add it to your (or create a) <strong> functions.php</strong> file within your themes folder.</p>
]]></content:encoded>
			<wfw:commentRss>http://36flavours.com/2009/08/wp-add-class-name-to-first-paragraph-in-blog-post/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Taste of Something Different&#8230;</title>
		<link>http://36flavours.com/2009/08/a-taste-of-something-different/</link>
		<comments>http://36flavours.com/2009/08/a-taste-of-something-different/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 14:42:45 +0000</pubDate>
		<dc:creator>Steve Whiteley</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[redesign]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://36flavours.com/?p=261</guid>
		<description><![CDATA[It&#8217;s been a while since writing my last blog post back in June, but I&#8217;m pleased to be getting back into it again. One of the main reasons for for the lack of updates is due to the stack of work I&#8217;ve been attempting to get through and my attempts at redesigning the layout of [...]]]></description>
			<content:encoded><![CDATA[<p class="first">It&#8217;s been a while since writing my last blog post back in June, but I&#8217;m pleased to be getting back into it again.</p>
<p>One of the main reasons for for the lack of updates is due to the stack of work I&#8217;ve been attempting to get through and my attempts at <strong>redesigning</strong> the layout of my blog.</p>
<p>I had a couple of different concepts for the redesign, but this is the design I eventually went with.<span id="more-261"></span></p>
<p>Other ideas included a <strong>post-it note</strong> type design, where the notes were <strong>randomly placed</strong> on the screen with the ability to <strong>drag</strong> and <strong>re-organise</strong>.</p>
<p style="text-align: center;"><a href="http://36flavours.com/wp-content/uploads/2009/08/idea_one.png"><img class="size-medium wp-image-262  aligncenter" title="First Idea" src="http://36flavours.com/wp-content/uploads/2009/08/idea_one-300x203.png" alt="idea_one" width="300" height="203" /></a></p>
<p>Although I liked the idea of randomisation, after putting the design into practice <strong>it failed</strong> to fulfil it&#8217;s purpose of a blog theme. Content was difficult to get to and <strong>awkward</strong> to locate, so for this reason decided to take a different approach.</p>
<p>The <strong><a href="http://36flavours.com/wp-content/uploads/2009/08/idea_two.png" target="_blank">second design</a></strong> couldn&#8217;t be more different from the first. I decided against proceeding with this design for a number of reasons. Firstly, the length of each page would have been too long and secondly <strong>I didn&#8217;t really like it</strong>.</p>
<p>My <strong>third and final attempt</strong> was loosely based on the previous, using a <strong>single fixed width column</strong> with the sidebar below the main content. The colours were reduced to a single primary colour &#8211; orange &#8211; with white text on a dark background.</p>
<p>I felt this was going in the right direction and so continued through with the development process to create the <strong>current theme</strong>, which &#8211; to be honest &#8211; is nothing special but it&#8217;s <strong>quite clean</strong>, <strong>simple</strong> and is <strong>a bit different</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://36flavours.com/2009/08/a-taste-of-something-different/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CSS Opacity in Opera using jQuery</title>
		<link>http://36flavours.com/2009/02/css-opacity-in-opera-using-jquery/</link>
		<comments>http://36flavours.com/2009/02/css-opacity-in-opera-using-jquery/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 23:05:51 +0000</pubDate>
		<dc:creator>Steve Whiteley</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://sha.re.it/?p=134</guid>
		<description><![CDATA[Whilst attempting to cross browser test a jQuery plug-in that I&#8217;m currently working on, I noticed that my opacity settings were being ignored in my current version of Opera (9.23). $&#40;&#34;#id&#34;&#41;.css&#40;&#123;opacity: 0.8&#125;&#41;; It turns out that the latest version of jQuery (1.3.1) doesn&#8217;t believe that Opera 9.2 supports CSS opacity, and therefore it is ignored [...]]]></description>
			<content:encoded><![CDATA[<p class="first">Whilst attempting to cross browser test a <a href="http://jquery.com/">jQuery</a> plug-in that I&#8217;m currently working on, I noticed that my opacity settings were being ignored in my current version of <a href="http://www.opera.com/browser/">Opera</a> (9.23).</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#id&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>opacity<span style="color: #339933;">:</span> <span style="color: #CC0000;">0.8</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>It turns out that the latest version of <a href="http://docs.jquery.com/Downloading_jQuery">jQuery (1.3.1)</a> doesn&#8217;t believe that Opera 9.2 supports CSS opacity, and therefore it is ignored completely.<span id="more-134"></span></p>
<p>There are two possible fixes for this, the first is to simply <strong>upgrade Opera</strong> to a newer version (the latest is 9.6.3).</p>
<p>The second option is to tell jQuery that opera does support opacity using the following &#8211; or similar &#8211; within your script:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>$.<span style="color: #660066;">browser</span>.<span style="color: #660066;">opera</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $.<span style="color: #660066;">support</span>.<span style="color: #660066;">opacity</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://36flavours.com/2009/02/css-opacity-in-opera-using-jquery/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS: Targeting Safari 3 only</title>
		<link>http://36flavours.com/2009/01/css-targetting-safari-3-only/</link>
		<comments>http://36flavours.com/2009/01/css-targetting-safari-3-only/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 13:43:24 +0000</pubDate>
		<dc:creator>Steve Whiteley</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[aqua]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[target]]></category>

		<guid isPermaLink="false">http://sha.re.it/?p=93</guid>
		<description><![CDATA[Although Safari 3 tends to render layouts the same as the other leading popular browsers, it prefers to use it&#8217;s &#8220;aqua&#8221; button styling for standard sized form buttons. One solution for this is to set a dimension (width or height) to the button. To target Safari 3 in CSS you can use the following to [...]]]></description>
			<content:encoded><![CDATA[<p class="first">Although Safari 3 tends to render layouts the same as the other leading popular browsers, it prefers to use it&#8217;s &#8220;aqua&#8221; button styling for standard sized form buttons.</p>
<p>One solution for this is to set a dimension (width or height) to the button.</p>
<p>To target Safari 3 in CSS you can use the following to add or override any existing attributes, such as the height of a button:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@media screen and (-webkit-min-device-pixel-ratio:0) {</span>
	button <span style="color: #00AA00;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">40px</span><span style="color: #00AA00;">;</span>
	<span style="color: #00AA00;">&#125;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>If required, multiple selectors can be added into a single block.</p>
]]></content:encoded>
			<wfw:commentRss>http://36flavours.com/2009/01/css-targetting-safari-3-only/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS: Extra Button Padding in IE</title>
		<link>http://36flavours.com/2008/10/css-extra-button-padding-in-ie/</link>
		<comments>http://36flavours.com/2008/10/css-extra-button-padding-in-ie/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 19:43:42 +0000</pubDate>
		<dc:creator>Steve Whiteley</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://sha.re.it/?p=76</guid>
		<description><![CDATA[Today at work I was asked how to remove the extra padding added to buttons (both the button tag and input[type=button]) in Internet Explorer. The Problem: In the example below there is a standard button with 10px padding on all sides. Internet explorer chooses to add additional horizontal padding: The solution: After coming across this [...]]]></description>
			<content:encoded><![CDATA[<p class="first">Today at work I was asked how to remove the extra padding added to buttons (both the button tag and input[type=button]) in Internet Explorer.</p>
<p><strong>The Problem:</strong></p>
<p>In the example below there is a standard button with 10px padding on all sides. Internet explorer chooses to add additional horizontal padding:</p>
<p><img class="aligncenter size-full wp-image-78" title="ie-button-padding" src="http://36flavours.com/blog/wp-content/uploads/2008/10/ie-button-padding.gif" alt="" width="133" height="76" /></p>
<p><strong>The solution:</strong></p>
<p>After coming across this problem myself in the past, I eventually remembered that there are two CSS styles you can add to fix this <span style="text-decoration: line-through;">bug</span> feature in IE:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">button <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">visible</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://36flavours.com/2008/10/css-extra-button-padding-in-ie/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
