<?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>Kendra Schaefer &#187; Web &amp; Code</title>
	<atom:link href="http://www.kendraschaefer.com/category/teach-you-something/web-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kendraschaefer.com</link>
	<description>Web &#38; Graphic Designer</description>
	<lastBuildDate>Fri, 21 May 2010 14:52:14 +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>Wordpress Tutorial: How to Add a Form Inside of a Lightbox / Greybox</title>
		<link>http://www.kendraschaefer.com/2009/12/wordpress-tutorial-how-to-add-a-form-inside-of-a-lightbox-greybox/</link>
		<comments>http://www.kendraschaefer.com/2009/12/wordpress-tutorial-how-to-add-a-form-inside-of-a-lightbox-greybox/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 16:10:31 +0000</pubDate>
		<dc:creator>Kendra</dc:creator>
				<category><![CDATA[Web & Code]]></category>
		<category><![CDATA[teach you something]]></category>

		<guid isPermaLink="false">http://www.kendraschaefer.com/?p=874</guid>
		<description><![CDATA[
On a recent web design project, it became necessary to drop a newsletter sign-up area in a rather space-restricted footer. Instead of try to cram the form fields into the footer itself, or redirect the user to a sign-up form page, I opted to drop the form into a lightbox &#8211; or to be specific [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.kendraschaefer.com/wp-content/uploads/2009/12/greybox_header.jpg" alt="greybox_header" title="greybox_header" width="615" height="80" class="alignleft size-full wp-image-936" /></p>
<p>On a recent web design project, it became necessary to drop a newsletter sign-up area in a rather space-restricted footer. Instead of try to cram the form fields into the footer itself, or redirect the user to a sign-up form page, I opted to drop the form into a lightbox &#8211; or to be specific &#8211; a <a href="http://orangoo.com/labs/greybox/examples.html">greybox</a>.<span id="more-874"></span></p>
<p>This is not a tutorial for beginners &#8211; if you&#8217;re building your first site, or don&#8217;t know much about HTML, I&#8217;m sorry to say I didn&#8217;t get into too much hand-holding here. This tutorial was created with Wordpress 2.8.5, and I used the <strong>Greybox Integrator Plugin</strong>.</p>
<p>You might want to start off by installing the plugin through your Wordpress control panel, or through the <a href="http://ajaydsouza.com/wordpress/plugins/greybox-integrator/">plugin site</a>.</p>
<p><img src="http://www.kendraschaefer.com/wp-content/uploads/2009/12/buttons.jpg" alt="buttons" title="buttons" width="615" height="250" class="alignleft size-full wp-image-935" /></p>
<p><a href="http://www.ontargetresearch.com/">For an example of what we&#8217;ll be doing, check out the site I was working on.</a> Bottom left-hand corner of the page, there&#8217;s a &#8220;Click here to subscribe&#8221; button. Click it. You&#8217;ll see what I mean. The newsletter subscription box is not a normal pop-up. I didn&#8217;t have to plunder anything from HotScripts, or fumble around with javascript. Instead, the form pops up in a Lightbox (Greybox, specifically). This was done almost completely with available plug-ins and some easy HTML &#038; PHP.</p>
<p><strong>Step 1: Build the form</strong></p>
<p>This bit might seem fairly simple. There&#8217;s a billion Wordpress plug-ins that will let you easily create forms, then drop a special tag that references that form onto a Wordpress page, and wallah.</p>
<p>Problem: You tell Greybox to reference the page which houses your form. Greybox loads that page &#8211; the ENTIRE page, meaning your site template will load into the Greybox window as well, and your users will be seeing double copies of your site. Not very slick. You just want Greybox to load the form, and only the form &#8211; no extras.</p>
<p>You&#8217;ve got two major solutions here:</p>
<p><strong>The coder way:</strong> If you&#8217;re functional with PHP, you can get around this by dropping some easy if statements into your index.php page, ie, if the website is on the form page, don&#8217;t load the theme or any other graphics. Or, tell it to load a totally different template to do some hot-shot form styling. I&#8217;d throw in an example, but everyone&#8217;s page is a different story. This is probably the best method, as it allows you to still use Wordpress plugins and pages to create the sign-up form.</p>
<p><strong>The HTML-er way:</strong> Not good at coding, but good with design? Open up your hosting account file manager or jump on FTP, and upload a few form pages that reside outside of the Wordpress directory structure, with a pre-made script that handles the form. You should already know how to create a functioning form, and there&#8217;s a hundred billion ways to do it. One way is to create four pages: yourform.html, yourformhandler.php, sent.html and error.html (it doesn&#8217;t matter what you name them).</p>
<p><strong>Yourform.html</strong> will hold the form fields of your contact form (the main form). This is the page that greybox will reference. <strong>Error.html </strong>will hold nothing but an error message in case the form doesn&#8217;t process. Literally, something like:</p>
<p><code>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Form&lt;/title&gt; &lt;strong&gt;(greybox handles the title)&lt;/strong&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;p&gt;We're sorry, your form didn't go through. Want to &lt;a href="yourform.htm"&gt;try again&lt;/a&gt;? If not, please email us directly at &lt;a href="yournormalcontactpage.htm"&gt;email@emailaddress.com&lt;/a&gt;&lt;/p&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</code><br />
Your sent.html should be similar, just a &#8220;Your form was sent successfully!&#8221;</p>
<p><strong>yourformhandler.php</strong> will take care of form routing, redirecting the user to error.html if the mail didn&#8217;t go through, and redirecting to sent.html if it did. Etc.</p>
<p>Or you can skip all that, and use a form generator like <a href="http://wufoo.com/">Wufoo</a>.</p>
<p>However you go about this, the end result should be a functioning form that resides outside of your Wordpress hierarchy. </p>
<p><strong>About Greybox Integrator</strong></p>
<p>Like many things in Wordpress, the Greybox functionality works with tags. When you install Greybox Integrator, a new tag button, similar to the wordress &#8220;link&#8221;, &#8220;more&#8221; and &#8220;lookup&#8221; tags, will appear in your page editing window. It&#8217;s called the GBI button. You can (and should) read more on exactly how to use Greybox by <a href="http://ajaydsouza.com/wordpress/plugins/greybox-integrator/using-greybox/">reading this</a>.</p>
<p>Before moving forward, you should have Greybox integrator installed.</p>
<p><strong>Step 2: In the appropriate page, add with a link to your form</strong></p>
<p>In your Wordpress dashboard, navigate to the page where you want to add the form, or create a new page. Make sure you&#8217;re in HTML view, not &#8220;visual&#8221; view.</p>
<p>Type &#8220;Click here to subscribe!&#8221;, or any other text you&#8217;d like to use. Highlight the text you just typed, and with the text still highlighted, click the GBI button.</p>
<p><img class="alignleft size-full wp-image-922" title="highlighting" src="http://www.kendraschaefer.com/wp-content/uploads/2009/12/highlighting.jpg" alt="highlighting" width="615" height="328" /></p>
<p>Enter &#8220;3&#8243;, and click OK.</p>
<p><img class="alignleft size-full wp-image-924" title="2_enter3" src="http://www.kendraschaefer.com/wp-content/uploads/2009/12/2_enter3.jpg" alt="2_enter3" width="615" height="191" /></p>
<p>Enter the path to your form. If you used the PHP method, and your form is a Wordpress page, enter the permalink to your form.</p>
<p><img class="alignleft size-full wp-image-925" title="3_url" src="http://www.kendraschaefer.com/wp-content/uploads/2009/12/3_url.jpg" alt="3_url" width="615" height="191" /></p>
<p>Enter a title.</p>
<p><img class="alignleft size-full wp-image-926" title="4_title" src="http://www.kendraschaefer.com/wp-content/uploads/2009/12/4_title.jpg" alt="4_title" width="615" height="191" /></p>
<p>Enter the width of your form &#8211; this is how wide your greybox window will be. Because my form only has two fields, I want to keep it small. If your form is larger, go ahead change the size to suit. Size should be entered in pixels.</p>
<p><img class="alignleft size-full wp-image-927" title="5_width" src="http://www.kendraschaefer.com/wp-content/uploads/2009/12/5_width.jpg" alt="5_width" width="615" height="191" /></p>
<p>Enter the height.</p>
<p><img class="alignleft size-full wp-image-928" title="6_height" src="http://www.kendraschaefer.com/wp-content/uploads/2009/12/6_height.jpg" alt="6_height" width="615" height="191" /></p>
<p>And there you go, a link is generated:</p>
<p><img class="alignleft size-full wp-image-929" title="7_formlink" src="http://www.kendraschaefer.com/wp-content/uploads/2009/12/7_formlink.jpg" alt="7_formlink" width="615" height="250" /></p>
<p>Now, when you go to your page or post on the front-end of your site, you&#8217;ll see the link to your form. Huzzah.<br />
<strong><br />
But what if you want to put the form outside of page content? Like in a sidebar, or a footer? </strong> Since greybox relies on tags to generate its links, you&#8217;ll still need to do step one and two above, creating a page, and then creating a greybox link in that, but then you&#8217;ll also need to pull the contents of your page into a div.</p>
<p>I found a great snippet of code for this, written by WordPress user stvwlf. Read more about it here on the Wordpress forums: <a href="http://wordpress.org/support/topic/266861">http://wordpress.org/support/topic/266861</a></p>
<p>So, implementing a greybox on the sidebar or other non-content area requires a couple of extra steps, which are:</p>
<p>1. Create your form, as in step 1 above.</p>
<p>2. Create a new Wordpress page, and then follow the steps in step 2 above, to add a greybox link inside of that page.</p>
<p>3. Open up your index.php file, navigate to the place where you want to place your code, and inside of the &lt;div&gt; tags, drop this:</p>
<p><code>global $more;<br />
$about = new WP_Query();<br />
$about-&gt;query('pagename=newsletter-sign-up');<br />
while ($about-&gt;have_posts()) : $about-&gt;the_post();<br />
$more = false;   // set $more to false to only get the first part of the post ?&gt;<br />
&lt;?php the_content('Read the rest...'); ?&gt;<br />
&lt;?php endwhile;<br />
$more = true;   // restore default $more behavior<br />
?&gt;</code></p>
<p>So, for example, if you want this in your footer, drop it between &lt;div id=&#8221;footer&#8221;&gt; and &lt;/div&gt; (or whatever the div is called).</p>
<p>In the above code, you&#8217;ll need to change &#8220;newsletter-sign-up&#8221; in <code>$about-&gt;query('pagename=newsletter-sign-up');</code> to the name of your own page. If you&#8217;re not using permalinks, you may need to change the query arguments to make sure your code can find, and is pointing to, the right page.</p>
<p>And that&#8217;s it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kendraschaefer.com/2009/12/wordpress-tutorial-how-to-add-a-form-inside-of-a-lightbox-greybox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress Tutorial: Prevent Page from jumping to top on Reload</title>
		<link>http://www.kendraschaefer.com/2009/10/wordpress-tutorial-prevent-page-from-jumping-to-top-on-reload/</link>
		<comments>http://www.kendraschaefer.com/2009/10/wordpress-tutorial-prevent-page-from-jumping-to-top-on-reload/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 21:02:06 +0000</pubDate>
		<dc:creator>Kendra</dc:creator>
				<category><![CDATA[Web & Code]]></category>
		<category><![CDATA[teach you something]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://wordpress.kendraschaefer.com/?p=113</guid>
		<description><![CDATA[
Big web page headers are in design vogue at the moment, so I thought I&#8217;d incorporate one into my new site, keeping all links and content below the fold. After I&#8217;d dropped the header into the template, I ran into an annoying problem: every time a user clicked a link, the view would bounce back [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.kendraschaefer.com/wp-content/uploads/2009/10/prevent_page_jump.jpg" alt="prevent_page_jump" title="prevent_page_jump" width="615" height="80" class="aligncenter size-full wp-image-149" /></p>
<p>Big web page headers are in design vogue at the moment, so I thought I&#8217;d incorporate one into my new site, keeping all links and content below the fold. After I&#8217;d dropped the header into the template, I ran into an annoying problem: every time a user clicked a link, the view would bounce back to the top of the page as it reloaded, forcing the user to scroll all the way back down to the content area. <span id="more-113"></span></p>
<p>That might seem like an inconsequential problem, but the Herculean amount of mouse action involved discouraged users from browsing more than a page or two. I wanted a simple php-based solution, and I eventually found it on the WordPress forums courtesy of member <a href="http://wordpress.org/support/profile/1372570">gelo.tv</a>.</p>
<p>Below, you&#8217;ll find a slightly-modified version of the gelo.tv&#8217;s original code, and the instructions to implement it. Using simple HTML page anchors and a bit of basic scripting, this code first checks to see whether or not the user has loaded the home page (where we want them to look at the header), and then checks to see whether or not there&#8217;s already an anchor hash tag in the URL.</p>
<p>If not, the code will add an anchor tag into the URL, forcing the page view down to a name= anchor set by you.</p>
<p><strong>Step 1: Open your index.php template file, and delete the &lt;body&gt; tag</strong></p>
<p><strong>Step 2: Using page anchors, set the location that you want the page to align with</strong></p>
<p>Anchors create links to a location within the current page. Typically, anchors are used to link to a graphic or paragraph half-way down a long web page.</p>
<p>What we want to do here is decide where in the index.php file to drop our anchor. My anchor is set at the very top of my content div, so whenever a user clicks a link, the page reloads, showing the content aligned to the top of the browser window, and skipping the header.</p>
<p>Anchors are set as a parameter of any other tag. To add a page anchor, add <code>name="youranchorname"</code> to the div tag that begins your content section. For example:</p>
<p>BEFORE: <code>&lt;div id="contentstart"&gt;</code></p>
<p>AFTER: <code>&lt;div id="contentstart" name="anyanchorname"&gt;</code></p>
<p>It doesn&#8217;t matter what the name of the anchor is.</p>
<p><strong>Step 3: Insert the following php snippet into your index.php file, right where the body tag used to be.</strong></p>
<p><code>&lt;?php<br />
global $anchor_var;<br />
$Url="Http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];<br />
$mystring = '#';<br />
$pos = strpos($mystring, $Url);<br />
if (($pos === false) &amp;&amp; (is_front_page() )) {<br />
$anchor_var = false;<br />
} else {<br />
$anchor_var = true;<br />
}<br />
?&gt;<br />
&lt;?php if ($anchor_var) : ?&gt;<br />
&lt;body onload="location='#YOURANCHORNAME'"&gt;<br />
&lt;?php else : ?&gt;<br />
&lt;body&gt;<br />
&lt;?php endif; ?&gt;<br />
</code></p>
<p>Don&#8217;t forget to replace &#8220;YOURANCHORNAME&#8221; with the name of your anchor from step 2. </p>
<p>And that&#8217;s it. The original code featured an <code>is_home()</code> instead of an <code>is_front_page()</code>, but I found that this caused the script to stop working when I associated a specific page to be the home page in the WordPress back end.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kendraschaefer.com/2009/10/wordpress-tutorial-prevent-page-from-jumping-to-top-on-reload/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joomla 1.5 Tutorial: Make each menu item a different color</title>
		<link>http://www.kendraschaefer.com/2009/03/joomla-1-5-tutorial-make-each-menu-item-a-different-color/</link>
		<comments>http://www.kendraschaefer.com/2009/03/joomla-1-5-tutorial-make-each-menu-item-a-different-color/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 00:13:33 +0000</pubDate>
		<dc:creator>Kendra</dc:creator>
				<category><![CDATA[Web & Code]]></category>
		<category><![CDATA[teach you something]]></category>

		<guid isPermaLink="false">http://wordpress.kendraschaefer.com/?p=133</guid>
		<description><![CDATA[
This article covers the most basic method of giving each Joomla 1.5 menu item different visual properties. After you’ve learned how to separate each menu item into its own class, complete with its own styling, the design possibilities are endless.
I try to make my tutorials as easy on beginners as possible, but you will need [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.kendraschaefer.com/wp-content/uploads/2009/03/joomla_menu_tutorial2.jpg" alt="joomla_menu_tutorial" title="joomla_menu_tutorial" width="615" height="80" class="aligncenter size-full wp-image-145" /></p>
<p>This article covers the most basic method of giving each Joomla 1.5 menu item different visual properties. After you’ve learned how to separate each menu item into its own class, complete with its own styling, the design possibilities are endless.<span id="more-133"></span></p>
<p>I try to make my tutorials as easy on beginners as possible, but you will need some basic-intermediate CSS knowledge for this one. If you are just starting out doing web development of *any kind*, even if you’re just changing the occasional template, I highly, highly, highly recommend you use Firefox browser (if you’re not doing so already) with Firebug installed.</p>
<p>Firebug is a free plug-in for Firefox that lets you explore and manipulate any website, including your own, in ways you never thought possible. You can even temporarily edit your website live, without uploading a single file or going into your back end. Firebug gives you a visual representation of each area of your website, allowing you to pinpoint problems, grab the names of CSS divisions and classes just by pointing and clicking, and much more. Yeah, yeah, yeah, I’m a walking advertisement. But it really is that cool.<br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/1843"><br />
Download Firebug here</a></p>
<p>If you’re not already intimately acquainted with your site’s CSS, or you are modifying a template that someone else built, you will need Firefox with Firebug installed to complete this tutorial</p>
<p>You&#8217;ll also need basic – intermediate CSS knowledge</p>
<p>Oookay, enough faffing around.</p>
<p><strong>Step 1: Make sure your top menu is in “list” mode</strong></p>
<p>In your Joomla administration panel, go to <strong>Extensions > Module Manager</strong>.</p>
<p>In the Module Manager, find the module associated with your top menu. Often times, this module is called “Top Menu”.</p>
<p>Click on the name of the module to enter the module editing screen. In this case, my top menu module is named “Top Menu”, so I’ll go ahead and click on that.</p>
<p><img src="http://www.kendraschaefer.com/wp-content/uploads/2009/03/1_module_manager.jpg" alt="1_module_manager" title="1_module_manager" width="615" height="422" class="alignnone size-full wp-image-301" /></p>
<p>In the editing screen, look under the Module Parameters menu, and check the setting under “Menu Style”. The setting should be set at “List”. If it’s not – for example, if it’s set on any of the Legacy formats – you should change it to “List”.</p>
<p><img src="http://www.kendraschaefer.com/wp-content/uploads/2009/03/1_module_edit.jpg" alt="1_module_edit" title="1_module_edit" width="615" height="422" class="alignnone size-full wp-image-302" /></p>
<p>TECHY WHYS AND WHEREFORES: Under Legacy mode, Joomla’s index.php file does not assign each menu item its own class. In List mode, the index.php file assigns each menu item its own CSS class, allowing you to simply add these classes to the CSS document and edit them, which we’ll cover how to do in this tutorial. Leaving your menu in Legacy mode means you’ve got to jump through a whole lot of hoops to get the same effect – something we’re trying to avoid here.</p>
<p>Save any changes you made and exit the editing screen.</p>
<p><strong>Step 2: Note down all of your item ID numbers for the top menu</strong></p>
<p>In your Joomla administration panel, go to <strong>Menus > Top Menu</strong></p>
<p>You should now be looking at a list of all of the menu items in that menu. You don’t have to make any changes here, but you do have to note down all of the itemID numbers for every item in this menu.  The menu item IDs for each item are located in the very right-hand column of the screen.</p>
<p><img src="http://www.kendraschaefer.com/wp-content/uploads/2009/03/1_menu_item_id.jpg" alt="1_menu_item_id" title="1_menu_item_id" width="615" height="203" class="alignnone size-full wp-image-303" /></p>
<p>Just note down all the numbers listed here, in the same order that they appear on your site. In this case, I would simply note down, “28, 29, 18, 30, 65”. This is for your own reference only.</p>
<p>TECHY WHYS AND WHEREFORES: In “List” mode, the CSS classes that Joomla’s index.php file assigns to each menu item is based on the item ID number. Each item ID number is, very literally, the CSS class. So, for example, if one of your menu items has the ID “28”, then the code generated in the HTML is <a class=”item28”></a>.  That’s why it’s important that you note the ID numbers down correctly, and in the same order that they are displayed on the site.  </p>
<p><strong>Step 3: Using Firebug, figure out which part of the CSS you need to edit</strong></p>
<p>Sometimes, developers stick to the kinda-not-really-so-standard practice of naming their top menu div #pillmenu or some variation thereof, but definitely not always. So we need to first figure out which part of our CSS we’ll be editing.</p>
<p>If you already know the names of the CSS divisions and classes associated with the top menu, or you know how to find out some other way, you can skip this step. This is for those who’ve never done this before.</p>
<p>In a new window, open up your site in Firefox, and start Firebug (<strong>Tools > Firebug > Open Firebug</strong>).</p>
<p>In the Firebug window, click the “Inspect” button. You can now mouseover areas of your site, and the code / division names associated with those areas will be highlighted in the Firebug window, like so:</p>
<p><img src="http://www.kendraschaefer.com/wp-content/uploads/2009/03/1_firebug_highlight.jpg" alt="1_firebug_highlight" title="1_firebug_highlight" width="615" height="332" class="alignnone size-full wp-image-304" /></p>
<p>When I put my mouse over the division surrounding my menu, in the Firebug window below, I can see that in my case, this division is called “pillmenu”. Sweet! Now I know which part of my CSS I’ll need to edit. Note down whatever the division name is in your template.</p>
<p><strong>Step 4: Edit the CSS</strong></p>
<p>NOTE: Every single CSS template is different. Your code won’t look exactly like mine, and that’s why this tutorial requires at least a bit of CSS knowledge to get through. You need to be skilled enough to find the right part of the CSS code to work with. If you can do that, you can do this.</p>
<p>Go to <strong>Extensions > Template Manager</strong></p>
<p>Click on the name of the template you are currently using, or that you wish to modify.</p>
<p>In the top right-hand navigation bar, click on “Edit CSS”.</p>
<p>Choose the name of the CSS template you want to edit, and click “Edit”.</p>
<p>In the CSS editing screen, do a search for the name of the division that you saw in Firebug. In my case, I’ll do a search for “pillmenu”. Ah hah, here it is in the code, the part that defines the background color for my menus:</p>
<p><code>#pillmenu li a {<br />
    font-family: Verdana, Tahoma, sans-serif;<br />
    font-size: 12px;<br />
    float: left;<br />
    display: block;<br />
    line-height: 116px;<br />
    padding: 0 25px;<br />
    margin: 0 1px;<br />
    color: #fff;<br />
    text-decoration: none;<br />
    font-weight: bold;<br />
    background: none;<br />
    height: 117px;<br />
    background: url('/../images/pillmenu_bg.png') center center repeat-x;<br />
}</p>
<p></code><code><br />
#pillmenu li a:hover {<br />
    color: #fff;<br />
    text-decoration: none;<br />
    background: url('/../images/pillmenu_bg_hover.png') center center repeat-x;<br />
}</code></p>
<p>I can see here that my CSS calls two different images – I get one background image (pillmenu_bg.png) when the menu is sitting there all by its pretty little self, and the background image changes (to pillmenu_bg_hover.png) when it’s getting some mouse love.</p>
<p>I’m going to go head and COPY this entire block of code, and paste it in to the CSS file again – you want TWO copies of this block of code (or the corresponding code in your own CSS document). Leave the first copy alone for now.</p>
<p>Here’s the fun part: in your second copy of the block, add the item id of the second top menu item to the code, like this:</p>
<p><code>#pillmenu li.item29 a {<br />
    font-family: Verdana, Tahoma, sans-serif;<br />
    font-size: 12px;<br />
    float: left;<br />
    display: block;<br />
    line-height: 116px;<br />
    padding: 0 25px;<br />
    margin: 0 1px;<br />
    color: #fff;<br />
    text-decoration: none;<br />
    font-weight: bold;<br />
    background: none;<br />
    height: 117px;<br />
    background: url('/../images/pillmenu_bg2.png') center center repeat-x;<br />
}<br />
</code><code><br />
#pillmenu li.item29 a:hover {<br />
    color: #fff;<br />
    text-decoration: none;<br />
    background: url('/../images/pillmenu_bg_hover2.png') center center repeat-x;<br />
}<br />
</code></p>
<p>Then you can go ahead and modify the background image to suit your needs.</p>
<p>In this instance, I designed a different background image for the item 29 class, uploaded it to my template/images file through FTP, and now the second menu item shows my second image. But you could just as easily not put an image in there, and just change the background color instead (in fact, your template may already be written this way).</p>
<p>Save the CSS file. Check your work.</p>
<p>Repeat step 4 for each menu item in your top menu, making sure to reference the right item ID. For example, if you have five links in your menu, you need to repeat this 5 times, and modify 5 blocks of code.</p>
<p>You’re done! Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kendraschaefer.com/2009/03/joomla-1-5-tutorial-make-each-menu-item-a-different-color/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
