<?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>Ben HusonBen Huson &raquo; &#187; CSS</title>
	<atom:link href="http://www.benhuson.co.uk/category/web_developer/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benhuson.co.uk</link>
	<description>Web Designer and Developer</description>
	<lastBuildDate>Tue, 20 Jul 2010 21:03:54 +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>Body Classes for Styling WordPress Taxonomies</title>
		<link>http://www.benhuson.co.uk/2010/06/24/wordpress-taxonomies-body-classes/</link>
		<comments>http://www.benhuson.co.uk/2010/06/24/wordpress-taxonomies-body-classes/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 16:00:30 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Taxonomies]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=1591</guid>
		<description><![CDATA[I recently noticed that WordPress does not seem to add style classes to the body tag for custom taxonomies in the same way that it does on category archives. You can fix this by adding the following to your functions.php file. function taxonomy_body_class&#40; $classes &#41; &#123; if &#40; is_tax&#40;&#41; &#41; &#123; $tax = get_query_var&#40; 'taxonomy' [...]]]></description>
			<content:encoded><![CDATA[<p>I recently noticed that WordPress does not seem to add style classes to the body tag for custom taxonomies in the same way that it does on category archives.</p>
<p>You can fix this by adding the following to your functions.php file.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> taxonomy_body_class<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$classes</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_tax<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$tax</span> <span style="color: #339933;">=</span> get_query_var<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'taxonomy'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$term</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$tax</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'-'</span> <span style="color: #339933;">.</span> get_query_var<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'term'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$classes</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_merge</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$classes</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'taxonomy-archive'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$tax</span><span style="color: #339933;">,</span> <span style="color: #000088;">$term</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$classes</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'body_class'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'taxonomy_body_class'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I don&#8217;t know why WordPress doesn&#8217;t do this automatically &#8211; I guess it should be added to core. What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2010/06/24/wordpress-taxonomies-body-classes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New style hooks for WordPress Theme Developers in WP e-Commerce 3.7.5</title>
		<link>http://www.benhuson.co.uk/2009/11/12/new-style-hooks-for-wordpress-theme-developers-in-wp-e-commerce-3-7-5/</link>
		<comments>http://www.benhuson.co.uk/2009/11/12/new-style-hooks-for-wordpress-theme-developers-in-wp-e-commerce-3-7-5/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 17:16:17 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[E-Commerce]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[WP e-Commerce]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=1170</guid>
		<description><![CDATA[The latest version of Instinct&#8217;s WordPress e-commerce plugin uses the WordPress body_class filter to add classes to the HTML body tag. WP e-Commerce 3.7.5 adds the following styles to the body tag: wpsc wpsc-home wpsc-single-product wpsc-single-product-id wpsc-category wpsc-category-id wpsc-group-id wpsc-shopping-cart wpsc-transaction-details wpsc-user-account These extra classes will give you more flexibility when designing themes for WP [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The latest version of Instinct&#8217;s WordPress e-commerce plugin uses the WordPress body_class filter to add classes to the HTML body tag.</strong></p>
<p><a href="http://www.instinct.co.nz/blog/2009/11/wp-e-commerce-plugin-3-7-5-ready-for-prime-time/trackback/">WP e-Commerce 3.7.5</a> adds the following styles to the body tag:</p>
<ul>
<li>wpsc</li>
<li>wpsc-home</li>
<li>wpsc-single-product</li>
<li>wpsc-single-product-id</li>
<li>wpsc-category</li>
<li>wpsc-category-id</li>
<li>wpsc-group-id</li>
<li>wpsc-shopping-cart</li>
<li>wpsc-transaction-details</li>
<li>wpsc-user-account</li>
</ul>
<p>These extra classes will give you more flexibility when designing themes for WP e-Commerce.</p>
<p><span id="more-1170"></span></p>
<h3>Where are these classes included?</h3>
<p><strong>wpsc</strong><br />
Included in every WP e-Commerce page.</p>
<p><strong>wpsc-home</strong><br />
Included on the main WP e-Commerce shop page.</p>
<p><strong>wpsc-single-product &amp; wpsc-single-product-id</strong><br />
Included on single product pages. The wpsc-single-product-id class allows you to set css rules for a single product based on the product id.</p>
<p><strong>wpsc-category &amp; wpsc-category-id</strong><br />
Included on category and individual product pages. The wpsc-category-id class allows you to set css rules for different categories. As these classes are also applied to single product pages, if a product appears in more than one category you could style a product page differently depending on which category you click through from.</p>
<p><strong>wpsc-group-id</strong><br />
Included on category and single product pages. The group id is set based on the group in which the current category resides.</p>
<p><strong>wpsc-shopping-cart</strong><br />
Including on the shop cart checkout page.</p>
<p><strong>wpsc-transaction-details</strong><br />
Including on the transaction details page displayed after a successful purchase.</p>
<p><strong>wpsc-user-account</strong><br />
Including on the WP e-Commerce user account pages.</p>
<h3>Ideas how to use these classes in your WP e-Commerce theme&#8230;</h3>
<ol>
<li>Style a special product differently using wpsc-single-product-id.</li>
<li>Style products in a sale category to display differently using wpsc-category-id.</li>
<li>Create a group for brands with brands as sub-categories and differentiate this view from your standard product categories using wpsc-group-id.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/11/12/new-style-hooks-for-wordpress-theme-developers-in-wp-e-commerce-3-7-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stylish Categories for WP e-Commerce</title>
		<link>http://www.benhuson.co.uk/2009/04/22/stylish-categories-for-wp-e-commerce/</link>
		<comments>http://www.benhuson.co.uk/2009/04/22/stylish-categories-for-wp-e-commerce/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 22:51:45 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Categories]]></category>
		<category><![CDATA[E-commerce]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[WP e-Commerce]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=724</guid>
		<description><![CDATA[I&#8217;ve made my first contribution to the WP e-Commerce plugin &#8211; my first contribution to an open source project&#8230; It&#8217;s a great e-commerce plugin for WordPress but there were a few visual things niggling me that I thought should be sorted out &#8211; mainly the way that the widget for showing categories was not styled [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I&#8217;ve made my first contribution to the <a href="http://www.instinct.co.nz/e-commerce/">WP e-Commerce</a> plugin &#8211; my first contribution to an open source project&#8230;</strong></p>
<p>It&#8217;s a great e-commerce plugin for WordPress but there were a few visual things niggling me that I thought should be sorted out &#8211; mainly the way that the widget for showing categories was not styled the same way as the WordPress default widgets.</p>
<p>Fixing the issue was just a case of making a couple of tweaks to the HTML; changing some square brackets to normal brackets and removing some bold styling.</p>
<p>Nothing revolutionary there, but it should now look a whole lot better with your default WordPress theme without making any modifications&#8230;</p>
<p>The current version in development <a href="http://www.instinct.co.nz/wp-e-commerce-37-questions/trackback/">WP e-Commerce 3.7</a> is looking great, with an overhaul of the user interface to bring it into line with WordPress 2.7, a complete reorganisation of the code making it easier for us developers, and a new template engine which works along the same lines at the WordPress Loop so that theme authors can now get in on the act without having to delve too far into the plugin&#8217;s code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/04/22/stylish-categories-for-wp-e-commerce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yellow Form Fields?</title>
		<link>http://www.benhuson.co.uk/2007/06/04/yellow-form-fields/</link>
		<comments>http://www.benhuson.co.uk/2007/06/04/yellow-form-fields/#comments</comments>
		<pubDate>Mon, 04 Jun 2007 13:22:12 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[Autofill]]></category>
		<category><![CDATA[Form]]></category>
		<category><![CDATA[Google Toolbar]]></category>
		<category><![CDATA[Yellow]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/2007/06/04/yellow-form-fields/</guid>
		<description><![CDATA[Why do you sometimes see yellow forms fields on web sites? What are they and why are they there? The answer is Google Toolbar. If you have Google Toolbar installed and the AutoFill option enabled, Google will remember your personal information so that it can automatically populate form fields for you. Fields such as name, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Why do you sometimes see yellow forms fields on web sites?<br />
What are they and why are they there?</strong></p>
<p>The answer is Google Toolbar. If you have Google Toolbar installed and the AutoFill option enabled, Google will remember your personal information so that it can automatically populate form fields for you. Fields such as name, address and phone will all turn yellow if AutoFill is turned on &#8211; the default setting.</p>
<p>Although it is good useability for these fields to be highlighted in some way, as a web designer you may not want yellow form fields on your web page for aesthetic reasons.</p>
<p><strong>So, how do you override it&#8230;?</strong></p>
<p><span id="more-226"></span></p>
<p>For a while I was confused as changing the name of the form fields seems to have no effect &#8211; Google still thinks it can auto-complete that field. It turns out that Google actually &#8216;guesses&#8217; which fields it can complete based on the form field name <strong>AND</strong> adjacent text which it presumes could be a label!</p>
<p>In the end I found two solutions:</p>
<h3>Solution 1.</h3>
<p>Create a style to change change the background colour of the field, using the css !important rule.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">input <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FFFFFF</span> !important<span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<h3>Solution 2.</h3>
<p>Use javascript to remove or change the styles that the Toolbar adds after the page has loaded.</p>
<p>Using this method you can change the background colour of all the fields, or just change the highlighted fields to a different colour to be in-keeping with your design.</p>
<p>To find out how, see <a href="http://code.jenseng.com/google/">Outsmarting the Google Toolbar</a>.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-1841682248917466";
google_ad_output = "textlink";
google_ad_format = "ref_text";
google_cpa_choice = "CAAQkar2_gEaCByEzMjSiC1gKKm14YcBMAA";
google_ad_channel = "";
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2007/06/04/yellow-form-fields/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS Bugs: Fix for IE / Win gap between list items</title>
		<link>http://www.benhuson.co.uk/2006/02/21/css_bugs_fix_for_ie_win_gap_between_list_items/</link>
		<comments>http://www.benhuson.co.uk/2006/02/21/css_bugs_fix_for_ie_win_gap_between_list_items/#comments</comments>
		<pubDate>Tue, 21 Feb 2006 14:42:22 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.benhuson.com/?p=105</guid>
		<description><![CDATA[Recently I stumbled across the annoying IE/Win bug of gaps between vertically stacked list items. After searching around for a while I found a fair few fixes. However, none of these seemed to work for me. The only different I could find was that my list contained images where the other examples were purely text. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I stumbled across the annoying IE/Win bug of gaps between vertically stacked list items.</p>
<p>After searching around for a while I found a fair few fixes. However, none of these seemed to work for me. The only different I could find was that my list contained images where the other examples were purely text.</p>
<p>I fixed the bug by chance whilst implementing a fix by John Serris at <a href="http://phonophunk.com/articles/ie-fix-for-gaps-between-list-items.php" target="_blank">www.phonophunk.com</a>.</p>
<p>It turned out that when using the <strong>&#8220;vertical-align: bottom&#8221;</strong> fix applied to the list item tag, I also needed to apply it to the &#8216;a&#8217; and &#8216;img&#8217; tags as well:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#navsec</span> a<span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#navsec</span> img <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">vertical-align</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><span id="more-105"></span></p>
<p><script src="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&amp;MarketPlace=GB&amp;ID=V20070822/GB/thewhiteroo0a-21/8001/9418bc02-30a0-44f9-b00e-f397382cc329" type="text/javascript"></script></p>
<p> </p>
<p> </p>
<p><noscript><a href="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&amp;MarketPlace=GB&amp;ID=V20070822%2FGB%2Fthewhiteroo0a-21%2F8001%2F9418bc02-30a0-44f9-b00e-f397382cc329&amp;Operation=NoScript">Amazon.co.uk Widgets</a></noscript></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2006/02/21/css_bugs_fix_for_ie_win_gap_between_list_items/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
