<?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>Web Cash &#187; gradient</title>
	<atom:link href="http://www.earn-web-cash.com/tag/gradient/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.earn-web-cash.com</link>
	<description>Writing, Designing, and Making Money Online</description>
	<lastBuildDate>Sun, 04 Dec 2011 22:52:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>How to Create a 3D Button Using CSS and a Gradient Image</title>
		<link>http://www.earn-web-cash.com/2008/01/28/3d-button-gradient/</link>
		<comments>http://www.earn-web-cash.com/2008/01/28/3d-button-gradient/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 00:30:43 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[HTML Tutorials]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[anchor]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[gradient]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/01/28/3d-button-gradient/</guid>
		<description><![CDATA[While I was browsing through <a href="www.dzone.com" title="Developer's Zone">dzone</a> today, I stumbled on this <a href="http://www.dave-woods.co.uk/?p=158">3d button css tutorial by Dave Woods</a>.

Using some simple css and a little color know-how, he shows you how to turn a square button into a pseudo 3-dimensional button.  I'll take it a step further and add a gradient background image to enhance the lighting effect.  Like this...]]></description>
			<content:encoded><![CDATA[<p>While I was browsing through <a href="http://www.dzone.com" title="Developer's Zone">dzone</a> today, I stumbled on this <a href="http://www.dave-woods.co.uk/?p=158">3d button css tutorial by Dave Woods</a>.</p>
<p>Using some simple css and a little color know-how, he shows you how to turn a square button into a pseudo 3-dimensional button.  I&#8217;ll take it a step further and add a gradient background image to enhance the lighting effect.  Like this&#8230;<br />
<span id="more-79"></span><br />
<a class="button" href="http://www.web-cash-com">Web Cash</a></p>
<p>We can build this button up in a couple of steps.  First, we need to make our anchor tag (link) into a block &#8211; with some padding and a background.</p>
<p><a class='button2' href="http://www.earn-web-cash.com">Web Cash</a></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">a<span style="color: #6666ff;">.button</span> <span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ab7f20</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">.5em</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">white</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</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></pre></div></div>

<p>That gives us a nice, squarish look&#8230; kind of like a button.  But it definitely looks flat and two dimensional.  The next step we&#8217;re going to take is to add a gradient background.  This will add a nice lighting effect &#8211; giving the button a bit of depth.</p>
<p>To do this, we need a background image.  I made a gradient image in GIMP (read this <a href="http://www.earn-web-cash.com/2008/01/24/how-to-create-a-gradient-background-image-in-gimp/">tutorial to learn how to create a gradient image</a> like this).  Then we need to add the image to the css declaration by changing one line.</p>
<p><a class='button3' href="http://www.earn-web-cash.com">Web Cash</a></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">a<span style="color: #6666ff;">.button</span> <span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ab7f20</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">uploads/2008/01/gradient-button.thumbnail.png</span><span style="color: #00AA00;">&#41;</span>
     <span style="color: #993333;">repeat-x</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span></pre></div></div>

<p>Notice that the color (#ab7f20) is the same as the second color in the gradient image.  This gradient is long enough to color the whole area &#8211; but if our button gets too tall, we want it to blend in nicely.</p>
<p>The last thing we need to do is give it some borders &#8211; light on the top and dark on the bottom.  This will give it the illusion of being hit by the light.  It&#8217;ll also accentuate the effect of the gradient background image.</p>
<p><a class="button" href="http://www.web-cash-com">Web Cash</a></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">a<span style="color: #6666ff;">.button</span> <span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f6daa3</span> <span style="color: #933;">3px</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#724f05</span> <span style="color: #933;">3px</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#724f05</span> <span style="color: #933;">3px</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">border-left</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f6daa3</span> <span style="color: #933;">2px</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
a<span style="color: #6666ff;">.button</span><span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#724f05</span> <span style="color: #933;">3px</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">border-right</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f6daa3</span> <span style="color: #933;">2px</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f6daa3</span> <span style="color: #933;">2px</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">border-left</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#724f05</span> <span style="color: #933;">3px</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Notice that the background colors are flipped when you hover over the button.  This gives the illusion that you are actually &#8220;pressing&#8221; the button &#8211; just by flipping the way the lighting hits.</p>
<p>You could also use the special &#8220;inset&#8221; and &#8220;outset&#8221; border types to cut down on that last css declaration.  You lose a little control over the color and light placement, but it gives a pretty decent effect.  Like this&#8230;</p>
<p><a class="button" style="border: #ab7f20 3px outset;" href="http://www.web-cash-com">Web Cash</a></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">a<span style="color: #6666ff;">.button</span> <span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ab7f20</span> <span style="color: #933;">3px</span> <span style="color: #993333;">outset</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span>
&nbsp;
a<span style="color: #6666ff;">.button</span><span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ab7f20</span> <span style="color: #933;">3px</span> <span style="color: #993333;">inset</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>And that&#8217;s all there is to it.  Change the colors to your liking, add a custom gradient image, and you&#8217;ve got a nifty little 3 dimensional button.</p>
<p>All it takes is some css.  No need to create a bunch of fancy images, and it&#8217;s easily expandable to accommodate the text inside of your button.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/01/28/3d-button-gradient/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How to Create a Gradient Background Image in GIMP</title>
		<link>http://www.earn-web-cash.com/2008/01/24/how-to-create-a-gradient-background-image-in-gimp/</link>
		<comments>http://www.earn-web-cash.com/2008/01/24/how-to-create-a-gradient-background-image-in-gimp/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 21:59:18 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[GIMP Tutorial]]></category>
		<category><![CDATA[HTML Tutorials]]></category>
		<category><![CDATA[Redirected]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[GIMP]]></category>
		<category><![CDATA[gradient]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/01/24/how-to-create-a-gradient-background-image-in-gimp/</guid>
		<description><![CDATA[The other day I wrote about how to add a gradient background to a css tooltip. So I thought it might be a good idea to walk through how to create the actual gradient image. Since I recently switched to Ubuntu Linux, I don&#8217;t use Photoshop anymore. GIMP all the way. So this tutorial will [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.earn-web-cash.com/wp-content/uploads/2008/01/gradient.png' title='Sample Gradient Background'><img class="alignright" src='http://www.earn-web-cash.com/wp-content/uploads/2008/01/gradient.thumbnail.png' alt='Sample Gradient Background' /></a>The other day I wrote about how to <a href="http://www.earn-web-cash.com/2008/01/21/tooltip-gradient/" title="Add a gradient background to a tooltip">add a gradient background to a css tooltip</a>.  So I thought it might be a good idea to walk through how to create the actual gradient image.</p>
<p>Since I recently switched to Ubuntu Linux, I don&#8217;t use Photoshop anymore.  GIMP all the way.  So this tutorial will show you briefly how to create a gradient image in GIMP and then use it as the background of an html element.<br />
<span id="more-60"></span></p>
<h5>Create a Blank Image (120px x 120px)</h5>
<p><a href='http://www.earn-web-cash.com/wp-content/uploads/2008/01/blank-image.jpg' title='Gradient Background Tutorial - Blank Image (Step 1)'><img class="alignright" src='http://www.earn-web-cash.com/wp-content/uploads/2008/01/blank-image.thumbnail.jpg' alt='Gradient Background Tutorial - Blank Image (Step 1)' /></a>First thing &#8211; fire up GIMP and create a new image.  Usually a gradient background image is 1 pixel wide.  For now we&#8217;ll create a bigger image so it&#8217;s easier to see what we&#8217;re doing &#8211; 120 pixels by 120 pixels.  You can crop the image down to a 1 pixel width later.</p>
<h5>Set the Foreground and Background Colors</h5>
<p><a href='http://www.earn-web-cash.com/wp-content/uploads/2008/01/color-chooser.jpg' title='Gradient Background Tutorial - Color Chooser (Step 2)'><img class="alignright" src='http://www.earn-web-cash.com/wp-content/uploads/2008/01/color-chooser.thumbnail.jpg' alt='Gradient Background Tutorial - Color Chooser (Step 2)' /></a>When you create a gradient, you need to set two colors &#8211; the beginning color (usually the foreground) and the ending color (usually the background color).  To change these colors, click on the square swatch of the foreground color in your toolbar (see the circled area in the screenshot to the right).</p>
<p>This should bring up a box titled, &#8220;Change Foreground Color.&#8221;  Pick a dark color &#8211; I used #981313.  Then, click on the Background Color Swatch (the one right behind the Foreground color).  Change the background color to a lighter version of your foreground color &#8211; I used #f17b7b.</p>
<h5>Select the Gradient Tool</h5>
<p><a href='http://www.earn-web-cash.com/wp-content/uploads/2008/01/gradient-tool.jpg' title='Gradient Background Tutorial - Gradient Tool (Step 3)'><img class="alignright" src='http://www.earn-web-cash.com/wp-content/uploads/2008/01/gradient-tool.thumbnail.jpg' alt='Gradient Background Tutorial - Gradient Tool (Step 3)' /></a>Now that you&#8217;ve chosen the two colors, you&#8217;re ready to create the gradient.  Click on the &#8220;Gradient&#8221; tool &#8211; it&#8217;s the square that fades from black to light gray.  See the screenshot to the right.  There are a bunch of options you could customize, but for a standard gradient background image you&#8217;re better off leaving them alone.</p>
<h5>Draw the Gradient!  Then Crop Away</h5>
<p><a href='http://www.earn-web-cash.com/wp-content/uploads/2008/01/dragging-gradient.jpg' title='Gradient Background Tutorial - Drawing the Gradient (Step 4)'><img class="alignright" src='http://www.earn-web-cash.com/wp-content/uploads/2008/01/dragging-gradient.thumbnail.jpg' alt='Gradient Background Tutorial - Drawing the Gradient (Step 4)' /></a>Now you can actually create the gradient by clicking and dragging on your image canvas.  Position the tool at the top border of your canvas (if you look in the bottom left, it&#8217;ll tell you when you&#8217;re over pixel &#8220;0&#8243;).  Hold down the Control button to force GIMP to draw a straight line, and drag the cursor down to the bottom pixel of your canvas.</p>
<p>Let go.  Voila!  You&#8217;ve got a nice gradient image created.</p>
<p>You could use it as-is in your css stylesheet, but it&#8217;s usually a good idea to trim your picture to 1px wide.  The browser can simply repeat the image across the entire width of the element &#8211; so making it wider than 1 px is simply wasting bandwidth.  Go ahead and crop the image now, and in the future make your gradient images 1 px wide by whatever height you want.</p>
<p>Now, let&#8217;s write the css to use this as a background image for an html element.</p>
<pre><code>.gradient {
  background: #f17b7b url(images/gradient.png)
    repeat-x top; }</code></pre>
<p>There&#8217;s four pieces to this shorthand css declaration.</p>
<ul>
<li><code>#f17b7b</code> sets the background color.  This is the same as the bottom color in our gradient, so that if the container is taller than the gradient image it seems to blend smoothly.</li>
<li><code>url(images/gradient.png)</code> sets our gradient image as the background image.  Make sure you change the path to where-ever you uploaded your gradient image.</li>
<li><code>repeat-x</code> tells the browser to repeat the image left-to-right for the entire width of the container.  This is what makes our 1-pixel background image &#8220;stretch&#8221; across the entire width.</li>
<li><code>top</code> simply tells the background image to align itself to the top edge of the container.  Not always necessary, but your better safe than sorry.</li>
</ul>
<p>And that&#8217;s all there is to it.  Create an html element with class <code>gradient</code> and it should have your lovely gradient background.</p>
<p>So get to it.  Start drawing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/01/24/how-to-create-a-gradient-background-image-in-gimp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to Add a Gradient Background to a CSS Tooltip</title>
		<link>http://www.earn-web-cash.com/2008/01/21/tooltip-gradient/</link>
		<comments>http://www.earn-web-cash.com/2008/01/21/tooltip-gradient/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 02:13:18 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[HTML Tutorials]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[gradient]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[tooltip]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/01/21/tooltip-gradient/</guid>
		<description><![CDATA[In an earlier post, we learned how to create a tooltipKind of like this boring, gray tooltip. using CSS. I walked you through the mechanics of creating the tooltip and left the actual css styling up to you. Today, we&#8217;ll take a look at how to make this tooltip look a bit nicer &#8211; using [...]]]></description>
			<content:encoded><![CDATA[<p>In an <a href="http://www.earn-web-cash.com/2008/01/19/create-css-tooltips/">earlier post</a>, we learned how to create a <a class="tooltip">tooltip<span>Kind of like this boring, gray tooltip.</span></a> using CSS.  I walked you through the mechanics of creating the tooltip and left the actual css styling up to you.</p>

<p>Today, we&#8217;ll take a look at how to make this tooltip look a bit nicer &#8211; using a gradient background and some extra styling.</p>
<span id="more-56"></span>
<p>To review, here&#8217;s the basic styling to create the tooltip.  Refer to the <a href="http://www.earn-web-cash.com/2008/01/19/create-css-tooltips/">original post for an explanation of the CSS/HTML</a>.</p>

<pre><code>a.info span {
    display: none; }

a.info:hover {
    position: relative; }

a.info:hover span {
    display: block;
    position: absolute;
    top: 0;
    left: 0; }
</code></pre>

<p>In order to make this look a bit nicer, kind of like <a class="tooltip">this tooltip<span class="gradient">This tooltip has a gradient background, some bold-face font, and a nice border on top and bottom.</span></a>, we&#8217;re going have to add some more style to <code>a.info:hover span</code>.</p>

<p>First, let&#8217;s change the colors a bit, add a nicer border, add some padding, and move the tooltip down about one line.</p>

<pre><code>a.info hover span {
   top: 1.5em;
   padding: 1em;
   border-top: 3px solid #d58700;
   border-bottom: 3px solid #d58700;
   border-left: none;
   border-right: none;
   color: white;
   background: #516898; }</code></pre>

<p>Adding that styling would leave us with <a class="tooltip">this tooltip<span class="gradient" style="background: #516898;">This looks a lot nicer, but we still need a gradient background.</span></a>.</p>

<p>I created a <a href="http://www.earn-web-cash.com/wp-content/themes/webcash/images/tooltip-gradient.png" alt="Gradient image for the background of the tooltip">gradient image</a> in GIMP.  You should be able to do this in your favorite image editing program.</p>

<p>I made the gradient image 120px tall.  I figured that&#8217;s high enough for the average tooltip, and longer ones will be covered by the standard background color.  This background color should be the same as the bottom color of the gradient.  That way when the gradient ends&#8230; it blends in nicely.</p>

<p>To add the gradient, we&#8217;ll change one line in the css declaration for <code>a.info:hover span</code> &#8211; the <code>background</code> line.</p>

<pre><code>background: #516898 url
  (images/tooltip-gradient.png) repeat-x top;</code></pre>

<p>Now we&#8217;ve got our <a class="tooltip">final tooltip<span class="gradient">This should be nicely styled.  Looks good to me anyway.</span></a>.</p>

<p>You&#8217;ll notice a few things in the <code>background</code> declaration &#8211; and these hold true for any time you use a gradient background.  I included a color &#8211; which is equal to the bottom end of the gradient.  This way it can blend in if the tooltip becomes longer than the gradient image.</p>

<p>I included <code>repeat-x</code> &#8211; which means that the gradient image will be repeated every 1 px along the x-axis.  This let&#8217;s you expand the image to the full width of the block, but only have to load a nicely small 1px wide image.  I also included <code>top</code> to make sure that the gradient appears all the way to the top of the tooltip&#8217;s box.</p>

<p>Well there you have it.  Once you get the mechanics of the tooltip down, it&#8217;s pretty simple to add extra styling like a gradient background image.  All you need to do is create your own gradient and tailor the colors to your own needs.</p>

<p>Happy tool-tipping.</p>]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/01/21/tooltip-gradient/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

