How to add Gadget inside Blogger Blog Header for AdSense Ads

Insert a Gadget inside Blogger blog header next to Logo or above Main Menu for AdSense Ads. You may add HTML/JavaScript widgets for third party Codes.

Recently, we have learned to create and insert AdSense Ad code into Blogger Template in a very precise manner. After reading that tutorial one reader asked me to add a Gadget inside the blogger blog header for the purpose of displaying AdSense Ads.

That was very interesting for me as because there is no any option in default blogger template or even many customized blogger premium/free templates available on internet to add a new Gadget inside the header slot rather you can’t even move the header widget from its default place.

Most of blogger wants to insert their AdSense codes or any direct advertiser’s Ad banner into the blog header because this space is above the fold, more eye catching and gets maximum number of impressions.

Therefore, today we will learn the tricks to add a new widget next to the Blogger header just besides your blog logo or title or description for the purpose of either displaying AdSense Ads or for adding any other third party HTML/JavaScript codes.

How to Divide Blogger Blog Header into Two Parts

Before we start editing blogger template, I strongly recommend you to backup your blog template for future reference on the safe side. Now, follow the following steps very carefully so that you can easily divide your BlogSpot blog header into two parts in first attempt.

Divide Blog Header

Step-1 (Default Header Layout):

Login into your blogger account and visit the Layout section of your blog to see the header position whether it is single or has already been divided. Here is screenshot for the default blogger blog header.

Default Blog Header

If your blog contains only one column in header section as above, then follow the next steps to divided it into two parts.

Step-2 (Template Editor):

Go to the Template section of your blog and click on Edit HTML text button next to the Customize button. See the screenshot for template Edit HTML button.

Blogger Theme Editor

Step-3 (Edit Template):

Click on Jump to widget from the top drop down menu and select Header1 as shown in this screenshot.

Jump to Header1 Widget

Step-4 (Delete Default Header Section):

You will see the following (Screenshot) codes which represents default blogger blog header section.

Delete Default Header Section

Now, delete all these codes so that the older header section will be deleted.

Step-5 (Insert New Header Section):

Copy and paste these HTML codes in place of old header section deleted codes as shown in this screenshot.

Insert Blogger New Header
<!-- SWT Header Section START --><div class='region-inner swt-header-inner'>
<b:section class='header-left' id='header-left' maxwidgets='1' name='Header-Left' showaddelement='yes'/>
<b:section class='header-right' id='header-right' maxwidgets='1' name='Header-Right' showaddelement='yes'/>
</div><!-- HELP: -->

Don’t delete the HELP URL address from the last line of above code as it may help you in future for any updated tutorial and code upgradation.

Step-6 (CSS for New Header Section):

Now, press Ctrl + F for search the ]]></b:skin> and paste the following CSS codes above/before it.

.swt-header-inner { /* HELP: */
width: 100%; display: flex;
.header-left {
padding: 0;
.header-right {
padding: 0;
/* Blog Header inserted by */}

See the screenshot here.

Add CSS Codes Header Section

Now, click on Save Template to save the all avobe steps in your blog template.

Customization: You may adjust the width of Header-Left and Header-Right section in accordance with the title/logo of your blog or the size of AdSense Ads to be displayed.

You may also specify the width in pixel instead of percentage. Suppose you want to show your blog LOGO (70px) on the left side and insert AdSense codes (728px) on the right side in header section. Replace the CSS codes of header-left width:70px; and header-right width:730px; depending of your blog layout width (800px).

Step-7 (Insert New Gadget):

Navigate the layout section of your blog to see the difference. Here is the screenshot.

Two Column Blog Header

Now, you may click on Add a Gadget for adding your Page Header widget in your blog and AdSense Ad Unit codes or any third party HTML/JavaScript codes. Here is the screenshot for your help.

Add Page Header Gadget