43 The easy way to make a great blog header!
February 13, 2008 /

In yesterday's post, I wrote about what makes a great blog header. As I'm sure many of you will agree, a great blog header doesn't only include your blog's title and logo. Visitors need to know what your blog is about (branding) and how easily they will be able to find the information they need (navigation, and possibly search elements).

So in this installment of the blogger template design series, I'm going to show you a quick and easy way for you to add more than just your header image to your Blogger blog: adding extra sections for widgets, in which you can place anything you want!

If you take a look at the Blogger Template Design blog now, you'll see the bare bones of a header beginning to take shape. The title and description for this blog are now featured in the left-hand section, while on the right you can find a search box, and a simple navigation bar:

The search box and navigation links are actually widgets which can be edited through the layouts section, rather than being built into the template itself. This is by far the easiest way to change elements of the header section, and it's really easy to install this in your own blog template!

How to add more elements to your header section

In this tutorial, there are only three essential steps needed to add these extra elements to your own blog:

  1. Copy and paste a section of code in the header section of the template.
  2. Add some styling code to the CSS portion of the template
  3. And finally...
  4. Add some widgets to your newly created widget sections!

Trust me when I tell you that this is a really easy hack. You can be up and running with a new, more interactive header in no time at all, and once the basic structure is in place, you can begin styling each section to best suit your needs.

Step by step instructions

  1. Go to Template>Edit HTML in your Blogger dashboard, and find this section of 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 will appear here (Header)' type='Header'/>
    </b:section>
    </div>
    Highlight this entire section of code, and replace it with this instead:
    <div id='header-wrapper'>
    <b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
    <b:widget id='Header1' locked='true' title='Blogger template Design Series (Header)' type='Header'/>
    </b:section>
    <div id='header-right'>
    <b:section class='header' id='header-right-top' showaddelement='yes'>
    </b:section>
    </div>
    <div id='header-right-bottom'>
    <b:section class='header' id='header-right-bottom-section' showaddelement='yes'>
    </b:section>
    </div>
    </div>
  2. Next we need to change some of the style in the <b:skin> section. So find this entire section of code:
    #header-wrapper {
    border: 1px solid #000000;
    margin:0 auto 10px;
    border:1px solid $bordercolor;
    clear: both;
    word-wrap: break-word;
    overflow: hidden;
    }

    #header-inner {
    background-position: center;
    margin-left: auto;
    margin-right: auto;
    }

    #header {
    margin: 5px;
    border: 1px solid $bordercolor;
    text-align: center;
    color:$pagetitlecolor;
    }
    Note: the code which appears in your own template may have slightly different styling attributes to the example above. The important thing here is to replace the #header-wrapper, #header-inner and #header sections, and add some extra styling code.

    Once you have found this section, highlight it and replace it with the following section of code:
    #header-wrapper {
    width: 950px;
    border: 1px solid #000000;
    margin:0 auto 10px;
    border:1px solid $bordercolor;
    clear: both;
    word-wrap: break-word;
    overflow: hidden;
    }

    #header-inner {
    background-position: center;
    margin-left: auto;
    margin-right: auto;
    }

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

    #header-right {
    width: 400px;
    float: right;
    border: 1px solid $bordercolor;
    color: $pagetitlecolor;
    margin: 5px;
    }
    #header-right-top {
    padding: 0 5px 10px;
    }

    #header-right-bottom-section {
    padding: 0 5px 10px;
    }

    #header-right ul {
    margin: 0;
    padding: 5px;
    }

    #header-right ul li {
    display: inline;
    padding: 5px;
    }

    #header-right-bottom {
    width: 400px;
    float: right;
    border: 1px solid $bordercolor;
    color: $pagetitlecolor;
    margin: 5px;
    }

    #header-right-bottom ul {
    margin: 0;
    padding: 5px;
    }

    #header-right-bottom ul li {
    display: inline;
    padding: 5px;
    }
    Note: if your own blog template is narrower than 950px, you may want to make some alterations to the styling code above. Change the width of the #header-wrapper to match the width of your outer-wrapper, so that it will not disrupt the overall width of your blog. You may also want to lessen the widths of the #header section, and the #header-right and #header-right-bottom sections too.

    If you preview your template you will see that the title and description are now aligned to the left, with space on the right for you to add your new widgets. So save your template, and let's add some widgets to these new sections!
  3. Adding widgets to these new sections is the easiest part of this tutorial. Simply go to Template>Page Elements and add your widgets in the new sections which have appeared beside your header!

    Both of these sections now have styling for list items, so if you want to add a navigation bar, choose to add a "Links List" page element. Add your links as required and save. When you preview your template, you'll see that this display inline (horizontally) rather than in a long list.

    To add a search box to your header, you could either choose to add a Google Custom search widget, or use a simple blog search widget instead.

Width these extra widget sections in place, there are endless possibilities for what you may add to your header section! I used a search box and navigation links as an example, but you could easily substitute these for a description, feed links or anything else you choose instead.

