A Tab Menu For Your Very Own
A few weeks ago I was asked by a web designer to help get a tab menu on a blog that was to be integrated with a web site. I have never worked with setting up a tabbed menu before, so I set off in quest of an answer. Happily I was able to piece together bits of code from here and there. This is the result:
I was able to use the instructions from Blogger and Free Templates but, I'll attempt to simplify their instructions here.
This is how you can get a tabbed menu on your blog. First, backup your template. Now open your Dashboard | Layout | Edit HTML. Locate the CSS style sheet between the <b:skin><![CDATA[/* and ]]></b:skin> tags and add the following code.
Note: It doesn't make any difference exactly where it goes, but a good place would be after the
/* Header
----------------------------------------------- */ section.
Here is the code:
/*credits : http://blogger-freetemplates.blogspot.com , HariesDesign.com*/Save your template. Scroll down your template past the CSS style sheet and find:
#tabshori {
float:left;
width:100%;
font-size:13px;
border-bottom:1px solid #2763A5;
line-height:normal;
}
#tabshori ul {
margin:0;
padding:10px 10px 0 50px;
list-style:none;
}
#tabshori li {
display:inline;
margin:0;
padding:0;
}
#tabshori a {
float:left;
background:url("LEFT IMAGE") no-repeat left top;
margin:0;
padding:0 0 0 4px;
text-decoration:none;
}
#tabshori a span {
float:left;
display:block;
background:url("RIGHT IMAGE") no-repeat right top;
padding:5px 14px 4px 4px;
color:#24618E;
}
/* Commented Backslash Hack hides rule from IE5-Mac \*/
#tabshori a span {float:none;}
/* End IE5-Mac hack */
#tabshori a:hover {
background-position:0% -42px;
}
#tabshori a:hover span {
background-position:100% -42px;
}
<b:section class='header' id='header'Replace with this code:
maxwidgets='1' showaddelement='no'>
<b:widget id='Header1' locked='true'
title='your blog title (Header)' type='Header'/>
</b:section>
<b:section class='header' id='header'Save your template. Open the Page Elements tab in your dashboard. Notice you now have the option to add a page element to your header section. Which also means you have the option to drag and drop the element where you would like your tabs to display...above or below the header. Click on Add a Page Element and put this code in the window, replacing my links with yours:
maxwidgets='2' showaddelement='yes'>
<b:widget id='Header1' locked='false'
title='your blog title (Header)' type='Header'/>
</b:section>
<div id="tabshori">That is it for the code end. Now all you need is the tab graphics. A little search revealed several, but my favorites came from explodingboy. Click to see them:
<ul>
<!-- Change the links with your own links -->
<li><a href="http://www.bloggeruniversity.blogspot.com/"><span>Home</span>
</a></li>
<li><a href="http://www.bloggeruniversity.blogspot.com/"><span>3 Column</span></a></li>
<li><a href="http://www.bloggeruniversity.blogspot.com/"><span>2 Column </span></a></li>
<li><a href="http://www.bloggeruniversity.blogspot.com/"><span>Blogging Tips</span></a></li>
<li><a href="http://www.bloggeruniversity.blogspot.com/"><span>Seo Tips</span></a></li>
</ul>
</div>
You can download them here: Tab Set 1 and Tab Set 2. You will need to upload your images to a web host such as Ripway and insert the image in the above code where it says IMAGE LEFT and IMAGE RIGHT. You will notice that each image in the zip file has a left and right.
Enjoy your new tab menu! I have used them for ages in Buttermilk Clouds, but can't take credit for adding them. They happily came with the template. But, you can take a peek and see some uses for the tabs. Buttermilk Clouds is a classic template, so the code is different for that style template. If there is enough interest, I may attempt a post on adding a tab menu to the Classic Blogger. Let me know.
73 Comments:
Hi Annie - I sent an email to the bloggeruniversity account; just wanted to make sure you got it. Thanks!
Aerin
@Aerin, I haven't received an email from you yet. Try again!
Thanks...implemented at http://www.omodudu.com
@Aerin,
I can set it up for you. Email me:
anniebluesky@gmail.com and I can tell you what I need to get going.
This is great! Thank you so much!
This is a really cool menu system for a blog! I do not have any design work going on but I will bookmark this for future reference.
Annie, you always have the best tips on your blog!
Congratulations!!! You have been nominated for a 2007 Best Of Blog Award!! Especially designed to bring attention to lower profile bloggers, The BoB’s as we like to call them are currently taking nominations in over 20 different categories. To find out more about how your site has a chance to become one of this year’s Best Of’s and how to nominate other bloggers, visit us at www.thebestofblogs.com. Remember voting begins April 14th so make sure you pass the word to your friends, family, and faithful followers.
Sincerely,
Bill Beck
Project Mgr.
The Best Of Blog Awards
Email:Bloggerbeck@aol.com
I'm not understanding yet. Do I need to make an image for each tab I want to use?
For myself I think the best tweak you have had here was the 3 column footer. It has been the best way I have found to shift sidebar content around so it doesn't look so cluttered on top.
Got it working. Figured out the image thing. Will tweak the colours tomorrow. Mainly I'd like to switch out that blue highlight for something red or pink to work with my layout.
Hi annie
This is about your absolutely wonderful A day Without Chocolate template. You'd disabled comments on that one so I decided to ask you here....
I'll take the liberty of asking you a favour. Is there some way I could use the link-hover effect in that template on my blog? Just that.
It would be great if you could help
Thanks in advance.
Looking forward to your reply...
@Sanyukta, Sorry the comments were turned off. Sometime Blogger gliches and does that. I reset it.
I did a little post in answer to your question...
The Link Hover Evffect (From My Reader's Emails)
Hi! I tried this on my test blog and I managed to get everything right except when I tried to drag this page element to below my header, it wouldn't move.
@CQ, I just started from scratch on a test blog, and it balked at moving for me, too. So, I dragged the widget further down past the header widget and let it fly back...it stopped under the header!
The other way would be to manually switch the code in the template:
<b:section class='header' id='header' maxwidgets='2' showaddelement='yes'>
<b:widget id='Header1' locked='false' title='YOUR TITLE (Header)' type='Header'/>
<b:widget id='HTML1' locked='false' title='' type='HTML'/>
</b:section>
Copy and cut:
<b:widget id='Header1' locked='false' title='YOUR TITLE (Header)' type='Header'/>
and paste it under:
<b:widget id='HTML1' locked='false' title='' type='HTML'/>
Nice and simple coding.I like this.Thanks a lot.
Tha Naked Politician
Thanks for the great article. I've linked to your site from mine and hope this will help others to find you easier so that they too can find some great articles. A friend especially :)
@Oz, thanks for the link! Take a look around my blog...you will find lots of goodies!!
Did as you advised and it worked! :o)
How much is that necessary for a blog? My friend suggested me to make on of them on my blog.
@image hosting, this is just another way to navigate through your blog. Necessary? No. Nice? Yes.
Thanks! I've been wanting to integrate a blog onto my website for sometime, but had no idea how to do it.... until reading this post!
This is a really cool menu system for a blog! I enjoyed it.
Just found your blog the other day, thanks for sharing all this information. I'v just inserted very plain tabs on my blog in the way you described.
Hi! I'm most thankfull for this, it's amazing and everything went well until I click on any of the tabs and then I get this annoying message that says if I want to see all posts not just labelled ones and I want to know how to turn this off?
I appreciate your time, keep up the good work!
@Tit, I took a look at your template. I don't know exactly why your menu does that.
I had problems dealing with your language. But, I think I have a solution.
First SAVE YOUR TEMPLATE.
I believe it is all tied to this code. So, locate and remove this code...I think that will take care of it.
<div class="status-msg-wrap">
<div class="status-msg-body">
Prikaz objav z oznako
<b>Teorija</b>
.
<a href="http://fimuthe.blogspot.com/"> Pokaži vse objave </a>
</div>
<div class="status-msg-border">
<div class="status-msg-bg">
<div class="status-msg-hidden">
Prikaz objav z oznako
<b>Teorija</b>
.
<a href="http://fimuthe.blogspot.com/"> Pokaži vse objave </a>
</div>
</div>
</div>
</div>
hi Annie,
I have tried and tried to get the tabs menu working on a test blog;
test
the links to the test pages work in the sidebar, but not as menu tabs.
thanks for the great tips.
@Kim, I tried looking at your code source but couldn't see a reason. Send me your XML file and the contents of the tab widget and let me look.
Thanks Annie, so much. I sent an previous email to blogger university, did you recieve? have sent another just now with the xml code and widget code to your bluesky email
thanks for you tab menu tip , i will try. good luck
Annie,
thanks so much for the help with the tabs, you've been most patient and agreeable.
Hi Annie,
I am loving your tabs! I have been trying to add the tabs to my blog today...but I keep getting this error message:
We were unable to save your template
Please correct the error below, and submit your template again.
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The element type "div" must be terminated by the matching end-tag "
I get this error message when I Replace with the b section code:
Any help would be appreciated! Thanks!
Gena
@Gena, I don't know why that happened. I would try all over again, very carefully adding the exact code in the exact place as outlined in the post. If that doesn't work, send me your xml file and the code you are putting in the b:section area.
Hi Annie,
Thanks for the code. It work well on my blog but i haven't been able to figure out how to have the tabs on the actual header (in the middle of the picture that i used as header).
if you have any ideas on what to do i would really apreciate it.
thanks
rafael
www.agdes.blogspot.com
@Rafael, I don't know if it is possible. It probably is, but I just don't know how.
I'll add this on my list of problems to solve.
hi annie! thanks for this tutorial! :)
i'm already using this on my blog! :)
thank you for this menu ... i used it on one of my page and i'm really happy with it
Thanks for all the great tips on your site. I have had a lot of fun customizing my new blog. I would love to add the tabs feature, but I can't find certain pieces of code in my template to replace. Is it because I have already customized my header? Or maybe because I have a label cloud widget?
@TftCarrie, each template is a bit different. Sometimes it is ode that is similar...maybe worded differently.
Hi Annie,
I had the same problem as Gena. How did you solved it because I don't see you mentioning it here.
@Wendy Sue, to tell you the truth, I can't remember. I would try again...if that doesn't work, send me your xml file and i will look at ti when I get a chance.
How do I send you the xml file Annie?
Also, another thing that I don't quite get it is this. We don't have pages in blogger, do we? Unlike websites which have pages, wouldn't each tab link to a page?
But how does the tab works for blogger when what we do are merely posting blog posts?
Wendy, to get your XML file (which would be a good idea to save every now and then...especially before doing any template changes), go to your dashboard | layout | edit HTML | download full template.
No, we don't have "pages" in blogger. But, there are other options for tabs. Your about page, your labels, create a post and link to it which makes a page, create another 'mirror' blog and link to that, create a "subscribe to" tab, make a "email me" tab. Lots of options!
I completely agree with Wendy.. Annie because it is not that easy to laod files in blogs and i have tried that.
ughhh! I must have done something wrong! Instead of ending up with an add page element I ended up with a Navbar. Any idea what I'm doing wrong? I'll try again later when I have more time!
Hi Annie... thanks a lot for posting this tutorial. Really love your blog. I'm a newbie and because of you i manage to design my blog just like a pro hahaha (well,at least for me i guess). Thanks again. here's my blog (bloodymoogle.blogspot.com) and tell me what you think.
@bloody moogle, good job! It is really fun doing your own blog, isn't it?
This is a really cool menu system for a blog! I do not have any design work going on but I will bookmark this for future reference.
thank you very much. this is the most useful post about this issue. and i am using it. thanks again.
I am already using this code, but I need to know how to add a vertical submenu to the existing menu. Do you know? Step-by-step instructions are great. Don't leave anything out. Thanks.
http://tattnallbaseball.blogspot.com/
hello! I am creating a blog. I love that you are putting instructions on how to put tabs on a blog. I would like my tabs to be an image instead of actual tabs. I like how at the top of your blog "Home", "About", and "RSS" are an image instead of tabs. I would love to have something similar on my blog. please help;)!
Annie, thanks for such a great tutorial.
One questions, how can I change the hover color?
Thanks,
@angie, that is done with the images you get through the link I posted for explodingboy. You actually change the whole tab.
Thanks for such a quick reply. Your site is just great.
thanks for this, it's almost exactly what I was wanting - certainly far better than the 100s of other tutorials I've found so far!
thanks
thanks you sooooo much for this tutorial, it really helped a lot!!!
hey! i so so love this tutorial.. simple and easy to understand!! but.. i cant download the tabs..:(
thanks mam i'm is newbee i will get your link.
willion
hi ! thank , it so help a lot.
Hello,
Thank you for the great site.I put your tricks and things on all my blogs. I installed the tabs for my very own , happy that they work. I am having troubles with the tabs. I uploaded to ripway. Still no luck any suggestions? Maybe the back round color of my site?
www.speyco.net
Thanks your site is the best!
Ive got the tabs up. I just dont know how to link them to certain thing, on my blog. Any help would be so appreciated! Thank you! :)
I am stuck on the image insert step. Am I to overwrite the LEFT IMAGE and RIGHT IMAGE with the image link via Ripway? And only that text gets erased, leaving in the parentheses and quotation marks? I have tried doing that. I have tried deleting the (""). I have tried everything and nothing changes visually with my tabs. What am I doing wrong?
@the bumbles, leave ("") and put your link in. I would double check you URL, and make sure you are putting the right and left in. (Not both left or both right images.) Otherwise that is how it works. The code follows the link so if you put in the correct link and the correct code, it will work.
Usually if I have a problem like this, I will start completely over. Step by step. Most of the time that corrects the problem because I have left something out or added something I shouldn't have. So try that too.
How do I get the image from ripway into my html?
I have been trying to figure this out for a while and your information was very helpful. I am still kind of new to how to create a cool blogs but I am learning.
Thanks
Your skills are really one-of-kind!..I mean how can you possibly do and figure out these codes? I also want to learn how to do HTML and CSS but so far I'm just into the basic stuff...once it gets more advanced I get confused and dizzy.
Still works like a charm, thanks!
I was able to add the menu to my blog but it's not centered and it looks bad. And also, I don't know how to use it. How do I set up the pages that show up when you click on the tabs?
Thanks!
When I add your tabs code to my blog, it only gives me one column. Sigh!
http://linorstorecom.blogspot.com
Still trying to learn.
Thanks for posting this.
how to write in a tab
Hmm....nice tips for my blog...
it's a nice change from the normal table of contents. and it looks great as well! thanks for sharing`
waw..i will try this tutor..good job my friend