<?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/"
	>

<channel>
	<title>Joren Rapini.com Weblog</title>
	<atom:link href="http://jorenrapini.com/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://jorenrapini.com/blog</link>
	<description></description>
	<pubDate>Mon, 05 Jan 2009 22:19:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Double Body Background CSS Trick</title>
		<link>http://jorenrapini.com/blog/web-development/double-body-background-css-trick</link>
		<comments>http://jorenrapini.com/blog/web-development/double-body-background-css-trick#comments</comments>
		<pubDate>Tue, 30 Dec 2008 19:16:20 +0000</pubDate>
		<dc:creator>Joren Rapini</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Background]]></category>

		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://jorenrapini.com/blog/?p=233</guid>
		<description><![CDATA[So, you just created this awesome fancy background for a website. The top part of the background is large and in charge, while everything below it is going to be a repeating background that goes all the way down to the bottom of the page and helps define your website&#8217;s borders. The goal is to [...]]]></description>
			<content:encoded><![CDATA[<p>So, you just created this awesome fancy background for a website. The top part of the background is large and in charge, while everything below it is going to be a repeating background that goes all the way down to the bottom of the page and helps define your website&#8217;s borders. The goal is to make sure the top background sits on top of the repeating background so that you cannot see the repeating background until the top one is done, but how do you utilize 2 centered background images without the browser creating a horizontal scrollbar?<br />
<span id="more-233"></span><br />
For an example of what we&#8217;re creating, <a href="http://jorenrapini.com/posts/doublebg/">click here</a>.</p>
<p>You could just use a transparent PNG background that repeats over top of the large background using <a href="http://www.dillerdesign.com/experiment/DD_belatedPNG/">DD Belated PNG</a>, but that would be much more load intensive than we want to shoot for. This can actually be done very easily with CSS. The two images that we will be using can be found <a href="http://jorenrapini.com/posts/doublebg/background-top.jpg">here (top)</a> and <a href="http://jorenrapini.com/posts/doublebg/background.jpg">here (vertical repeating)</a>. I originally had a little bit larger image, but I shortened it for this demonstration so that you could view the effect.</p>
<p>First of all, the structure of the HTML is simple. All we need is our body tag, and then another <em>div</em> that will contain the rest of the website inside of it. In my example I&#8217;ve given it the id <em>#background</em>. Annnnnnd without further a-do, here is the CSS:
<pre name="code" class="css">

body {
	background:#fff url(background.jpg) repeat-y top center;
	margin:0px;
	padding:0px;
	}
#background {
	background:url(background-top.jpg) no-repeat top center;
	height:395px;
	width:100%;
	display:table;
	}
</pre>
<p>We give the body element the repeating background so that it is in the back and it extends the full length of the page. Next, be sure to give the <em>#background div</em> height equal to the height of the image. The key is the <em>100% width</em> and the <em>display:table</em> property. This ensures that you won&#8217;t get any scroll-bars because the background extends much further than the content of your page will, and because the div is displaying like a table, it will increase its height to whatever content is inside it so there is no need for a min-height hack. This checks out fine in all browsers, IE6 and up.</p>
]]></content:encoded>
			<wfw:commentRss>http://jorenrapini.com/blog/web-development/double-body-background-css-trick/feed</wfw:commentRss>
		</item>
		<item>
		<title>Great Firefox Plugins For Any Web Designer or Developer</title>
		<link>http://jorenrapini.com/blog/general/great-firefox-plugins-for-any-web-designer-or-developer</link>
		<comments>http://jorenrapini.com/blog/general/great-firefox-plugins-for-any-web-designer-or-developer#comments</comments>
		<pubDate>Mon, 22 Dec 2008 04:32:32 +0000</pubDate>
		<dc:creator>Joren Rapini</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Extension]]></category>

		<category><![CDATA[Firefox]]></category>

		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://jorenrapini.com/blog/?p=182</guid>
		<description><![CDATA[The greatest thing about technology advancing is that it allows us to be more efficient and lazy than we ever have been before. I wanted to talk about some of the applications, services, and resources that I use that make my life as a web designer/developer easier, quicker, and more enjoyable. And more tasty. I [...]]]></description>
			<content:encoded><![CDATA[<p>The greatest thing about technology advancing is that it allows us to be more efficient and lazy than we ever have been before. I wanted to talk about some of the applications, services, and resources that I use that make my life as a web designer/developer easier, quicker, and more enjoyable. And more tasty. I realized that I bloated this article enough with just Firefox plugins, so I&#8217;m going to make another post after this one that involves useful non-Firefox applications. You may have already heard of a lot of these, but read on anyways because you never know what you might have missed. Or, possibly you are just enthralled by my incredible writing. Or you salivate over any mention of Firefox plugins.</p>
<p>If you still aren&#8217;t convinced, just shut up and read on anyways, I promise you&#8217;ll get a Hershey kiss at the end. Maybe.</p>
<p><span id="more-182"></span></p>
<h4>Firefox Plugins</h4>
<p><img src="/posts/firefox.gif" style="float:right;" />Any web designer or developer (from now on referred to as web-head so I don&#8217;t have to keep typing that over and over) worth their salt should be using Mozilla Firefox thanks to its myriad of plugins. There are many other advantages to Firefox that make it a superior browser, but the plugins are really what make its genius stand out. <a href="https://addons.mozilla.org/en-US/firefox/addon/1843">Firebug</a> should be in <strong>every</strong> single web-head&#8217;s arsenal. Before Firebug there was the Web Developer Toolbar, which was awesome and is still useful in its own rite, but Firebug went a million steps further in creating an amazingly useful troubleshooting tool. Not only can you easily dissect every block of code on a web page, but it also comes built in with a javascript debugger, code editor so you can see live changes to a web page on the fly, DOM viewer, and a Net tab which allows you to view load times for every single item being referenced on a web page which is very similar to <a href="http://tools.pingdom.com/">Pingdom Tools</a>. Firebug has saved my arse countless amounts of times when trying to determine where a problem is coming from. Being a web-head became much easier once I discovered this handy little plugin.</p>
<p>If you do not validate your code, then please, slap yourself right now. One more time. Another should do it. Ok, now we&#8217;ve got that out of the way. The benefits of validating is a lecture for another blog post, but for some extremely quick and helpful validation go no further than the <a href="https://addons.mozilla.org/en-US/firefox/addon/249">HTML Validator</a> plugin.</p>
<p>If you are like me and you have a ba-jillion bookmarks (one more slap if you started to argue that wasn&#8217;t a real number) and you also use multiple computers like home, work, and laptop - then it&#8217;s total hell to keep track of those things, right? Negatory - go pick up <a href="https://addons.mozilla.org/en-US/firefox/addon/2410">Foxmarks</a> if you haven&#8217;t yet, and it will change your life forever. It might even help you give up that heroine addiction, but I wouldn&#8217;t quote me on that. </p>
<p>As a web-head, you should also be bookmarking <strong>every</strong> little useful article, technique, tutorial, resource, or whatever it is that you find that tickles your spidey web-senses and make use of Firefox 3.0&#8217;s awesome web 2.0 inspired bookmarking system. Bookmark tags are amazing and can save you muy mucho tiempo. A lot of times if I find an article that has a large amount of varied resources or tutorials on it, rather than visit each one and bookmark them or download them, I will make one bookmark of that &#8220;Top 3,254 Cute Things My Kitten Does&#8221; article and make a separate tag for each item that is on the page.</p>
<p>Even if marketing isn&#8217;t your thing, EVERY web-head needs to know their stuff about SEO (search engine optimization). It doesn&#8217;t matter how beautiful or usable you&#8217;ve made your website, if people can&#8217;t find it then you are SOL and your client is not happy. There are a few great plugins that you can get for Firefox that help you out in this area. <a href="https://addons.mozilla.org/en-US/firefox/addon/4788">KGen</a> helps you find what the strongest keywords are that are showing up on a page. <a href="http://tools.seobook.com/firefox/seo-for-firefox.html">SEO For Firefox</a> shows all kinds of incredibly useful information about websites in your Google and Yahoo searches, like page rank, age, diggs, trends, etc.</p>
<p>Here is a recent post that I found that goes into detail on a list of good Wordpress plugins for Firefox. It may pique your interest, <a href="http://www.mitchelaneous.com/2008/12/19/10-tools-to-turn-firefox-into-wordpresss-little-helper/">check it out</a>.</p>
<p><a href="http://www.colorzilla.com/firefox/">ColorZilla</a> is small in functionality but extremely useful when coding any CSS. One click brings up an eyedropper which you can place anywhere within your Firefox browser to get a color, and another click will allow you to copy that color&#8217;s hex code to your clipboard.</p>
<p>And last but not least, <a href="https://addons.mozilla.org/en-US/firefox/addon/1419">IETab</a> let&#8217;s you quickly render a page with whatever version of Internet Explorer you have installed on your computer inside a Firefox tab. This is nice for when you don&#8217;t feel like having multiple windows open. While I&#8217;m on the subject of Internet Explorer, for anyone who is also using a PC then <a href="http://tredosoft.com/Multiple_IE">Multiple IE</a> is invaluable as it allows you to install, (hint: it&#8217;s in the name, so this shouldn&#8217;t be too tricky for ya) yes, multiple versions of Internet Explorer on the same computer. I know I know, you&#8217;re getting very excited with the prospect of being able to infect your computer with many Internet Explorers aren&#8217;t you? <a href="https://addons.mozilla.org/en-US/firefox/addon/1190">Opera View</a> is available as well, although I rarely find a difference between how the two browsers render web pages.</p>
<p><img src="/posts/kiss.gif" style="float:left;" />There are plenty of more great Firefox plugins out there that people developed just to make you happy, so go out there and explore! If you have any other favorites, please post those for me to take a look at. By the way, thanks for the kiss, it was delicious.<br />
<br style="clear:both;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://jorenrapini.com/blog/general/great-firefox-plugins-for-any-web-designer-or-developer/feed</wfw:commentRss>
		</item>
		<item>
		<title>CSS Navigation Rollovers With Drop-downs</title>
		<link>http://jorenrapini.com/blog/web-development/css-navigation-rollovers-with-drop-downs</link>
		<comments>http://jorenrapini.com/blog/web-development/css-navigation-rollovers-with-drop-downs#comments</comments>
		<pubDate>Sun, 14 Dec 2008 22:04:07 +0000</pubDate>
		<dc:creator>Joren Rapini</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[HTML]]></category>

		<category><![CDATA[Menu]]></category>

		<category><![CDATA[Navigation]]></category>

		<guid isPermaLink="false">http://jorenrapini.com/blog/?p=170</guid>
		<description><![CDATA[This post is a continuation of Super Fantastic CSS Navigation Image Rollovers where we created CSS rollovers with a single image, so it would probably be a good idea for you to take a look at that post in order to follow along with this one if you haven&#8217;t done so yet. We&#8217;re going to [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a continuation of <a href="http://jorenrapini.com/blog/web-development/super-fantastic-css-navigation-image-rollovers#post-137">Super Fantastic CSS Navigation Image Rollovers</a> where we created CSS rollovers with a single image, so it would probably be a good idea for you to take a look at that post in order to follow along with this one if you haven&#8217;t done so yet. We&#8217;re going to take the code from that post, and adapt it to <a href="http://www.cssplay.co.uk/menus/final_drop.html">Stu Nicholls&#8217; CSS drop-downs</a>. He has done a great job in creating a multi-level drop-down menu that is verified to work in most browsers, and without any slow loading javascript.</p>
<p><span id="more-170"></span></p>
<p>Sorry there has been such a delay between these two posts, I&#8217;ve been out sick with a nasty cold for a while. I decided that I can finally breath through my nose well enough to finish this thing.</p>
<p><a href="http://jorenrapini.com/posts/css-rollovers/post2.html">Here is an example</a> of what we&#8217;ll be creating. You can find all of the necessary CSS in the header of that page. Keep in mind, I also use <a href="http://meyerweb.com/eric/tools/css/reset/">Meyer&#8217;s Reset CSS sheet</a> which takes care of getting rid of the unordered list&#8217;s natural padding and styling. CSS reset style sheets are great for evening the playing field across multiple browsers, because they all have their own styles that they apply to certain elements and they&#8217;re never the same.</p>
<p>We&#8217;ve already got our image for the navigation rollovers from the previous post, and so now we&#8217;re going to introduce the second level of navigation into our HTML:
<pre name="code" class="xhtml">

&lt;div id=&quot;navigation&quot;&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href=&quot;index.php&quot; class=&quot;link1&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;metal&quot; class=&quot;drop link2&quot;&gt;Metal&lt;!--[if IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
            &lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
            &lt;ul&gt;
                &lt;li&gt;&lt;a href=&quot;gold.php&quot;&gt;Gold&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;aluminum.php&quot;&gt;Aluminum&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;brass.php&quot;&gt;Brass&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;stainless-steel.php&quot;&gt;Stainless Steel&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
            &lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
        &lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;plastic&quot; class=&quot;drop link3&quot;&gt;Plastic&lt;!--[if IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
            &lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
            &lt;ul&gt;
                &lt;li&gt;&lt;a href=&quot;polyethelene.php&quot;&gt;Polyethelene&lt;/a&gt;&lt;/li&gt;

                &lt;li&gt;&lt;a href=&quot;polycarbonate.php&quot;&gt;Polycarbonate&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;fiberglass.php&quot;&gt;Fiberglass&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;pvc.php&quot;&gt;PVC&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
            &lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
        &lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;services.php&quot; class=&quot;drop link4&quot;&gt;Services&lt;!--[if IE 7]&gt;
        &lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;

            &lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
            &lt;ul style=&quot;height:240px;top:-40px;&quot;&gt;
                &lt;li&gt;&lt;a href=&quot;art.php&quot;&gt;Art&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;design-for-manufacturing.php&quot;&gt;Design For Manufacturing&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;prototyping.php&quot;&gt;Prototyping&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;quickturn.php&quot;&gt;Quickturn&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;safety-design.php&quot;&gt;Safety Design&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;kits-and-assembly.php&quot;&gt;Kits &amp; Assembly&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;rfq.php&quot;&gt;Request For Quote&lt;/a&gt;&lt;/li&gt;

            &lt;/ul&gt;
            &lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
        &lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;news.php&quot; class=&quot;link5&quot;&gt;News&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;catalog.php&quot; class=&quot;link6&quot;&gt;Catalog&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;about.php&quot; class=&quot;link7&quot;&gt;About Us&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;contact.php&quot; class=&quot;link8&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;users.php&quot; class=&quot;link9&quot;&gt;Registered Users&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
</pre>
<p>We&#8217;re creating 3 dropdowns that come out of the links Metal, Plastic, and Services. We haven&#8217;t made too many changes to our HTML from the previous post. The <em>#navigation ID</em>  has been moved off of the <em>ul</em> and onto the containing <em>div</em> because of the way that Stu Nichols did many of his selectors in his drop-down. Also, please take note of the way that the Internet Explorer conditional comments have been structured in this. You don&#8217;t want to screw those up, or IE will render things ugly the way that it normally does!</p>
<p>That was the easy part, and now for the CSS which I will just break down line for line. Once again, you can get the whole thing <a href="http://jorenrapini.com/posts/css-rollovers/post2.html">at this link</a>.</p>
<p>Most of this code is just styling that will be specific for the navigation for every link , and there are some old IE hacks in here as well. Make sure you just replace the code that you need, and put your width in all of the right places:
<pre name="code" class="css">

#navigation {width:145px;position:relative; z-index:100;margin-top:50px; border-right:1px solid #999; padding:10px 0px; float:left;}
/* hack to correct IE5.5 faulty box model */
* html #navigation {width:145px; w\idth:144px;}
/* float the list to make it horizontal and a relative positon so that you
can control the dropdown menu positon */
#navigation li {width:145px;position:relative;}
/* style the links for the top level */
#navigation a, #navigation a:visited {display:block; height:47px;
background:url(navigation.png) top left; text-indent:-9000px;}
/* a hack so that IE5.5 faulty box model is corrected */
* html #navigation a, * html #navigation a:visited {width:145px;w\idth:145px;}
</pre>
<p></p>
<p>Just follow the CSS comments that Stu Nichols has placed in his code here. We&#8217;re still not doing any huge alterations other than styling things specific to this drop-down. For our purposes we&#8217;re only doing one sub-level, but I left the CSS in here for you to style a third one if needed:
<pre name="code" class="css">

/* style the second level background */
#navigation ul ul a.drop, #navigation ul ul a.drop:visited {
	background:#2d3d47}
/* style the second level hover */
#navigation ul ul a.drop:hover{background:#fff; color:#202c32;}
#navigation ul ul :hover &gt; a.drop {background:#fff; color:#202c32;}
/* style the third level background */
#navigation ul ul ul a, #navigation ul ul ul a:visited {
	background:#e2dfa8;}
/* style the third level hover */
#navigation ul ul ul a:hover {background:#b2ab9b;}
</pre>
<p></p>
<p>This is where you figure out your exact positioning of the sub-levels, as well as style their appearance. Once again, the extra sub-level code is left in here and unaltered, just make sure that you are going down each line and putting in the code that is specific for your design:
<pre name="code" class="css">

/* hide the sub levels and give them a positon absolute so that they take up no room */
#navigation ul ul {
	visibility:hidden;
	position:absolute;
	top:-10px; left:145px;
	padding:4px;
	background:#2d3d47;
	height:96px; width:145px;
	border-left:1px solid #999;
	}
/* another hack for IE5.5 */
* html #navigation ul ul {top:-9px;t\op:-10px;}

/* position the third level flyout menu */
#navigation ul ul ul{left:149px; top:-1px; width:149px;}

/* position the third level flyout menu for a left flyout */
#navigation ul ul ul.left {left:-149px;}

/* style the table so that it takes no ppart in the layout - required for IE to work */
#navigation table {position:absolute; top:0; left:0; border-collapse:collapse;}

/* style the second level links */
#navigation ul ul a, #navigation ul ul a:visited {
	background:#2d3d47;
	color:#fff;
	height:auto;
	line-height:14px;
	text-indent:0px;
	display:block;
	padding:5px;
	text-decoration:none;
	font-size:11px;
	}
/* yet another hack for IE5.5 */
* html #navigation ul ul a, * html #navigation ul ul a:visited {
	width:145px;w\idth:145px;}
</pre>
<p></p>
<p>This is where we put in a lot of our code for doing the image rollover. This part is a little tricky, because I found an interesting IE6 quirk that stumped me for a while and I still haven&#8217;t quite been able to make sense out of it. You&#8217;ll see what I&#8217;m talking about by the consolidation comment on the first sub-level drop-down. Our background position code from the last post is largely unchanged except for when we have a drop-down on links 2, 3, and 4. We now have the selector <em>#navigation :hover > a.link2, #navigation ul ul :hover > a.link2</em> which is telling the image rollover to stay in its hover state while the user is browsing through the sub-levels:
<pre name="code" class="css">

/* style the top level hover */
#navigation :hover &gt; a, #navigation ul ul :hover &gt; a {
	background:url(navigation.png) top left;}

/* top level image background placements */
#navigation a.link1:hover {background-position:-146px 0px;}
#navigation a.link2 {background-position:0px -47px;}
/* DO NOT consolodate next 2 lines into one, this breaks IE6 */
#navigation a.link2:hover {background-position:-146px -47px;}
#navigation :hover &gt; a.link2, #navigation ul ul :hover &gt; a.link2  {
	background-position:-146px -47px;}
#navigation a.link3 {background-position:0px -94px;}
#navigation a.link3:hover{background-position:-146px -94px;}
#navigation :hover &gt; a.link3, #navigation ul ul :hover &gt; a.link3  {
	background-position:-146px -94px;}
