NOTE: This code works best with the Minima template, so if you’re using it with another template, you might have to do a trial-and-error test, or use a different code altogether.
- Login to your Blogger admin dashboard.
- Go to Design.
- Go to Template.
- Click on Edit HTML, then click on Proceed.
- Using Ctrl+F, locate #header-wrapper to check your header’s default size (example: 660px):
#header-wrapper {
width:660px;
margin:0 auto 10px
border:1px solid $bordercolor;
}
- Now that we’ve confirmed the header’s size, set the width of the main header section to 300px in the following code below:
#header {Notice that we indicated float:left; above the new width. This will relocate one half of the header to the left.
float:left;
width:300px;
margin: 5px;
border: 1px solid $bordercolor;
text-align: center;
color:$pagetitlecolor;
}
- Let’s create the section for the right half, also at 300px width:
#header2 {
float:right;
width:300px;
}
- Then place it under the #header class as such:
#header {
float:left;
width:300px;
margin: 5px;
border: 1px solid $bordercolor;
text-align: center;
color:$pagetitlecolor;
}
#header2 {
float:right;
width:300px;
}
Lastly, locate the <div id=’header-wrapper’> tag and paste the following code below it. It should look like this:<div id=’header-wrapper’>
<b:section class=’header’ id=’header’ maxwidgets=’1’
showaddelement=’no’>
<b:widget id=’Header1’ locked=’true’ title=’my blog title
(Header)’ type=’Header’/></b:section>
<b:section class=’header’ id=’header2’
maxwidgets=’1’ showaddelement=’yes’/>
<br style=’clear:both;’/>
</div> <!-- end header-wrapper -->
- Save the template.
- Go to Design.
- Go to Layout.
- The new section on the right side of your header should be visible now.
NOTE: As with any template changes, it is always recommended that you save a backup of your original template first.
0 comments:
Post a Comment