Home SEO Tools FAQs Guest post Contact Donate

The easiest tabbed content widget for Blogger

| 83 comments
blogger tabbed contents

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:

  1. Accommodates unlimited number of widgets.
  2. Keeps the tabbed widgets’ original appearance.
  3. Fully widgetized for ease of installation and removal. If you don’t like what it does, simply remove the HTML/Javascript gadget.  

Installation

  1. Go to Design > Page Elements and click Add A Gadget.
  2. Select HTML/Javascript widget.
  3. Leave the title box blank.
  4. 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).
  5. Position the HTML/Javascript gadget above the gadgets that you want to tabify.
     tabbed contents view elements
  6. 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"

Anonymous,  May 28, 2011 5:19 PM    

Do you have a demo of this?

gamerap May 28, 2011 7:26 PM    

Thx for info :)

Download-mobile-apps May 28, 2011 11:50 PM    

Nice This post i place in my blog later,

Mary May 29, 2011 6:26 AM    

Cute ;-)

Cool tip though. Definitely one I might use in the future.

Greenlava May 30, 2011 9:58 AM    

@Anonymous
I've added the demo link.

Roberta @ Silverwalk May 31, 2011 5:25 AM    

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.

Greenlava May 31, 2011 11:35 AM    

@Roberta @ Silverwalk
The tabber copies the titles of the gadgets. That's why you have to title each widget.

Roberta @ Silverwalk May 31, 2011 1:28 PM    

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 :).

Greenlava June 1, 2011 1:48 AM    

@Roberta @ Silverwalk
You're welcome :)

G June 1, 2011 4:29 AM    

Thanks for this. I like it.

Naser @ Best Tips For Blogging June 1, 2011 5:21 PM    

Thanks for the tutorial Green Lava, is there a WordPress plugin available for this.

Amy Sue's Place June 2, 2011 2:14 AM    

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

Greenlava June 2, 2011 11:02 PM    

@Amy Sue's Place
I'm guessing the tabs are too wide?

Greenlava June 2, 2011 11:15 PM    

@Naser
If I'm not mistaken there is a plugin called wooTabs. But it comes with premium wooThemes.

kochou June 3, 2011 3:30 PM    

Hi,

That is THE widget I was looking for !! The best, easiest ! Thank U so much

Arcmond June 4, 2011 3:53 AM    

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)?

oliver June 7, 2011 11:07 PM    

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!

Greenlava June 8, 2011 12:11 AM    

@oliver
Are you sure it's caused by the tabber?
Try removing the tabber widget and see if the layout returns to normal.

oliver June 8, 2011 1:46 AM    

@ greenlava

You're right, the tabber worked well, it was a problem of my own code. I fixed it. Thanks for feedback.

श्रेया June 8, 2011 4:22 PM    

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 ?

Greenlava June 8, 2011 5:06 PM    

@श्रेया
I'm afraid you can't. It's specifically designed to transform widgets into tabs.

TBB June 13, 2011 9:59 PM    

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

Greenlava June 14, 2011 10:57 AM    

@TBB
No, that's not possible.

Anonymous,  June 17, 2011 4:08 PM    

Thank you Thank you Thank you so much. The code worked perfectly. And best of all it was so EASY !

TruyenJava June 20, 2011 11:24 AM    

I like this post & will to use for my blog

Adrian June 23, 2011 10:30 AM    

Useful tips! LOVE :)

Hemendra Kumar Saini June 27, 2011 3:47 PM    

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

Kristin Youngblood July 3, 2011 12:02 AM    

Is there anyway you can put images in the place where the title of each tab are? Thanks!

Nimila Zamz Hiran July 3, 2011 4:31 PM    

Awesome, but can we change its color theme in to dark??

Greenlava July 4, 2011 12:08 AM    

@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.

Rosalie July 8, 2011 12:13 AM    

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

Greenlava July 8, 2011 8:59 PM    

@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]

Rosalie July 9, 2011 12:11 AM    

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 :-)

Ifinder July 9, 2011 2:16 PM    

Sir. Me new. Learning a lot here. Query: Any easiest way to change the number of sidebars from 1 to 2 ? With high regards.

Greenlava July 10, 2011 11:39 PM    

@Ifinder
You can do it easily enough in Design > Template Designer > Layout.

Kincardine July 13, 2011 7:50 PM    

I just wanted to say that I really enjoyed this post. You make some very informative points . Keep up the great work!

otobong July 16, 2011 7:34 PM    

Hi, this I can't see the demo.

