<?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>Fearless Flyer Web Design &#187; Widgets</title>
	<atom:link href="http://fearlessflyer.com/tag/widgets/feed/" rel="self" type="application/rss+xml" />
	<link>http://fearlessflyer.com</link>
	<description>Fearless flyer is a blog that focuses on the latest topics of web design. This includes Wordpress, SEO, Photoshop, jQuery, PHP and CSS. Fearless flyer is owned and operated by Michael Soriano, a seasoned web developer living in Southern California.</description>
	<lastBuildDate>Fri, 03 Feb 2012 17:11:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Styling Your Widgetized Sidebar</title>
		<link>http://fearlessflyer.com/2009/07/styling-your-widgetized-sidebar/</link>
		<comments>http://fearlessflyer.com/2009/07/styling-your-widgetized-sidebar/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 05:56:11 +0000</pubDate>
		<dc:creator>michael soriano</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WP Themes]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[get_sidebar]]></category>
		<category><![CDATA[Sidebar]]></category>
		<category><![CDATA[sidebar design]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[widgetized]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[wordpess]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://fearlessflyer.com/?p=658</guid>
		<description><![CDATA[There’s no real correct way on how a sidebar should look. But since the dawn of HTML, we’ve seen sidebars that span vertically in the left, right – twin column, triple column – heck – I’ve even seen them in the middle! (I guess that wouldn’t be a sidebar then would it?). Nonetheless, the sidebar ]]></description>
			<content:encoded><![CDATA[<p>There’s no real correct way on how a sidebar should look. But since the dawn of HTML, we’ve seen sidebars that span vertically in the left, right – twin column, triple column – heck – I’ve even seen them in the middle! (I guess that wouldn’t be a sidebar then would it?). Nonetheless, the sidebar to me is one of the more exciting components of a website. Furthermore, WordPress has given us the ability to “widgetize” our sidebars – which to a surprise, is very easy to style. </p>
<p>Note that you can “widgetize” almost any of your template files, but for the sake of this article, we will take a look at just the more common, single sidebar. </p>
<h3>First of all &#8211; What are Widgets?</h3>
<p>According to <a href="http://automattic.com/code/widgets/">Automattic</a> (the company behind WordPress), “<em>they’re just things you can use to personalize your WordPress site without knowing HTML</em>”. To elaborate further, widgets are like a fast way to plug in bits of code into your sidebar. Widgets are accessed via the admin panel, under “Appearance” > “Widgets”. Common widgets are Calendar, Meta, Recent Posts, the Tag Cloud and Text. Widgets are not to be confused with “plugins”. Although there are some plugins that become available as “Widgets” once you install them. </p>
<h3>Why use Widgets? </h3>
<p>For theme developers – it is almost a necessity for your theme to be widgetized. This means that you have to tailor your theme to non-savvy users to be able to customize your theme to use these small snippets of code without writing a bit of HMTL. It is a way to cater to their needs as well as expand and utilize the full capability of WordPress. Check out the screenshot below of the Widgets section from the admin panel: </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/07/widgets-1.jpg" alt="widgets 1 Styling Your Widgetized Sidebar" title="Easy UI for managing widgets" width="576" height="400" class="alignnone size-full wp-image-660" /></p>
<p>Now consider the user of your theme doesn’t know any web development – doesn’t this functionality come in very handy? This is why widgetizing your themes is always a good idea.</p>
<h3>Styling Your Widgetized Sidebar</h3>
<p><strong>The Container Approach:</strong></p>
<p>I’m sure you’ve seen this kind of sidebar. It’s one where widgets are compartmentalized or “boxed”. May it be sharp squares, faded edges or even rounded corners – the container approach is definitely one of the more popular sidebar styles around. Take a look at a typical container for a widget: </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/07/widgets-3.jpg" alt="widgets 3 Styling Your Widgetized Sidebar" title="Classic container styling for your widgets" width="576" height="488" class="alignnone size-full wp-image-662" /></p>
<p>As you can see, the entire container can be drawn up by just one DIV. This is what the “<em>before_widget</em>” and “<em>after_widget</em>” name-value pairs are for in your functions.php:</p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/07/widgets-2.jpg" alt="widgets 2 Styling Your Widgetized Sidebar" title="Code for the containers" width="576" height="430" class="alignnone size-full wp-image-661" /></p>
<p>Note that declaring a “sidebar-column” div for the widget container – you are now able to style unordered list items, as well as their child elements. As with my example, I’ve designated bigger icons for the parent list-style property, and a smaller arrow button for the children. </p>
<p>Below are a couple of good example websites that use the container approach for their sidebars:  </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/07/widgets-5.jpg" alt="widgets 5 Styling Your Widgetized Sidebar" title="GoMediaZine uses the classic container approach" width="576" height="450" class="alignnone size-full wp-image-664" /><br />
<a href="http://www.gomediazine.com">http://www.gomediazine.com</a></p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/07/widgets-4.jpg" alt="widgets 4 Styling Your Widgetized Sidebar" title="So does Blurbia - but with rounded containers" width="576" height="450" class="alignnone size-full wp-image-663" /><br />
<a href="http://www.blurbia.com/blog">http://www.blurbia.com/blog</a></p>
<p><strong>The Continuous Column Approach:</strong></p>
<p>This approach preserves the notion of a sidebar being – just a real bar. May it be in the right side or the left, the continuous column sidebar remains classic, simple and if done right – timeless. </p>
<p>Take a look at the simplicity of this style: </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/07/widgets-6.jpg" alt="widgets 6 Styling Your Widgetized Sidebar" title="Continuous columns are nice too" width="574" height="326" class="alignnone size-full wp-image-665" /></p>
<p>In this case, all I really styled is the headings of each widget. This is what the function.php’s “before_title” and “after_title” comes in handy. I used a regular H3 tag, assigning just the right font style, sufficient padding and a tiny bottom-border image – and it’s ready to go.   </p>
<p>As mentioned, the continuous column approach gives your sidebar that “clean” look. It is used by many news and magazine style blogs in the conservative end. Two popular websites that employ the continuous column approach are:  </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/07/widgets-7.jpg" alt="widgets 7 Styling Your Widgetized Sidebar" title="WooThemes likes their sidebar in a column" width="576" height="450" class="alignnone size-full wp-image-666" /><br />
<a href="http://www.woothemes.com/blog/">http://www.woothemes.com/blog/</a></p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/07/widgets-8.jpg" alt="widgets 8 Styling Your Widgetized Sidebar" title="So does Creattica" width="576" height="450" class="alignnone size-full wp-image-667" /><br />
<a href="http://daily.creattica.com/">http://daily.creattica.com/</a></p>
<h3>Anything Goes:</h3>
<p>Anything goes is exactly what it implies. It is very random, no compartments, borders or even visible patterns. Although it is still a column, there is no definite distinction where widgets start or end. Note that this can only be achieved by combining the “<em>fewest similar</em>” widgets, along with static elements. By “fewest similar” I mean widgets that are visually different from one another. For example: “Recent Posts”, “Archives” and “Categories” widgets are all rendered as lists. </p>
<p>Remember – you can play with static elements and combine them with the more dynamic widgets, to give your sidebar a more arbitrary look: </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/07/widgets-9.jpg" alt="widgets 9 Styling Your Widgetized Sidebar" title="Dont be afraid to mix and match!" width="574" height="600" class="alignnone size-full wp-image-668" /></p>
<p>Take a look at these websites that have an “anything goes” style sidebar: </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/07/widgets-10.jpg" alt="widgets 10 Styling Your Widgetized Sidebar" title="Web Designer Walls sidebar" width="576" height="450" class="alignnone size-full wp-image-669" /><br />
<a href="http://www.webdesignerwall.com/">http://www.webdesignerwall.com/</a></p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/07/widgets-11.jpg" alt="widgets 11 Styling Your Widgetized Sidebar" title="Dawghouse Design Studio" width="576" height="450" class="alignnone size-full wp-image-659" /><br />
<a href="http://www.dawghousedesignstudio.com/">http://www.dawghousedesignstudio.com/</a></p>
<p><strong>What about you? What’s your take on styling sidebars and widgets?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://fearlessflyer.com/2009/07/styling-your-widgetized-sidebar/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Create A Subscribe Bar with CSS Sprites</title>
		<link>http://fearlessflyer.com/2009/05/create-a-subscribe-bar-with-css-sprites/</link>
		<comments>http://fearlessflyer.com/2009/05/create-a-subscribe-bar-with-css-sprites/#comments</comments>
		<pubDate>Fri, 22 May 2009 06:48:37 +0000</pubDate>
		<dc:creator>michael soriano</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[PSD]]></category>
		<category><![CDATA[social buttons]]></category>
		<category><![CDATA[sprites]]></category>
		<category><![CDATA[subscribe]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://fearlessflyer.com/?p=511</guid>
		<description><![CDATA[Having a subscribe bar is almost a necessity for modern websites. This organizes your reader&#8217;s options on how to stay informed of your updates and new posts. May it be through Twitter, RSS, Email or even Facebook &#8211; you can display this bar in almost any part of your web pages. This following will teach ]]></description>
			<content:encoded><![CDATA[<p>Having a subscribe bar is almost a necessity for modern websites. This organizes your reader&#8217;s options on how to stay informed of your updates and new posts. May it be through Twitter, RSS, Email or even Facebook &#8211; you can display this bar in almost any part of your web pages. This following will teach you how to create a subscribe bar from scratch using Photoshop and a CSS technique known as sprites.  </p>
<h3>Part 1 &#8211; Creating the Image</h3>
<p>In Photoshop, create a new image 432 pixels by 78 pixels. Add a title for your bar, and four icons of your subscription options. In our case, we&#8217;re using an RSS feed icon, Twitter, Email and Facebook. *Icons are from <a href="http://wefunction.com/2009/05/free-social-icons-app-icons/">WeFunction</a> Collection. Line them up and space them evenly. </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/05/social-0.jpg" alt="social 0 Create A Subscribe Bar with CSS Sprites" title="start with the active layer in Photoshop" width="576" height="374" class="alignnone size-full wp-image-515" /></p>
<p>Add guides that divide each button. Also be sure to add a guide right on the top of the document. Lock the guides in place – you will need these dimensions when creating the CSS. </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/05/social-01.jpg" alt="social 01 Create A Subscribe Bar with CSS Sprites" title="shown with guides" width="576" height="375" class="alignnone size-full wp-image-516" /></p>
<p>Multiply the canvas height by two. Make sure you click the button that keeps the canvas flushed to the bottom</p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/05/social-02.jpg" alt="social 02 Create A Subscribe Bar with CSS Sprites" title="Double the canvas size" width="576" height="338" class="alignnone size-full wp-image-518" /></p>
<p>Select all existing layers and create a duplicate set. Merge all the layers in that set to create a single layer which we’ll use for the hover effect of the links. </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/05/social-11.jpg" alt="social 11 Create A Subscribe Bar with CSS Sprites" title="Duplicate all the layers" class="alignnone size-full wp-image-517" /></p>
<p>Nudge the new layer upwards – make sure it’s lined up exactly as the bottom layers. To create a hover effect – I desaturate the layer all the way to the max – making it a grayscale layer.</p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/05/social-03.jpg" alt="social 03 Create A Subscribe Bar with CSS Sprites" title="Convert the buttons to greyscale" width="576" height="370" class="alignnone size-full wp-image-520" /></p>
<p>Make sure you hide the background layer and save the image as a .png.</p>
<h3>Part 2 &#8211; The HTML</h3>
<p>We’re going to need a single div and an unordered list of links to render the sprites. Make sure to add an id for each anchor tag. This is how we’ll match the image through our stylesheet.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;subscribe-div&quot;&gt;
&lt;ul id=&quot;subsc&quot;&gt;
&lt;li class=&quot;title&quot;&gt;Keep Updated&lt;/li&gt;
&lt;li&gt;&lt;a id=&quot;rss&quot; href=&quot;#&quot; title=&quot;Subscribe to RSS&quot;&gt;RSS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a id=&quot;twit&quot; href=&quot;#&quot; title=&quot;Follow Us in Twitter&quot;&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a id=&quot;mailrss&quot; href=&quot;#&quot; title=&quot;Get Feeds through Mail&quot;&gt;Subscribe By Email&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a id=&quot;facebook&quot; href=&quot;#&quot; title=&quot;Find us in Facebook&quot;&gt;Facebook&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt; 
&lt;/div&gt;&lt;!--subscribe-div--&gt;</pre></td></tr></table></div>

<p>Of course you have to replace the # with your links. Note that the first list item is not a link. This is just a placeholder for the title “Keep Updated” title. </p>
<h3>Part 3 – The CSS</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#subscribe-div</span> <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: #993333;">auto</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#subscribe-div</span> ul<span style="color: #cc00cc;">#subsc</span> li <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#subscribe-div</span> ul<span style="color: #cc00cc;">#subsc</span> li a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/social-sprites.png</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">78px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>The first selector (#subscribe-div) can contain general properties of your bar. This includes overall padding, margins or positioning. The second selector  (#subscribe-div ul#subsc li)  – lets the browser know to display list items horizontally. The third (#subscribe-div ul#subsc li a) – calls our .png image.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#subscribe-div</span> ul<span style="color: #cc00cc;">#subsc</span> li<span style="color: #6666ff;">.bar-title</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/social-sprites.png</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">156px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">78px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-indent</span><span style="color: #00AA00;">:</span><span style="color: #933;">-9999px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/05/social-2.jpg" alt="social 2 Create A Subscribe Bar with CSS Sprites" title="the list items after some styling" width="576" height="225" class="alignnone size-full wp-image-519" /></p>
<p>This styles our list item bar-title with the “Keep Updated” leftmost section of our .png image – hence the position of 0 0 (means coordinates of 0 and 0). Next is styling the normal state of the links:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#subscribe-div</span> ul<span style="color: #cc00cc;">#subsc</span> li a<span style="color: #cc00cc;">#rss</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span><span style="color: #933;">-156px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">68px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#subscribe-div</span> ul<span style="color: #cc00cc;">#subsc</span> li a<span style="color: #cc00cc;">#twit</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span><span style="color: #933;">-224px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">65px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#subscribe-div</span> ul<span style="color: #cc00cc;">#subsc</span> li a<span style="color: #cc00cc;">#mailrss</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span><span style="color: #933;">-289px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">65px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#subscribe-div</span> ul<span style="color: #cc00cc;">#subsc</span> li a<span style="color: #cc00cc;">#facebook</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span><span style="color: #933;">-354px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">78px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>The above code reflects the normal state of the buttons in our list. The only properties applied are width and background position. To get the width of each button, you have to go back to your .psd (remember applying the guides in the beginning of the tutorial). Note that not all the buttons are identical in size, thus varying in widths. To get the background position, always remember: the first value is the left coordinate and the next value is top. Since we already know that our title is 156 pixels, we know our first button (rss) is going to have a background position of -156px. </p>
<p><img src="http://fearlessflyer.com/main/wp-content/uploads/2009/05/social-3.jpg" alt="social 3 Create A Subscribe Bar with CSS Sprites" title="the list items after more styling!" width="576" height="225" class="alignnone size-full wp-image-514" /></p>
<p>Next is the hover state.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#subscribe-div</span> ul<span style="color: #cc00cc;">#subsc</span> li a<span style="color: #3333ff;">:hover</span><span style="color: #cc00cc;">#rss</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span><span style="color: #933;">-156px</span> <span style="color: #933;">78px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">68px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#subscribe-div</span> ul<span style="color: #cc00cc;">#subsc</span> li a<span style="color: #3333ff;">:hover</span><span style="color: #cc00cc;">#twit</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span><span style="color: #933;">-224px</span> <span style="color: #933;">78px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">65px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#subscribe-div</span> ul<span style="color: #cc00cc;">#subsc</span> li a<span style="color: #3333ff;">:hover</span><span style="color: #cc00cc;">#mailrss</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span><span style="color: #933;">-289px</span> <span style="color: #933;">78px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">65px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#subscribe-div</span> ul<span style="color: #cc00cc;">#subsc</span> li a<span style="color: #3333ff;">:hover</span><span style="color: #cc00cc;">#facebook</span> <span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span><span style="color: #933;">-354px</span> <span style="color: #933;">78px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">78px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Notice I just copied the code for the normal state and re-pasted it. The only difference is the use of anchor pseudo class :hover is appended to the “a” selector, and the top value of background position is now 78 pixels. This is because we want the .png image to shift 78 pixels downward, once the mouse is hovered over each link. </p>
<p>The only thing left to do is to indent the text of the links. This is done in the #subscribe-div ul#subsc li a selector (text-indent:-9999px;). </p>
<p>And that&#8217;s it. We have finished creating a subscribe bar from an image in Photoshop, HTML and finally adding some styles with CSS. You can view the demo from this <a href="http://fearlessflyer.com/main/wp-content/uploads/2009/05/social-sprites.html">link</a>, or <strong>download the source code from <a href="http://fearlessflyer.com/downloads/subscribe-bar.zip">here</a>.</strong> All I ask is for you leave a comment, <a href="http://feeds.feedburner.com/Fearlessflyer">subscribe</a> or follow me in <a href="http://twitter.com/_fearlessflyer">Twitter</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://fearlessflyer.com/2009/05/create-a-subscribe-bar-with-css-sprites/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: fearlessflyer.com @ 2012-02-03 19:31:07 by W3 Total Cache -->
