Today is the fourth course in my series on blog navigation menus – dessert. Some ‘sweet’ menus for you to copy – suitable for WordPress and Blogger.
Here is the html code you will need for all the examples:
HTML
<div id="menu"> <ul> <li class="selected"><a href="http://www.your home page.com">Link2</a></li> <li><a href="http://www.your link.com">Link2</a></li> <li><a href="http://www.your link.com">Link3</a></li> <li><a href="http://www.your link.com">Link4</a></li> <li><a href="http://www.your link.com">Link4</a></li> </ul> <div class="clear"></div> </div>
Menu Bar
CSS
<style type="text/css">
<!--
#menu, #menu li a {background-color: #8AAADF; color: #ffffff; font-size: 1.0em; font-weight: normal; height: 1.5em; line-height: 1.5em; text-decoration: none; }
#menu, #menu li {padding: 0; margin: 0;} #menu ul { padding: 0; margin: 0 0 0 25px; }
#menu li { float: left; list-style-type: none; white-space: nowrap; }
#menu li a { background-color: inherit; display: block; padding: 0 10px; border-right: 1px solid; border-right-color: #ffffff; }
#menu .selected, #menu a:hover { background-color: #B9CCEC; color: #ffffff; text-decoration: none; border-right: 1px solid #537495; border-right-color: #5B80A4; }
-->
</style>
Tabbed Menu
CSS
<style type="text/css">
<!--
#menu, #menu li a { color: #000000; font-size: 1.0em; font-weight: normal; height: 1.5em;
line-height: 1.5em; text-decoration: none; }
#menu, #menu li { background-color: #FFFFFF; padding: 0; margin: 0;}
#menu {border-bottom: 1px solid; border-bottom-color:#83E292;}
#menu ul { padding: 0; margin: 0 0 0 25px; }
#menu li { float: left; list-style-type: none; white-space: nowrap; margin-left: 10px; }
#menu li a { background-color: #83E292; display: block; margin: 0; padding: 0 10px; border:0;}
#menu .selected, #menu a:hover { background-color: #A0E9AB; color: #ffffff; margin: 0; font-size: 1em; text-decoration: none; border:0;}
-->
</style>
You will of course need to change the links to your own: Copy the code for your chosen menu into a text editor such as Notepad or Wordpad and alter the links to point to where you want them to go. This means altering not only the link text – e.g. Sausage Links – but the hyperlink too. Change http://www.your link.com to the address you are pointing the link to. (remember that blogger does not use the www prefix so you homepage will be something like http://yourbloggeraddress.blogspot.com)
These menus, styled using CSS, are infinitely changeable. If you wish for a thicker menu bar change the height and line height values (currently 1.5em). Change the colors to suit the rest of your blog by changing the values for "background-color" and for text "color".
How to use them in your blog:
Blogger
You can do this by adding an "html/javascript" page element. Firstly you need to make sure you are able to add the page element in the place you want it.
Go to your layout/html section and backup your current layout. Tick the "expand widgets" box. You can alter either of the following two tags (you may not have the crosscol wrapper so will need to alter the header section.
Change:
<b:section class='"crosscol"' id='"crosscol"' showaddelement='"no"'
To:
<b:section class='"crosscol"' id='"crosscol"' showaddelement='"yes"'
Or:
Change
<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
To:
<b:section class='header' id='header' maxwidgets='2' showaddelement='yes'>
If you already have 2 widgets add another and so on.
Now go to your layout/add element area and add an HTML/Javascript element to the header or cross column section. Copy and paste the CSS and the html code from your chosen menu into this. Alternatively, add just the html code to your html/javascript element and put the css into the style area of your template. Because Cascading Style Sheets cascade you may find the font size of the menus too larage or small so change the "font-size" in the html.
WordPress
You can approach this in two ways. If you already have a horizontal navigation menu built into your theme then you can just style this. The default WordPress menu is already called "menu" so the only changes that are needed are to the your style.php file. From the menu examples above only add the CSS styling portion (the code between the "<style type="text/css"><!–" and "–>
</style>" tags), replacing any tags of the same name.
If you do not have a horizontal menu bar already you can add one by adding the html code to your themes header.php file – just below the header division.
If you want to get fancy then instead of your home page address you can use this line instead.
<li><a href="<?php echo get_settings('home'); ?>"></a></li>
The next and final course in this menu tutorial will be made of a variety of fresh ingredients to tempt you to indulge yourselves.















hope you have a wonderful Easter too Renny. My Good Friday has been spent trying to recover files from a reformatted computer. It could have been disastrous but I think I have saved what really matters…
Hi Sue,
Thanks for the guided tip. I will try it out on my wife’s blog.
–Durano, done!
Durano Lawayan’s last blog post..Obama’s Obverse Oratory
Thanks Durano. Please let me know how you go.
Thanks Sue for sharing your knowledge in this educational and readable way. You are presenting the subject in such a great, pedagogical way!
Hey Sue,
You should also check this one out,
it’s drop downs based completely on CSS:
http://www.alistapart.com/articles/horizdropdowns
There’s also more good stuff from alistapart, try searching their blog for “css menus”
SiteHoppers’s last blog post..Beer Stock Market – How doeeeees it work again?
Thanks Sue for sharing your knowledge in this educational and readable way. You are presenting the subject in such a great, pedagogical way!
Wishing you a great Friday, a nice weekend ahead and A wonderful Easter Holiday
RennyBA’s last blog post..Spring Equinox and an Easter Egg hunt
I hope you have a wonderful Easter too Renny. My Good Friday has been spent trying to recover files from a reformatted computer. It could have been disastrous but I think I have saved what really matters.
Thanks for walking us all through this in such an easy to follow format.
Will pop back in this weekend and give it a lash.
Thank you for sharing… I’m trying to use it on my blog but I think I’m doing something wrong…
You’d see the mess I have done…I’m no way a good webdesigner!
I will come along and take a look
Hi Sue
this is a brilliant series that you have done, bookmarking for you
Thankryou for sharing.I am finding your blog so helpful, your tech skills are great
Suzie Cheel’s last blog post..Motivational Sayings on a Monday
Thanks Suzie, I appreciate your kind words – it makes the time taken worthwhile.
Sue
Thanks for walking us all through this in such an easy to follow format.
Will pop back in this weekend and give it a lash.
Best to you and if you celebrate Easter – then have a nice one.
Thanks again.
MorganLighter’s last blog post..Weather Channel Founder: Sue Al Gore for Fraud
I did try hard to make it easily understandable but please let me know if you have any problems.
Wow that’s some useful information there. So rare to see it all spelled out so easy to read.
Hello Sue. I shall try this out and give you feedback. Thank you very much for this guide!
Janette Toral’s last blog post..Immigration to Australia by Skilled Workers
Thanks Janette – any feedback would be appreciated. I plan to create a series of menus in different styles for download so it would be good to know if the current ones I have done are easy enough to work with.
I noticed from your blog that you are new to Australia. I hope you enjoy living in your adopted country as much as I do
Very interesting! thank.
Wow that’s some useful information there. So rare to see it all spelled out so easy to read.
Mike’s last blog post..Hacked 2.0 iPhone In Action
Thanks Mike – when I was learning I needed it spelled out very carefully step by step so I should do the same for others
Brilliant guide, i will file this away and use when redisgning my blog.
Navigation Menus 4 – DessertThere are a couple of examples there that you can just copy and paste into an html page element.
i used this information
thanks this is helpful post
Great article. I will use this information for build my other blog. Thank you for sharing.
Great tips. This helpful for develop my blog. Thank you for your information.
ourcelebritiess last blog post..American Idol | American Idol Winners | Finale Idol 2009 | Kris Allen | Adam Lambert
very useful thanks. laptop
god bless you too neccessary informations hosting web hosting
Thank you for nice informations they are too neccessary for me !
Very useful informations but it will be too good. I Think that they are useful for people with sharing opinions. I bookmarked. nlp e?itimi ya?am koçu
Thanks for walking us all through this in such an easy to follow format
.
Will pop back in this weekend and give it a lash.
Best to you and if you celebrate Easter
– then have a nice one.
Thanks again.