The easiest tabbed content widget for Blogger
Tabbed content box or tab view is a great way to maximize the usage of precious screen real estate on your blog.
There are quite a few tutorials out there that show how to create tabs with CSS and jQuery. However, most of them require you to modify your blog template codes. On top of that you also have to manually add the content of each tab.
Fortunately, with this tutorial you don’t have to go to all that troubles. All you have to do is add our tabber code into a HTML/Javascript widget. Once added, it will transform your Blogger blog’s existing widgets into tabs, automatically!
See the demo here.
Below are some of the features of the tab content box:
- Accommodates unlimited number of widgets.
- Keeps the tabbed widgets’ original appearance.
- Fully widgetized for ease of installation and removal. If you don’t like what it does, simply remove the HTML/Javascript gadget.
Installation
- Go to Design > Page Elements and click Add A Gadget.
- Select HTML/Javascript widget.
- Leave the title box blank.
- Copy the code below and paste it inside the content box.
<style type="text/css"> .tabber { padding: 0px !important; border: 0 solid #bbb; } .tabber h2 { float: left; margin: 0 1px 0 0; font-size: 12px; padding: 3px 5px; border: 1px solid #bbb; margin-bottom: -1px; /*--Pull tab down 1px--*/ overflow: hidden; position: relative; background: #e0e0e0; cursor:pointer; -moz-border-radius:5px 5px 0 0; border-radius:5px 5px 0 0; } html .tabber h2.active { background: #fff; border-bottom: 1px solid #fff; /*--"Connect" active tab to its content--*/ } .tabber .widget-content { border: 1px solid #bbb; padding: 10px; background: #fff; clear:both; margin:0; } .codewidget, #codeholder { display:none; } </style> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script> <script type="text/javascript" src="http://greenlava-code.googlecode.com/svn/trunk/publicscripts/bloggertabs0.1_min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#codeholder').bloggerTabber ({ tabCount : 3 }); }); </script> <!-- to make sure the widget works, do not alter the code below --> <div id='codeholder'><p>Get this <a href="http://www.bloggersentral.com/2011/05/create-tabbed-content-blogger-widgets.html" target="_blank">widget</a></p></div>- Code line 36 is for loading jQuery library. Remove this line if you’ve already loaded it somewhere else in your blog. Hint: If your blog has a slider, cycler or something with fading effect running, chances are it is powered by jQuery.
- Specify the number of widgets that you want to turn into tabs in line 41.
- The default box background color is white (#fff). You can change it in code line 27. Apply the same color for the active tab’s background and bottom border (in line 21 and 22).
- Position the HTML/Javascript gadget above the gadgets that you want to tabify.
- Click Save and view your blog.
Post-installation
- Make sure you title each widget that you want to tabify. Tabber won’t work properly without widget titles.
- Reduce tab widths so that all tabs fit into a single row. This can be achieved by using short widget titles.
- You may need to reduce the widths of the tabified widgets to fit them into the box.
- Don’t forget to test in Internet Explorer. This widget may cause “Operation aborted” error in IE for some non-designer templates. If that’s the case, this widget is not for you :(
Enjoy!
83 comments to "The easiest tabbed content widget for Blogger"
Do you have a demo of this?
Thx for info :)
Thanks.
Nice This post i place in my blog later,
Cute ;-)
Cool tip though. Definitely one I might use in the future.
@Anonymous
I've added the demo link.
I didn't get how to add the name of the gadgets to the tabber - I lined them up, the tabs showed up, they worked but it was all was whited out. Love the idea as I get tired of scrolling; my next step would be to put in "back to the top" code - somehow. Thanks.
@Roberta @ Silverwalk
The tabber copies the titles of the gadgets. That's why you have to title each widget.
As I came back to check for an answer, I looked more carefully at the tabs and realized just what you told me; I then changed the colors from #fff to ones that better fit the current colors of my blog. THANK YOU. This is SO cool :).
@Roberta @ Silverwalk
You're welcome :)
Thanks for this. I like it.
Thanks for the tutorial Green Lava, is there a WordPress plugin available for this.
I am new to blogging and for the life of me could NOT get this to work! The "tabs" did not show up as tabs, but rather stacked blocks. What am I doing wrong??
@Amy Sue's Place
I'm guessing the tabs are too wide?
@Naser
If I'm not mistaken there is a plugin called wooTabs. But it comes with premium wooThemes.
Hi,
That is THE widget I was looking for !! The best, easiest ! Thank U so much
You have a great tutorial, this is what i waiting for :D
I have a question
There is any way to put the tabs verticaly not orizontaly (verticaly to left)?
Hello Greenlava,
great Job, thank you! But unfortunately, the widget has a bug. When you link to a single post or you want to write a comment, the widget chrashes the layout or the comment function. Take a look at here: http://goo.gl/XWRqw and this is the Blog: http://goo.gl/anMJl
Could you fix it? Thank you!
@oliver
Are you sure it's caused by the tabber?
Try removing the tabber widget and see if the layout returns to normal.
@ greenlava
You're right, the tabber worked well, it was a problem of my own code. I fixed it. Thanks for feedback.
can this be added to post ? i.e. i have posts which r very long...will this tabber accomodate in a post ? I will be able to post then as one whole post with tabs as parts of the post ?
@श्रेया
I'm afraid you can't. It's specifically designed to transform widgets into tabs.
Hi
I have a question:
Is it possible to use more than one tabber per page?
For example, like in two different sections on my right sidebar...
If this is possible, do I just copy and paste the code twice in two different locations?
Thanks
@TBB
No, that's not possible.
Thank you Thank you Thank you so much. The code worked perfectly. And best of all it was so EASY !
I like this post & will to use for my blog
Useful tips! LOVE :)
This is really helpful, makes your blogger blog wordprss like look.
In return, i advice you to get logo for your blogger blog. check out favicon in blogger blog
Is there anyway you can put images in the place where the title of each tab are? Thanks!
Awesome, but can we change its color theme in to dark??
@Kristin Youngblood
Sorry there's no option for that at the moment.
@Nimila Zamz Hiran
Yes you can change the colors, but you have to do it manually.
Hi - I love this it worked fine and this morning it won't work anymore in my blog.. DO you know why??
http://purplerosy.blogspot.com
@Rosalie
This is a portion the tabber code from your blog:
[script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"]
[script type="text/javascript" src="http://greenlava-code.googlecode.com/svn/trunk/publicscripts/bloggertabs0.1_min.js"][/script]
Something is missing in the code. Can you spot it?
.
.
The first script tag is not closed. The correct code should be like this:
[script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"][/script]
[script type="text/javascript" src="http://greenlava-code.googlecode.com/svn/trunk/publicscripts/bloggertabs0.1_min.js"][/script]
Thanks - I don't know how that got changed but I fixed it. I love your site by the way. I have learned a lot from you.
Have a great day :-)
Sir. Me new. Learning a lot here. Query: Any easiest way to change the number of sidebars from 1 to 2 ? With high regards.
@Ifinder
You can do it easily enough in Design > Template Designer > Layout.
I just wanted to say that I really enjoyed this post. You make some very informative points . Keep up the great work!
Hi, this I can't see the demo.
@otobong
Here's the demo link again.
Thank you Thank you Thank you so much. The code worked perfectly. And best of all it was so EASY !
I like the post, I'm learning it now, helpful,thank you
आभार इस सुविधा के लिए
i have added this one on my blog. Earlier it was working but once i wrote in title " Category" after that its now working:-
I removed it fom there totally and again installed but now its not working . what i do?
Please tell me
my blog is
http://abhicareer.blogspot.com
@Abhishek
Each widget that you want tabbed must have a title, otherwise the tabber won't work (properly).
HI dude,
thanks for this post... i burned my head many times trying to find it and many of the codes i found it was so complicated... but this works nice.
thanks
yess , like it
greenlava, ive tried renaming the tab content, and updated the total tab, but i still couldnt do it.
any ideas?
the link is fahmimahat.blogspot.com
tq in advance ya =)
@Fahmi Mahat
You have double jquery library calls -one in this widget and the other one is for LazyLoad. I believe that's causing the problem.
I suggest you delete the one attached to the LazyLoad script, i.e. this line:
[script src='https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js' type='text/javascript'][/script]
thanks brother for this very useful blog
your gadget really good. tanks very mucth
tq greenlava~ :)
My tabs are overlapping! Any tips? :(
@Glebber and Symphony
It looks fine from here.
Oh I fixed it... thanks! :)
thx u
can i build 4 tab..?
@Bloggerizqy
Yes you can. Just set tabCount (in line 41) to 4.
Nice tips.I like it =))
thanks for article, i like this widget...
Great tips!Looking forward to using them!
my tabs are overlapping :( i tried to shorten the widget title but still it won't work here is the link http: rizqiarifuddin.blogspot.com
@Rizqi Arifuddin
Replace the CSS portion (the one inside [style] tag) of your code with this:
.tabber {
padding: 0px !important;
border: 0 solid #bbb;
}
.tabber h2 {
float: left;
margin: 0 1px 0 0 !important;
font-size: 12px;
padding: 2px 3px !important;
border: 1px solid #bbb;
margin-bottom: -1px !important; /*--Pull tab down 1px--*/
overflow: hidden;
position: relative;
background: #e0e0e0;
cursor:pointer;
-moz-border-radius:5px 5px 0 0;
border-radius:5px 5px 0 0;
}
html .tabber h2.active {
background: #fff;
border-bottom: 1px solid #fff; /*--"Connect" active tab to its content--*/
}
.tabber .widget-content {
border: 1px solid #bbb !important;
padding: 10px !important;
background: #fff;
clear:both;
margin:0 !important;
}
.codewidget, #codeholder {
display:none;
}
Zillion thanks :) now it works cool
thank's.....
Thanks for sharing the code.
nice articel, and nice for my blog, ty.
I added the code to a widget in my layout design, but totally can't figure out how and where to label the tabs. Could you help a computer challenged a bit more pretty please!!!
@Aimee - ItsOverflowing.com
The labels are copied from the widget titles, so make sure you put the title on each widget.
Hello!
This feature is working fine on firefox and chrome but doesn't work on internet explorer.
Could you please help me to solve this question?
Thanks,
Ana
This is perfect! I had no issues adding it to my blog, however when I try to add it a second time in another location on the page, it does not work - is there a tweak I need to make to the codes to have it multiple times or do you have any suggestions?
Like this, and Like it..
finally, i find it. without makes change html code.thanks for the code. thanks very much
@Kate
At this moment the code is good for one unit only.
love this... ^__^
thanks,, easy to use, and suitable with my blog template..
may I copy this trick to my blog?
@Andreansyah
Yes you may as long as you link back to this post.
That is THE widget I was looking for !! The best,
easiest ..Thank
thank you!
beautiful....worked like a baby!:) thank's a lot!
http://www.noutatimedicale.com
thank u.......
love love love this! keep up the good job!
Awesome as always but I have a question regarding what you put in those tabs. In your demo, you have "tips", I want to do something similar where I use all the posts that have "tips" as a label and put the link to those posts in there. I only know how to put the entire post in there, but not just the URL - any tips?
Thanks for the tutorial! I'm new to blogging and this was a big help!
mscandmisse.blogspot.com
mantap juga nih tai di aku mah ngga pake yang ginian karena ngga ada sidebarnya :P
If your question is unrelated to this article, please use our Facebook page.
When posting HTML/XML code, replace < and > symbols with [ and ] respectively. The reverse applies when copying code from my replies here.