Feb 1, 2009

[DIY] CSS Vertical Navigation Menu for Blogger

I really wanted to give my blog Sweet Faerie Designs a navigation menu makeover with hovering picture abilities - how geeky of me! I know.

Anyways, I've always loved Blogger University's (Blog U) and Web Designer Wall's menus and they both have directions for a horizontal CSS menu, so I took a stab at a vertical menu.



The widget information is the same and you should check out their sites for that information. Or, just copy and paste the information below into a HTML widget:

<ul id="menu">
<li><a href="#" class="home">Home <span></span></a></li>
<li><a href="#" class="about">About <span></span></a></li>
<li><a href="#" class="rss">RSS <span></span></a></li>
</ul>

I did my pictures differently, because their method confused me, even though it might not you. OK, I probably just confused you. If I did confuse you, then please follow their directions, if not stay with me.

  • In Photoshop Elements 5 (I'm working on an older version here)
  • I created a .PSD file size 600px x 240px
  • On a transparent background
  • Typed the text HOME in a font I got from dafont (free) which I wanted for my 1st button
  • Saved that
  • Then I duplicated it (so the text would be in the same spot)
  • On the duplicated HOME .PSD file I added a butterfly doodle to the right of the text
  • Saved that
  • Then I saved both files as .PNG files.
  • I repeated that step for my Etsy store, RSS and email buttons.
  • I resized all of my .PNG files to 150px x 60px
  • And, finally uploaded them to a Photobucket account (this is free!)

All right, now that our pictures are ready, you'll need to copy and paste this code into your Blogger Template - BUT FIRST DOWNLOAD YOUR CURRENT TEMPLATE and save it where you can get to it in case this doesn't work for you.:

/*Roll over feed
-----------------------------------------------*/
#menu {
list-style: none;
padding: 0;
margin: 0;
width: 200px;
height: 220px;
background: url() no-repeat;
position: relative;
}

#menu span {
display: none;
position: absolute;
}

#menu a {
display: block;
text-indent: -900%;
position: absolute;
outline: none;
}

#menu a:hover {
background-position: left bottom;
}

#menu a:hover span{
display: block;
}

#menu .home {
width: 150px;
height: 60px;
background: url(http://...homebutton.png) no-repeat;
left: 10px;
top: 10px;
}

#menu .home span {
width: 150px;
height: 60px;
background: url(http://...homeoverbutton.png) no-repeat;
left: 0px;
top: 0px;
}

#menu .etsy {
width: 150px;
height: 60px;
background: url(http://...Etsybutton.png) no-repeat;
left: 10px;
top: 60px;
}

#menu .etsy span {
width: 150px;
height: 60px;
background: url(http://...Etsyoverbutton.png) no-repeat;
left: 0px;
top: 0px;
}

#menu .rss {
width: 150px;
height: 60px;
background: url(http://...RSSbutton.png) no-repeat;
left: 10px;
top: 110px;
}

#menu .rss span {
width: 150px;
height: 60px;
background: url(http://...RSSoverbutton.png) no-repeat;
left: 0px;
top: 0px;
}

#menu .email {
width: 150px;
height: 60px;
background: url(http://...emailbutton.png) no-repeat;
left: 10px;
top: 160px;
}

#menu .email span {
width: 150px;
height: 60px;
background: url(http://...emailoverbutton.png) no-repeat;
left: 0px;
top: 0px;
}

Anything that is the color purple and bold you'll need to change with your own picture links.

If you have any questions as
to what the code above means Web Designer Wall breaks it down for you step by step and if very informative.

It's always best to do a PREVIEW before saving just to make sure the buttons are in the right place (the hover buttons won't show on your preview.) If you buttons look good, save and then view your blog.