Adding a section (with Add a gadget link) in Blogger layout
A section is an area in Blogger layout that acts as a widget/gadget container. It is sometimes mistakenly addressed a page element. In Design > Page Elements tab, you can identify a section by the presence of an Add A Gadget link.
To add a widget, simply click the Add A Gadget link in your preferred location and proceed with selecting a widget. But what if your preferred location doesn’t have an Add A Gadget link? In other words there is no widget container there.
Well we can always make one, by adding a section tag in template HTML. Here is the code:
<!-- New widgets container Start --> <b:section class='NewContainer' id='NewContainer'/> <!-- New widgets container End -->
You are free to change the Id and class names.
In this tutorial we will add a section under the header. This is a perfect place to put horizontal navigation tabs. Here are the steps:
- Go to Dashboard > Design > Edit HTML.
- Back up your template.
- Since we are placing the new section under the header, we need to find the header code:
<div id='header-wrapper'> <b:section class='header' id='header' maxwidgets='1' showaddelement='no'> <b:widget id='Header1' locked='true' title=Your Blog Title(Header)' type='Header'/> </b:section> </div>
- Paste the section code right below the header code, like this:
<div id='header-wrapper'> <b:section class='header' id='header' maxwidgets='1' showaddelement='no'> <b:widget id='Header1' locked='true' title=Your Blog Title(Header)' type='Header'/> </b:section> </div> <!-- New widgets container Start --> <b:section class='NewContainer' id='NewContainer'/> <!-- New widgets container End -->
- Click Save Template.
- Go to Design > Page Elements to view the result. You should see a newly added section under the header.
- Now you can add all the widgets you want into the new container.
- To style the section, you simply add a styling rule in CSS, like this:
#NewContainer { /* add styling declarations here */ }
And place it before
]]></b:skin>
line in your template. -
That’s it, enjoy!
46 comments to "Adding a section (with Add a gadget link) in Blogger layout"
Very useful tips for me. Thank you very much
I have a 2 column set-up. Left side is blog postings, called "main", right side is gadgets, called "sidebar." Both sides are equal widths.
Is it possible to add HTML Javascript widgets that are full-page width at various points down my page, in effect interrupting the two columns as a colspan="2" would in regular HTML?
I read your article about adding a new container, but can't figure out how to put it somewhere in the middle of everything.
@mike
I'm afraid that is not possible. You can only place page-wide containers above and/or below the two columns.
Thanks so much for providing all this great information. Love your site.
Hello Admin,
Thanx a lot,I got what i want just now with ur useful tip!
Please let me know one more thing,,I want to add "ADD A GADGET ELEMENT" just below Blog Posts! Can u make me know?
Waiting! Very thankful if sum1 help me out in this issue...
@Anonymous
Usually no Add A Gadget link is needed.
Add your new gadget in a sidebar, then drag it to above or below Blog Posts. Try it.
I'm having problems with the making the tabs link.
@Continuing Transportation
Why don't you try this tutorial Creating navigation or menu tabs in Blogger
You have no idea how excited I am to find this tutorial! It helped me figure out how to do something that I've been going nuts over for months! Thank you thank you!! Doing my little happy dance!!! :)
@The Girl Creative
I'm happy for you :)
Hello buddy...I have a particular problem.
i have a template which doesnt have any links for adding a page element in the right sidebar.
and there's isn't any sidebar-wrapper where I can add this code.
< ! - - New w i d g e t s c o n t a i n e r S t a r t - - > < b : s e c t i on c l a s s = ' NewC o n t a i n e r ' i d = ' NewC o n t a i n e r ' / > < ! - - New w i d g e t s c o n t a i n e r E n d - - >
@WiseKid
You don't have to put the code in sidebar-wrapper for it to work. Just make sure you add this CSS code in step 8:
#NewContainer {float:right; width:150px;}
replace the width with your own value.
hwy that worked for me! Thanks ^^
How can add one under everything except the attribution? I have a three column template but the attribution is already Linked below as part of it - no gadget down there at all.
Thanks so much for doing this by the way, I can't believe blogger doesn't have actual articles that people actually want. ~R
Oh my God, I love you, thanks!!!^^~
helps alot! thankss!!
@♫ mary ♪
@RaindropSoup
@Louise
@asrar@zaren
You're welcome!
Works like a charm, I tough it would be more difficult than that. Big thanks from Belgium
Hi , thank you so much for the tutorial but i have a problem with the position of the widgets: they are placed vertically instead of horizontally
Can you help met with this>?
@Sherida
Apply float:left; or display:inline-block; to each widget, like this:
#NewContainer #WidgetID1, #NewContainer #WidgetID2{float:left;}
Don't know how to find a widget ID? Read How to find Blogger widget and section ID.
thanks from atoztechstuff.blogspot.com
@Luvmysibes
The easy way to display your latest comments is by adding your comment feed URL into a Feed gadget.
This is feed URL:
http://YourBlogName.blogspot.com/feeds/comments/default
Hi I have a question, I want to make a 2 column section
right above the blog portion, is this possible?
I've included an image on how i want it below.
http://i.imgur.com/q60bh.png
@dotfb
Try this:
Find this code in your template:
[div class='column-center-inner']
and then paste this code under it:
[b:section class='NewContainer' id='NewContainer1'/]
[b:section class='NewContainer' id='NewContainer2'/]
As for the CSS part, add this snippet:
.NewContainer {
width: 45%;
float:left;
}
This is great trick. I have custom template so how do i added new gadget container in footer?
Thanks
@chis
Adding a new gadget container to designer template is very easy. Go to Design > Template Designer > Layout and select one of the three available footer layouts.
Previously you said that no Add A Gadget link is needed for below Blog Posts, I tried this but the title image background is not the same with the sidebar title, how to make them the same???
@Anna
That's because your template only applies the background to the sidebar.
To include the main column, try this:
Go to Design > Edit HTML and look for this code:
#sides-top h2 {
margin: 0px;
padding: 0px;
color: #765023;
background: url('http://4.bp.blogspot.com/_XByc9SCisZM/ScfyzyRrpLI/AAAAAAAABs8/IR-hZjcZ0fg/s1600/sidetop_h2.jpg') no-repeat;
font-size: 15px;
letter-spacing: 0px;
height: 35px;
padding: 10px 20px;
line-height: 35px;
font-family: Comic Sans MS, Georgia, Times, serif;
}
replace #sides-top h2 with #sides-top h2, .main h2
@Greenlava
This is confusing @__@ I can't find any #sides-top h2 {
But in my template, it has only #sidebar-wrapper2 h2 { , is it the same?
@Anna
Use the search function (Ctrl+f), you'll find it.
@Greenlava
I did it!! XD Thx u very much :D
It work on me. Wonderful. thanks
OMG, it took me forever trying to figure this out and searching online but no help....and then i came to your blog and got it in 3 minutes. THANKS!
thanks .... i really need this tutorial
Thanks man nice tutorial for new bloggers.
Thank you so mach sir ! its what , i was searching for ...
Unlimited thanks to you. I am gonna create a horizontal widget area to add a scrolling news area in one of my blogger site. Thanx to pave me the right way.
Thank you for your tutorial. it is working for me.
That's what i was looking for to add search box in header.Its working perfectly. Thanks ..
Thank you sir, works like charm on my blog.
Regards
Thanks a ton :)
I meant life saver lol...sorry for double posting
thank you ... thank you ... this solve my problem ... nice post
good very good
THanks really!!
thanks
Post a Comment
We love to hear from you! Leave us a comment.
To ensure proper display, HTML/XML/Javascript need to be escaped first using this escape tool.