#navigation a.link4 {background-position:0px -141px;}
#navigation a.link4:hover {background-position:-146px -141px;}
#navigation :hover &gt; a.link4, #navigation ul ul :hover &gt; a.link4  {
	background-position:-146px -141px;}
#navigation a.link5 {background-position:0px -188px;}
#navigation a.link5:hover {background-position:-146px -188px;}
#navigation a.link6 {background-position:0px -235px;}
#navigation a.link6:hover {background-position:-146px -235px;}
#navigation a.link7 {background-position:0px -282px;}
#navigation a.link7:hover {background-position:-146px -282px;}
#navigation a.link8 {background-position:0px -329px;}
#navigation a.link8:hover {background-position:-146px -329px;}
#navigation a.link9 {background-position:0px -375px; height:65px;}
#navigation a.link9:hover {background-position:-146px -375px;}
</pre>
<p>The rest of the code is just a little extra styling. We now have a fast drop-down menu with image roll-overs using nothing more than CSS! Again, you can view the code for our final result <a href="http://jorenrapini.com/posts/css-rollovers/post2.html">here</a>. If you have any tips, questions or problems that you run into while trying to reproduce this, please leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://jorenrapini.com/blog/web-development/css-navigation-rollovers-with-drop-downs/feed</wfw:commentRss>
		</item>
		<item>
		<title>Super Fantastic CSS Navigation Image Rollovers</title>
		<link>http://jorenrapini.com/blog/web-development/super-fantastic-css-navigation-image-rollovers</link>
		<comments>http://jorenrapini.com/blog/web-development/super-fantastic-css-navigation-image-rollovers#comments</comments>
		<pubDate>Wed, 03 Dec 2008 03:30:10 +0000</pubDate>
		<dc:creator>Joren Rapini</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[HTML]]></category>

		<category><![CDATA[Menu]]></category>

		<category><![CDATA[Navigation]]></category>

		<guid isPermaLink="false">http://jorenrapini.com/blog/?p=137</guid>
		<description><![CDATA[The fun part of CSS (if you&#8217;re a weirdo like me and get a kick out of this sort of thing) is coming up with the most optimized, cleanest, accessible, and compliant code that you possibly can. This tutorial will show you one of my favorite ways of doing a navigation menu with image rollovers [...]]]></description>
			<content:encoded><![CDATA[<p>The fun part of CSS (if you&#8217;re a weirdo like me and get a kick out of this sort of thing) is coming up with the most optimized, cleanest, accessible, and compliant code that you possibly can. This tutorial will show you one of my favorite ways of doing a navigation menu with image rollovers done in CSS that uses only one image and very minimal HTML / CSS code. This is by no means the only way of going about it, nor is it the &#8220;right&#8221; way if there is such a thing, but I&#8217;ve found this to be a very quick and efficient way of accomplishing our task.</p>
<p>This article is the first of a 2 part series, and the second half will apply this tutorial into creating a CSS only dropdown menu navigation with the image rollovers that is compliant with IE6 and up.</p>
<p><span id="more-137"></span></p>
<p><a href="/posts/css-rollovers/post1.html">Click here to see a demo</a> of what we&#8217;ll be doing.</p>
<p>The first trick is to make your navigation image. The best way of going about this is to create your menu in photoshop, double it&#8217;s width (or height if you are doing a horizontal navigation), and then paste the exact same thing with ever link in its rollover state right next to it. It should look <a href="/posts/css-rollovers/navigation.png">something like this</a>. This makes for quicker load time than if you did every image separately and even less CSS needed.</p>
<p>Next we will write all of the HTML out:</p>
<pre name="code" class="xhtml">

&lt;ul id=&quot;navigation&quot;&gt;
    &lt;li&gt;&lt;a href=&quot;index.php&quot; class=&quot;link1&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;metal&quot; class=&quot;link2&quot;&gt;Metal&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;plastic&quot; class=&quot;link3&quot;&gt;Plastic&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;services.php&quot; class=&quot;link4&quot;&gt;Services&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;news.php&quot; class=&quot;link5&quot;&gt;News&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;catalog.php&quot; class=&quot;link6&quot;&gt;Catalog&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;about.php&quot; class=&quot;link7&quot;&gt;About Us&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;contact.php&quot; class=&quot;link8&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;users.php&quot; class=&quot;link9&quot;&gt;Registered Users&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>I always set up my navigation menus in unordered lists. Normally just one &#8216;id&#8217; on the &#8216;ul&#8217; tag would be enough HTML, but in the case of each link having its own background then each link has to have its own class.</p>
<p>Here is the CSS for our menu:</p>
<pre name="code" class="css">

#navigation {
	border-right:1px solid #999;
	padding:10px 0px;
	width:145px;
}
#navigation a  {
	display:block;
	background:url(navigation.png);
	height:47px;
	text-indent:-9000px;
}
#navigation a.link1:hover {background-position:-146px 0px;}
#navigation a.link2 {background-position:0px -47px;}
#navigation a.link2:hover {background-position:-146px -47px;}
#navigation a.link3 {background-position:0px -94px;}
#navigation a.link3:hover{background-position:-146px -94px;}
#navigation a.link4 {background-position:0px -141px;}
#navigation a.link4:hover {background-position:-146px -141px;}
#navigation a.link5 {background-position:0px -188px;}
#navigation a.link5:hover {background-position:-146px -188px;}
#navigation a.link6 {background-position:0px -235px;}
#navigation a.link6:hover {background-position:-146px -235px;}
#navigation a.link7 {background-position:0px -282px;}
#navigation a.link7:hover {background-position:-146px -282px;}
#navigation a.link8 {background-position:0px -329px;}
#navigation a.link8:hover {background-position:-146px -329px;}
#navigation a.link9 {background-position:0px -375px; height:65px;}
#navigation a.link9:hover {background-position:-146px -375px;}
</pre>
<p>Now for the broken down detailed explanation of the CSS:</p>
<ul>
<li>The border and padding on the <strong>#navigation</strong> is simply for looks on this menu</li>
<li>The width on <strong>#navigation</strong> is set to the size of our whole nav menu</li>
<li><strong>#navigation a</strong> lets us apply the following styles to every link within the ul</li>
<li><strong>Display:block</strong> is an extremely useful property in many situations. It will change the element into a block level element, i.e. it will act like a <strong>div</strong>. We can now apply styles to a link that we couldn&#8217;t have before.</li>
<li><strong>Background:url(navigation.png)</strong> sets the background for each link</li>
<li>The <strong>height</strong> is important, otherwise the link will only be the size of the text by default. In this case, the links&#8217; width is determined by the containing ul&#8217;s width.</li>
<li><strong>Text-indent:-9000px</strong> moves the text within the anchor tag off of the page which allows search engines to still have something to index</li>
<li>Lastly, the key to this CSS strategy is changing the background-position separately for every link and its hover state. For example, <strong>#navigation a.link3:hover{background-position:-146px -94px;}</strong> tells the browser to move the background image on our 3rd link&#8217;s hover state 146 pixels to the left and 94 pixels up. These numbers are all determined by the size of each link, e.g. each link&#8217;s background position is 47 pixels higher than the one before it because that is the height of our links.</li>
</ul>
<p>That&#8217;s it! Probably the trickiest part is setting up your image and getting the pixels right on the background positions. If you have any suggestions, comments or questions, please leave them! If you stumbled upon this little gem, make you check out <a href="http://jorenrapini.com/blog/web-development/css-navigation-rollovers-with-drop-downs#post-170">CSS Navigation Rollovers With Drop Downs</a> where we use this rollover technique in a tutorial to create CSS drop downs.</p>
]]></content:encoded>
			<wfw:commentRss>http://jorenrapini.com/blog/web-development/super-fantastic-css-navigation-image-rollovers/feed</wfw:commentRss>
		</item>
		<item>
		<title>Beginning of a new era. Or. . . maybe just a new website</title>
		<link>http://jorenrapini.com/blog/general/beginning-of-a-new-era-or-maybe-just-a-new-website</link>
		<comments>http://jorenrapini.com/blog/general/beginning-of-a-new-era-or-maybe-just-a-new-website#comments</comments>
		<pubDate>Sun, 23 Nov 2008 08:39:22 +0000</pubDate>
		<dc:creator>Joren Rapini</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Blog]]></category>

		<category><![CDATA[Portfolio]]></category>

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://jorenrapini.com/blog/?p=3</guid>
		<description><![CDATA[Hello everyone!
I&#8217;ve been hard at work at this new website. Well, really going back and forth between &#8220;hard&#8221; work and &#8220;I&#8217;ll get to that later. . .&#8221; work. The website is finally complete, and now that it is I plan on working a lot more with it.

This section of the website will mainly be used [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everyone!</p>
<p>I&#8217;ve been hard at work at this new website. Well, really going back and forth between &#8220;hard&#8221; work and &#8220;I&#8217;ll get to that later. . .&#8221; work. The website is finally complete, and now that it is I plan on working a lot more with it.<br />
<span id="more-3"></span><br />
This section of the website will mainly be used for me to post any great findings that I stumble upon on the internet, relating to anything graphic or web design, web development and such. One of the biggest weapons that a web developer / designer has in his or her arsenal is their resource of bookmarks. I wouldn&#8217;t have such a huge collection if it were not for our line of work being such a sharing community, so I wish to continue that trend with my own website.</p>
<p>I will more than likely also post major personal achievements and events here as well, since I&#8217;m not too active in social networking sites like Myspace, Facebook, Twitter, etc. Stay in touch and check the website often! In the next few days I plan on posting some CSS techniques of mine that I love to use.</p>
]]></content:encoded>
			<wfw:commentRss>http://jorenrapini.com/blog/general/beginning-of-a-new-era-or-maybe-just-a-new-website/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
