<?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>DesignBash &#187; buttons</title>
	<atom:link href="http://www.designbash.com/tag/buttons/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.designbash.com</link>
	<description>web magazine and more...</description>
	<lastBuildDate>Wed, 17 Mar 2010 20:57:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The CSS Image Button &#8211; How To Make a Rollover</title>
		<link>http://www.designbash.com/tutorials/the-css-image-button-how-to-make-a-rollover/</link>
		<comments>http://www.designbash.com/tutorials/the-css-image-button-how-to-make-a-rollover/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 22:24:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Beginner]]></category>
		<category><![CDATA[buttons]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.designbash.com/?p=193</guid>
		<description><![CDATA[Today we will be talking about CSS image buttons, something that every web developer absolutely needs to know and understand. Thankfully, these buttons are really easy to create and only require a few lines of CSS.]]></description>
			<content:encoded><![CDATA[<p>Today we will be talking about <strong>CSS image buttons</strong>, something that every web developer needs to know and understand. It&#8217;s really amazing how much of a difference a simple button can make on your conversion rate. In fact, I came across this comprehensive post that deals with that particular subject, <a href="http://www.jonnyhardwick.com/archives/2009/09/06/7-elements-of-a-high-converting-order-button/">check it out</a>. This post won&#8217;t focus so much on the particulars of a high-converting button, but it will teach you how to slap together a quick CSS button that uses an image as a background.<span id="more-193"></span></p>
<h3>Step 1 &#8211; Make or Find a Button</h3>
<p>For this tutorial I&#8217;ll be using my <a href="http://www.designbash.com/freebies/some-green-buttons/" target="_blank">green glossy buttons</a> from a previous freebie post. Feel free to download the source PSD and follow along, or just make your own button style.</p>
<h3>Step 2 &#8211; Prepare the Button</h3>
<p>Before we really get started, it&#8217;s important to know what size we want to make our button. For this example I&#8217;ll create a button that is quite large, I&#8217;m thinking around <strong>300px by 60px</strong> in size. So go ahead and crate a new Photoshop document with the dimensions you want.</p>
<p><img class="aligncenter size-full wp-image-194" title="css-button-tut1" src="http://www.designbash.com/wp-content/uploads/2010/01/css-button-tut1.jpg" alt="" width="500" height="250" /></p>
<p>After you&#8217;ve created the document, import my button (or yours) and scale it up so that it fills almost the entire document. If you have a little extra space on the sides it&#8217;s not the end of the world, just make sure that your button is perfectly centred on the canvas. To centre somthing perfectly you just need to:</p>
<ol>
<li>With your button folder/layer selected, use the marquee tool (<em>m-key</em>)  to select the entire canvas (<em>apple-a</em>)</li>
<li>Without deselecting anything, choose the Move tool (<em>v-key</em>) and use the alignment tools in the top panel to centre your button vertically and horizontally.</li>
</ol>
<p><br class="spacer_" /></p>
<p><img class="aligncenter size-full wp-image-195" title="css-alignment-tools" src="http://www.designbash.com/wp-content/uploads/2010/01/css-alignment-tools.jpg" alt="" width="500" height="250" /></p>
<p><br class="spacer_" /></p>
<div id="attachment_196" class="wp-caption aligncenter" style="width: 510px"><img class="size-full wp-image-196" title="cssbutton2" src="http://www.designbash.com/wp-content/uploads/2010/01/cssbutton2.jpg" alt="" width="500" height="196" /><p class="wp-caption-text">A Perfectly Centred Button</p></div>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<h3>Step 3 &#8211; Create a Rollover State</h3>
<p>Next up we need to create a <strong>rollover state</strong>. Basically, we need to <strong>double our canvas size (vertically) and duplicate our button. </strong>From the top menu select <strong>Image &gt; Canvas Size&#8230; </strong>and double the height of your canvas (120px if you&#8217;re following my example). Once your canvas size is doubled, divide it vertically with a horizontal guide.</p>
<p><img class="aligncenter size-full wp-image-200" title="css-button-double" src="http://www.designbash.com/wp-content/uploads/2010/01/css-button-double.png" alt="" width="479" height="345" /></p>
<p><img class="aligncenter size-full wp-image-201" title="doublebutton" src="http://www.designbash.com/wp-content/uploads/2010/01/doublebutton.jpg" alt="" width="500" height="250" /></p>
<p>Now you need to duplicate your button and centre it perfectly in the top section. The top button will be what our button looks like when you rollover, for now it looks the same as the bottom.</p>
<p><img class="aligncenter size-full wp-image-204" title="rollover-top01" src="http://www.designbash.com/wp-content/uploads/2010/01/rollover-top011.jpg" alt="" width="500" height="215" /></p>
<p>Next we add a rollover effect. If you&#8217;re using my buttons, you can open up the layer styles of the top button and slide the <strong>inner glow up to 75%</strong>. This will give our button a subtle glow effect when we hover over it.</p>
<p><img class="aligncenter size-full wp-image-205" title="effects" src="http://www.designbash.com/wp-content/uploads/2010/01/effects.jpg" alt="" width="500" height="250" /></p>
<p><img class="aligncenter size-full wp-image-207" title="effect-example" src="http://www.designbash.com/wp-content/uploads/2010/01/effect-example.jpg" alt="" width="500" height="201" /></p>
<p>With your button and rollover effect ready to go, you can now &#8220;<strong>save for web</strong>.&#8221; One important thing to consider here is what your background will be like. For my example I&#8217;ve made the background transparent and s<strong>aved my buttons in PNG format</strong>. This means my buttons are not supported in IE6, but you could just as easily choose a background color and ditch the transparency, making your buttons IE6 friendly.</p>
<h3>Step 4 &#8211; CSS Sprites and Some Basic HTML</h3>
<p>Now comes the fun part, creating the button. First, we&#8217;ll start with some markup, a simple and humble link:</p>
<pre class="brush:html"> &lt;a href="#" class="button"&gt;My Glossy Button&lt;/a&gt; </pre>
<p>I&#8217;ve given this link a class so that I can target it easier, but other than that it&#8217;s just a plain old link. Moving on let&#8217;s do some CSS magic. The basic idea is that we hide the link text using the text-indent property and give the link a background-image that only shows the non-rollover state. On hover we simply shift the background to show hover state, avoiding any loading time that is typical of CSS/Javascript image swaps.</p>
<pre class="brush:css">a.button {
display: block;
width: 300px;
height: 60px;
text-indent: -999em;
background: url(css-glossy-rollover.png) 0px -60px no-repeat;
}

a.button:hover {
background-position: 0px 0px;
}</pre>
<p>If you&#8217;ve done everything right the button should look something like this:</p>
<style type="text/css">
a.button {
display: block;
width: 300px;
height: 60px;
text-indent: -999em;
background: url(http://www.designbash.com/wp-content/uploads/2010/01/css-glossy-rollover.png) 0px -60px no-repeat;
}
a.button:hover {
background-position: 0px 0px;
}
</style>
<p><a href="#" class="button">My Glossy Button</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.designbash.com/tutorials/the-css-image-button-how-to-make-a-rollover/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some Green Buttons</title>
		<link>http://www.designbash.com/freebies/some-green-buttons/</link>
		<comments>http://www.designbash.com/freebies/some-green-buttons/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 16:28:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Freebies]]></category>
		<category><![CDATA[buttons]]></category>
		<category><![CDATA[PSDs]]></category>

		<guid isPermaLink="false">http://www.designbash.com/?p=162</guid>
		<description><![CDATA[Today's offering is a nice little glassy green button. As usual, they are in vector format so you can resize them to your hearts content.]]></description>
			<content:encoded><![CDATA[<p>Today&#8217;s offering is a nice little glassy green button. As usual, they are in vector format so you can resize them to your hearts content. Use these in any project you want &#8211; no restrictions <em>(commercial use is fine). </em>They were created using Photoshop CS3 and use the Century Gothic font.</p>
<p style="text-align: center;"><a href="http://www.designbash.com/wp-content/uploads/2010/01/green-buttons.psd"><img class="size-full wp-image-163 aligncenter" title="green-buttons" src="http://www.designbash.com/wp-content/uploads/2010/01/green-buttons.png" alt="Green Buttons Glossy" width="440" height="480" /></a></p>
<p style="text-align: left;">Click <a href="http://www.designbash.com/wp-content/uploads/2010/01/green-buttons.psd">here</a> or on the image to download the source PSD file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.designbash.com/freebies/some-green-buttons/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Free Blue Buttons</title>
		<link>http://www.designbash.com/freebies/free-blue-buttons/</link>
		<comments>http://www.designbash.com/freebies/free-blue-buttons/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 19:35:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Freebies]]></category>
		<category><![CDATA[buttons]]></category>
		<category><![CDATA[PSDs]]></category>
		<category><![CDATA[vectors]]></category>

		<guid isPermaLink="false">http://www.designbash.com/?p=31</guid>
		<description><![CDATA[It&#8217;s always a pain to create buttons when you&#8217;re in a rush. For this reason I&#8217;ve put together a free blue button set. I put these together in Photoshop CS3 and created them using vector shapes so that you can scale them to any size you like. I&#8217;ll be adding more buttons and freebies in [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s always a pain to create buttons when you&#8217;re in a rush. For this reason I&#8217;ve put together a <strong>free blue button</strong> set. I put these together in <strong>Photoshop CS3 </strong>and created them using vector shapes so that you can scale them to any size you like. I&#8217;ll be adding more buttons and freebies in the coming weeks so keep an eye out for any new stock!</p>
<p>Feel free to use these buttons in any <strong>commercial</strong> or <strong>personal</strong> project. <a href="http://www.designbash.com/wp-content/uploads/2010/01/free-blue-buttons.psd"><strong>Click here</strong></a><strong> or on the image below to download the source PSD of these blue vector buttons</strong>.</p>
<p style="text-align: center;"><a href="http://www.designbash.com/wp-content/uploads/2010/01/free-blue-buttons.psd"><img class="aligncenter size-full wp-image-32" title="free-blue-buttons" src="http://www.designbash.com/wp-content/uploads/2010/01/free-blue-buttons.png" alt="Blue Buttons Web" width="501" height="491" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.designbash.com/freebies/free-blue-buttons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
