<?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>Jacob Schulke&#187; sprites</title>
	<atom:link href="http://www.j12media.com/tag/sprites/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.j12media.com</link>
	<description>The website of Jacob Schulke Web Designer</description>
	<lastBuildDate>Mon, 25 Jul 2011 17:11:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>CSS button rollovers - Image sprites</title>
		<link>http://www.j12media.com/css-button-rollovers/</link>
		<comments>http://www.j12media.com/css-button-rollovers/#comments</comments>
		<pubDate>Mon, 04 May 2009 20:00:54 +0000</pubDate>
		<dc:creator>Jacob</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[navigation design]]></category>
		<category><![CDATA[sprites]]></category>

		<guid isPermaLink="false">http://blog.j12media.com/?p=3</guid>
		<description><![CDATA[I first learned this here, I hope it will be helpful for [...]]]></description>
			<content:encoded><![CDATA[<p>I first <a href="http://htmldog.com/examples/rollovers1.html" target="_blank">learned this here</a>, I hope it will be helpful for some.</p>
<ol>
<li>Merge the two images as one.<br />
<img class="size-full wp-image-6 alignnone" title="css-roll-snap" src="http://www.j12media.com/wp-content/uploads/2009/04/css-roll-snap.gif" alt="css-roll-snap" width="260" height="197" /><br />
<span id="more-24"></span><br />
you will notice the image is 60 pixels in height I have placed the guide at 30 pixels and place the rollover text on the guide.</li>
<li>The markup is simple:
<pre>&lt;a class="rollover" href="link/" title="Rollover Link"&gt;Rollover&lt;/a&gt;</pre>
<p>Break down of the code:</p>
<pre>&lt;a » the a tag
class="rollover" <strong>» CSS identifier</strong>
href="link/" <strong>» file location</strong>
title="Rollover Link" <strong>» title tag this good for SEO</strong>
&gt;Rollover <strong>» Link text</strong>
&lt;/a&gt; <strong>» Closing tag</strong></pre>
</li>
<li>The CSS is simple as well:
<pre>a.rollover {
background:url(rollover.gif) no-repeat;
background-position:left top;
display:block;
height:30px;
width:160px;
text-indent:-999px;
overflow:hidden;
}
a:hover.rollover {
background-position:left bottom;
}</pre>
<p>Break down of the code:</p>
<pre>a.rollover {
background:url(rollover.gif) no-repeat;   <strong>/* places the image in the background of the link */</strong>
background-position:left top;   <strong>/* background position */</strong>
display:block;  <strong>/* this changes the default render style from inline to block creating a "box" */</strong>
height:30px;  <strong>/* sets the height of box */</strong>
width:160px;  <strong>/* set the width of box */</strong>
text-indent:-999px;  <strong>/* pushes the text out of the box */</strong>
overflow:hidden;  <strong>/* this hides the text and lower part of the image that is outside the defined box */</strong>
}
a:hover.rollover {
background-position:left bottom;  <strong>/* slides the image up creating the rollover effect. */</strong>
}</pre>
</li>
<li>
<pre>In action: <a class="rollover" title="Rollover link" href="#">Rollover</a></pre>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.j12media.com/css-button-rollovers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

