<?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>Plastic Shards Blog &#187; page</title>
	<atom:link href="http://plasticshards.com/blog/archives/tag/page/feed" rel="self" type="application/rss+xml" />
	<link>http://plasticshards.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 27 Jul 2009 22:56:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Adding CSS Image Rollovers to WordPress PHP Page Nav Links</title>
		<link>http://plasticshards.com/blog/archives/174</link>
		<comments>http://plasticshards.com/blog/archives/174#comments</comments>
		<pubDate>Wed, 15 Jul 2009 06:25:02 +0000</pubDate>
		<dc:creator>Matt Laskowski</dc:creator>
				<category><![CDATA[Tutorials & How-To]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[hover]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[nav]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[rollover]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://plasticshards.com/blog/?p=174</guid>
		<description><![CDATA[Some people are curious how to do this, because the PHP links for WordPress can be a little confusing. Well, I&#8217;m here to provide a simple solution to your problem. It&#8217;s quick and painless, so listen up! Step 1. First thing&#8217;s first. You have to make the images for your rollovers, [provided that you don't [...]]]></description>
			<content:encoded><![CDATA[<p>Some people are curious how to do this, because the PHP links for WordPress can be a little confusing. Well, I&#8217;m here to provide a simple solution to your problem. It&#8217;s quick and painless, so listen up!</p>
<p><strong>Step 1.</strong> First thing&#8217;s first. You have to make the images for your rollovers, [provided that you don't know how this works, I'll take a moment to explain. If you have your rollover images ready, then just continue on to step 2.</p>
<p>In CSS mouse hover rollovers, both the "on" and "off" images are contained within the same single image, usually directly above or aside each other. Observe the following button from my own WordPress theme: [note: i've changed the colors of this image to make it easier to see against the background.]</p>
<p><img class="aligncenter size-full wp-image-183" title="olderpostsblue" src="http://plasticshards.com/blog/wp-content/uploads/olderpostsblue.png" alt="olderpostsblue" width="360" height="100" /></p>
<p>You can see how both versions of the button are directly above each other. [The button is 360 pixels wide, 50 pixels tall. So I made the image 100 pixels tall to accomodate the second button.] When this image is applied as a background to a div, the &#8220;off&#8221; version will be showing. We can give it some simple code to instantly shift the background exactly 50 pixels vertically to show the &#8220;on&#8221; image when we hover our mouse cursor over it. The overall benefit of this is that it&#8217;s lighter weight in resources, and the rollover &#8220;on&#8221; image is instantly preloaded with the &#8220;off&#8221; image.</p>
<p>When you create your own button images, remember to make sure everything is in the same spots and shifted the exact amount as the other image! If not, you&#8217;ll notice the misalignments when you mouse over the final button.</p>
<p><strong>Step 2.</strong> You need to add some CSS to your stylesheet. The following is the CSS I used to make my buttons:</p>
<p><code>.buttonprev a{<br />
background:url(http://www.plasticshards.com/interfaceparts/images/olderposts.png) repeat 0px 0px;<br />
width: 360px;<br />
height: 50px;<br />
display: block;<br />
}</code></p>
<p><code>.buttonprev a span {<br />
display: none;<br />
}</code></p>
<p><code>.buttonprev a:hover {<br />
background: url(http://www.plasticshards.com/interfaceparts/images/olderposts.png) repeat 0px -50px;<br />
}</code><br />
<code>.buttonnext a{<br />
background:url(http://www.plasticshards.com/interfaceparts/images/newerposts.png) repeat 0px 0px;<br />
width: 360px;<br />
height: 50px;<br />
display: block;<br />
}</code></p>
<p><code>.buttonnext a span {<br />
display: none;<br />
}</code></p>
<p><code>.buttonnext a:hover {<br />
background: url(http://www.plasticshards.com/interfaceparts/images/newerposts.png) repeat 0px -50px;<br />
}</code></p>
<p>Copy and paste this CSS into your own stylesheet, but change the links to reflect your own button image sets, and adjust the &#8220;repeat 0px -50px&#8221; for the &#8220;a:hover&#8221; classes to tell which direction your rollover will shift once hovered over with the mouse. The first number in &#8220;repeat&#8221; affects horizontal shifting. The second number affects vertical shifting. Since my button images are placed vertically in relation to each other, I used the second number set to -50px to move the image UPWARD 50 pixels once hovered over. [For instance, if my buttons were placed side by side, I'd wanto to set the first number to "350px".]</p>
<p><strong><br />
Step 3. </strong>Now that you have the CSS, its time to make the link. Depending on where your theme needs the links, such as in your Main Index Template (index.php), add the following code:</p>
<p><code>&lt;div class="buttonprev"&gt;&lt;?php previous_posts_link('&lt;span&gt; &lt;/span&gt;'); ?&gt;&lt;/div&gt;</code></p>
<p><code>&lt;div class="buttonnext"&gt;&lt;?php next_posts_link('&lt;span&gt; &lt;/span&gt;'); ?&gt;&lt;/div&gt;</code></p>
<p>After you add that to the spots you want, load up your page and give it a try! Your rollovers should be working now just like the ones on my blog&#8217;s front page.</p>
<p>Enjoy and hope you found this helpful :)</p>
]]></content:encoded>
			<wfw:commentRss>http://plasticshards.com/blog/archives/174/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SYNTHESIS : Page 005 Posted</title>
		<link>http://plasticshards.com/blog/archives/76</link>
		<comments>http://plasticshards.com/blog/archives/76#comments</comments>
		<pubDate>Fri, 21 Nov 2008 07:52:53 +0000</pubDate>
		<dc:creator>Matt Laskowski</dc:creator>
				<category><![CDATA[Updates]]></category>
		<category><![CDATA[comic]]></category>
		<category><![CDATA[graphic novel]]></category>
		<category><![CDATA[manga]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[synthesis]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://plasticshards.com/blog/?p=76</guid>
		<description><![CDATA[SYNTHESIS Page 005 is up in the comics section! Click the thumbnail to the left to go to the page index.]]></description>
			<content:encoded><![CDATA[<table border="0" cellspacing="0" cellpadding="0" width="580">
<tbody>
<tr>
<td style="text-align: center;" width="155"><a href="http://plasticshards.com/comic/"><img src="http://www.plasticshards.com/comic/thumbnails/005.png" alt="" /></a></td>
<td width="400" valign="top">
<p style="text-align: left;"><a href="http://www.plasticshards.com/comic/"></a>SYNTHESIS Page 005 is up in the comics section! Click the thumbnail to the left to go to the page index.</p>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://plasticshards.com/blog/archives/76/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
