How to Add Sidebar (Widget Section) to Header in Blogger

Add a new widget section by creating sidebar within the header section in your Blogger template and see how a simple looking header goes up to the next level and turns into something new and stylish. It is really a simple tutorial and adjusting it according to your style, you can add search box, subscription buttons or anything you want to be viewable beside your blog's tile, within blogger header.

Sidebar into Header

Now let's have a tutorial.

First log in to your blogger account and go to Design > Edit HTML. Here we need to increase the width of the header section so that we don't get any trouble in adding another sidebar within the header.

1. Find:

#header-wrapper {
width:660px;
margin:0 auto 10px;
border:1px solid $bordercolor;
}
And change the width to 950px. To match the style, you may also need to change the width to 950px for outer-wrapper and footer sections.

2. Next find:

#header {
margin: 5px;
border: 1px solid $bordercolor;
text-align: center;
color:$pagetitlecolor;
}

Replace it with:

#header {
width: 400px;
float: left;
margin: 5px;
text-align: center;
color:#000000;
}
#header-right {
width: 400px;
float: right;
margin: 5px;
color:#000000;
}

This way you will get header to right and the sidebar widget section to left.

3. Now comes the part where it would add a widget section to blogger header. Find the below section:

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

And replace it with:

<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>
<b:section class='header' id='header-right' showaddelement='yes'/>
</div>

4. Preview your template for any error and save it.

You have to make some alterations to the styling codes above like changing the width of the #header and the #header-right sections to match your style.

To be Noted:
This works only with layout templates.

Popular posts from this blog

How to Resize Blogger Header to Logo Size

Google Penguin update hit me Hard