Your blog logo/custom header image

As before, you can still add your custom logo or header image to the header widget. This will be resized to the new width of your header section (in the example above, this is 500px wide), so for best results you should upload an image of the same size.

If your image is wider than this, you should check the "Shrink to fit" box inside the widget editing box to ensure the header doesn't overshadow the other widgets on the page.

Coming soon...

The next two installments of the Blogger Template Design series will focus on styling your new header elements:

  • Creating a more interesting search box
  • Adding style and icons to the navigation links

If you'd like to see the progress of this series to date, you could check out the demonstration blog to see the what we have accomplished, along with links to all previous tutorials in this series.

To keep up to date with this series, be sure to subscribe to the feed or sign up for email updates!

As always, your comments and opinions are much appreciated. I'd love to know what you think of this series so far!

Author: Amanda Kennedy

Amanda is a professional blogger and web designer living in Sheffield, United Kingdom.

In addition to curating Blogger Buster, you can find Amanda on Twitter, Facebook or add her to your circle on Google+.

Like to share?

You may also like to subscribe to Blogger Buster's RSS feed or receive free email updates of our latest posts.

43 Comments:

  1. I can't seem to paste the first section of code that you need correctly.

    When I do, it says that the HTML is malformed, and that the body tag has to be closed by a body tag. Could you help?

    ReplyDelete
  2. Hello Mattheous,

    You may need to check that you've highlighted the correct section in your template, and also that you've copied the code correctly.

    I've just checked the code thoroughly to ensure there are no mistakes there, and everything seems to work okay. If need be, I could send you the code as a text file so you can simply copy and paste this into your template. Just send me an email to amanda[at]bloggerbuster[dot]com and I'll do my best to help.

    13 February 2008 23:36

    ReplyDelete
  3. I think the problem is I don't seem to have a header-wrapper section in my template. I'm using a Scribe template--could that be the problem?

    ReplyDelete
  4. Hi:

    I incorporated the edits but received an error message that a variable was used but not defined (bordercolor). Am trying to edit the Rounders template. Thanks.

    ReplyDelete
  5. For Mattheous:

    I'm just experimenting with the Scribe template now. I'll email you the details as soon as I've figured out the correct code to use.

    For Scott Boutwell: in the Rounders template, the border color is defined as borderColor (note the capital C).

    If you can edit the code so that all instances of bordercolor (with a lowercase c) are changed to borderColor instead, this should help solve the problem.

    Alternatively, you could delete the border properties altogether, and the code will still work for you.

    Hope this helps!

    Best wishes,

    Amanda

    ReplyDelete
  6. Hi Amanda:

    Thanks; I did figure out yesterday that I needed to capitalize the "C" in borderColor....

    I have used a bunch of your hacks to customize my site, including incorporating a better header...great work; thanks very much.

    My blog: www.scottboutwell.blogspot.com

    (I have 'de-rounded' the Rounders template....)

    ReplyDelete
  7. Amanda,

    Interesting post series. I will have to refer back to it for ideas.

    For now, am still struggling to add navigation options to my Classic blogger template. Can you tell me how the instuctions in your navigation buttons post would look in my classic template?

    http://www.bloggerbuster.com/2007/10/create-navigation-buttons-for-your-blog.html

    Thanks.

    ReplyDelete
  8. I'm going to give this a try but I'm a complete moron when it comes to the mystery that is HTLM.

    ReplyDelete
  9. Do you have any tips on making a really great image for your header? Right now working on a new one and I can only find a good font. I want a good background, too, but none of the images I like are the right size.

    ReplyDelete
  10. For David:

    The code in the post you referenced would essentially be the same for a Classic template. There are only two differences.

    Firstly, rather than add the style code to the <b:skin> portion, you would need to add this just before the closing </style> tag in your classic template.

    For the actual code used to display the buttons, you need to add this directly in your template HTML, in the place where you would like the navigation links to appear.

    Hope this will help, but feel free to email me if you need more help with this one!

    Best wishes,

    Amanda

    ReplyDelete
  11. Hey Amanda,
    I just discovered your site and I love it! Is there any way to create/ move the navigation bar to go under my header? I didn't know if you have a tutorial or had explained that earlier.
    thanks
    reina

    ReplyDelete
  12. Hi Amanda!

    You've inspired me to give all this hacking stuff a try! :) Thanks!

    Anyhow, I posted the code for the header and then noticed that, yes, the banner was too wide so I did what you suggested and edited the header wrapper size to be the same as the outer wrapper. NOW, the new sections are not on the right side of the banner; they're sort of underneath and to the right which leaves the banner section kind of in the upper left, which looks kind of funky.

    Advice? Thanks, Leslie
    leslieland.blogspot.com

    ReplyDelete
  13. Hi Amanda,

    Thanks for the excellent article. It really made things pretty easy for me. Your article still assumes some knowledge of CSS usage.

    Pranav

    ReplyDelete
  14. Hi Amanda,
    Thanks for the excellent article. I really want to try your hack and create a great header for my blog. But my blog has got a menu bar that I’d like to keep it. How can I do it then?
    Here’s my blog:
    http://food-recipes-christine.blogspot.com/

    ReplyDelete
  15. hi Amanda

    once again I made another costumation to my blog following your tips :)

    now I have one doubt:

    is there any way to make the #header-right align on the bottom off the header instead the top?

    f you see my buxmaking.blogspot.com I had a search widget, but I would prefer to see on the bottom ;)


    I will be waiting for your help as always :D

    ReplyDelete
  16. I was wondering how you can stop the title of the header or any widget from displaying without globally turning off title display for everything in the /* Headings section.

    ReplyDelete
  17. Hello
    is great how good is this page, but i have a problem with the header, when i change it the page says that there is a problem with bordercolor, and pagetitlecolor.
    what i can do?
    im using a blogger template 3 colum

    ReplyDelete
  18. How would I put the navigation buttons under my header similiar to your red line across your blog? Love your site!

    ReplyDelete
  19. ist one not working , pls chech ur self
    thankz

    ReplyDelete
  20. I can't seem to find the code you refer to in the "Scribe" template, to center the custom blog header. It's WAY over to the right currently.

    Any help you can give is much appreciated!

    ReplyDelete
  21. Hi Amanda, I'm trying to add the search box and links to the header but they won't line up neatly underneath each other to the right. The top right one is fine but the bottom right one is more like bottom middle. I've tried it several times but can't make it work. Any ideas please?

    ReplyDelete
  22. Fantastic! You're great post inspired me. Here are the results... www.sweigarts.com.

    ReplyDelete
  23. Amanda > I tried my best, the following error message is making me cry...

    XML error message: The element type "div" must be terminated by the matching end-tag "

    ReplyDelete
  24. I just wanted to thank you for taking the time to make quality tutorials. I spent the last 20 minutes wading through crap, so to find everything in one place, done right, is a major relief. Much appreciated.

    ReplyDelete
  25. thanx for inf


    http://egyphoto.blogspot.com/

    ReplyDelete
  26. dear friend,
    thank you so much. i have been visiting & using your blog as reference. you've helped a lot. many-many thanks...

    ReplyDelete
  27. Hey can you help me - I have been trying to move my header over to the left. I want it to over lap onto the outer wrapper - I don't know how to do this - help?
    www.dailycomics.blogspot.com

    ReplyDelete
  28. Hi Amanda, I can get the exact thing on my blog. The menubar and the header overlapped a bit. Can you please guide me how to bring down the menubar (navigation) so that header do not run over it?

    My blog http://inpui.blogspot.com

    ReplyDelete
  29. Thanks Amanda. i can create 2 header column with your advise here. and i also using your free blogger template :-).

    ReplyDelete
  30. which template do you use to make your header go all the way across the page like yours?

    ReplyDelete
  31. Thanks Amanda! Now I always know where to look to find the easy, well laid out edits I need!

    ReplyDelete
  32. I love this. Really.
    Your site is great. This was the first hack I used but I will sure look around for more.
    You made me a little bit happier, thanks.

    ReplyDelete
  33. I have a 3 column scribe template, and the header image is on the left. how can i get it centered?

    ReplyDelete
  34. im going to try this one out. great stuff.

    ReplyDelete
  35. Hi Amanda,

    I've got a question for you about my blogger header. What I want is to link it to home, but I can't figure out how to do that. It seems that I was able to do that before, but ever since I switched templates, I haven't been able to figure it out. Please help!

    Thank you!

    ReplyDelete
  36. I followed your directions, and got this error:

    Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
    XML error message: The element type "div" must be terminated by the matching end-tag "

    I've tried it a few times, and it always says this. Is there a way to fix it?

    ReplyDelete
  37. i'll give this a shot..

    ReplyDelete
  38. I am thoroughly convinced in this said post. I am currently searching for ways in which I could enhance my knowledge in this said topic you have posted here. It does help me a lot knowing that you have shared this information here freely. I love the way the people here interact and shared their opinions too. I would love to track your future posts pertaining to the said topic we are able to read.

    ReplyDelete
  39. Thanks for taking the time to discuss this, I feel strongly about information and love learning more on this. If possible, as you gain expertise, It is extremely helpful for me. would you mind updating your blog with more information?

    ReplyDelete
  40. Thanks for the tutorial is very creative only requires a little time and practice to achieve.

    ReplyDelete

Great! You've decided to leave a comment! Please bear in mind that comments are often moderated and that rel="nofollow" is in use and spammy comments will be deleted. Let's have a meaningful conversation instead. Thanks for stopping by!

Browse through the Archives

All existing posts are still available to view while I'm working on the site, albeit seen in a much simpler interface. Feel free to browse through the archives to find tutorials, templates and articles to help you build a better blog:

Blog Archive

© Blogger Buster 2010 Home | About | Contact | Hire Me