Greenlava July 17, 2011 8:09 AM    

@otobong
Here's the demo link again.

Templatesall August 28, 2011 11:57 PM    

Thank you Thank you Thank you so much. The code worked perfectly. And best of all it was so EASY !

geminideal September 5, 2011 2:53 PM    

I like the post, I'm learning it now, helpful,thank you

Roshan Jaswal September 10, 2011 5:19 PM    

आभार इस सुविधा के लिए

Abhishek September 13, 2011 3:57 PM    

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

Greenlava September 15, 2011 12:35 AM    

@Abhishek
Each widget that you want tabbed must have a title, otherwise the tabber won't work (properly).

Eu Brasil, Ele Egito September 20, 2011 9:47 PM    

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

guest istiqlal September 24, 2011 8:30 PM    

yess , like it

Fahmi Mahat October 11, 2011 6:24 PM    

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 =)

Greenlava October 12, 2011 4:45 PM    

@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]

chirif October 17, 2011 7:56 AM    

thanks brother for this very useful blog

ahmad October 28, 2011 6:49 PM    

your gadget really good. tanks very mucth

famimahat November 2, 2011 10:41 AM    

tq greenlava~ :)

Glebber and Symphony November 11, 2011 2:03 AM    

My tabs are overlapping! Any tips? :(

Greenlava November 11, 2011 9:36 PM    

@Glebber and Symphony
It looks fine from here.

Glebber and Symphony November 11, 2011 9:41 PM    

Oh I fixed it... thanks! :)

Andry P.L November 19, 2011 12:01 AM    

thx u

Bloggerizqy November 20, 2011 11:19 AM    

can i build 4 tab..?

Greenlava November 20, 2011 1:31 PM    

@Bloggerizqy
Yes you can. Just set tabCount (in line 41) to 4.

Ageboy December 9, 2011 12:03 PM    

Nice tips.I like it =))

WhenUC December 15, 2011 12:38 PM    

thanks for article, i like this widget...

Info 4 Canada December 15, 2011 1:51 PM    

Great tips!Looking forward to using them!

Rizqi Arifuddin December 15, 2011 6:05 PM    

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

Greenlava December 16, 2011 9:43 PM    

@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;
}

Rizqi Arifuddin December 19, 2011 10:33 AM    

Zillion thanks :) now it works cool

downloadd gratis December 22, 2011 7:33 PM    

thank's.....

Best Free Blogger Templates 2012 December 28, 2011 5:28 PM    

Thanks for sharing the code.

WhenUC December 29, 2011 5:32 PM    

nice articel, and nice for my blog, ty.

Aimee - ItsOverflowing.com January 4, 2012 9:55 PM    

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!!!

Greenlava January 6, 2012 12:18 AM    

@Aimee - ItsOverflowing.com
The labels are copied from the widget titles, so make sure you put the title on each widget.

Prendas na Net January 15, 2012 10:50 PM    

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

Kate January 16, 2012 6:39 AM    

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?

Ozkab News January 16, 2012 1:41 PM    

Like this, and Like it..

tutorial komputer January 17, 2012 12:17 AM    

finally, i find it. without makes change html code.thanks for the code. thanks very much

Greenlava January 17, 2012 1:07 AM    

@Kate
At this moment the code is good for one unit only.

Andreansyah January 18, 2012 4:09 PM    

love this... ^__^
thanks,, easy to use, and suitable with my blog template..
may I copy this trick to my blog?

Greenlava January 18, 2012 5:04 PM    

@Andreansyah
Yes you may as long as you link back to this post.

campor bawor January 19, 2012 1:03 AM    

That is THE widget I was looking for !! The best,
easiest ..Thank

levree January 23, 2012 4:02 PM    

thank you!

Victor Cojocaru February 2, 2012 8:26 PM    

beautiful....worked like a baby!:) thank's a lot!
http://www.noutatimedicale.com

narwesh February 19, 2012 5:22 PM    

thank u.......

Honeybee February 22, 2012 1:40 PM    

love love love this! keep up the good job!

Sine February 25, 2012 10:58 PM    

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?

Cait February 28, 2012 2:59 PM    

Thanks for the tutorial! I'm new to blogging and this was a big help!
mscandmisse.blogspot.com

Ф дфѕдғфдғ Ф February 29, 2012 7:49 PM    

mantap juga nih tai di aku mah ngga pake yang ginian karena ngga ada sidebarnya :P

We love to hear from you! Leave us a comment.

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.

Pls share this page

Get this
Click to go to top Click to comment