Wednesday, January 31, 2007

Adding a Custom Header in Blogger

With the new version of Blogger, I found that it was difficult to insert a custom header image. I searched around on the internet, but didn't find a satisfactory explanation. So I managed to figure out how to do it and thought I would share these easy steps for those of you who might be curious how to do this yourselves.

Step 1) Create a custom header image for your blog. Use Photoshop to create an image that is 650 pixels wide by 79 pixels high and upload it to your webserver. Below is the one I made for LaCour:


Step 2) Log in to Blogger.com and click the "Manage: Layout" button


Step 3) Then click on the "Edit HTML" button


Step 4) Scroll through the HTML and find the section that looks like the following (which is about 1/4 of the way down):
#header {
margin: 5px;
border: 1px solid $bordercolor;
text-align: center;
color:$pagetitlecolor;
}
Now add in the following url, width and height tags so that it looks like this:
#header {
margin: 5px;
border: 1px solid $bordercolor;
text-align: center;
color:$pagetitlecolor;
background-image: url('http://www.lacourphoto.net/images/bloghead.jpg');
width:650px;
height:79px;
}
Be sure to add the appropriate url for your banner image and make sure that your width and height numbers are correct for your image. *Note: If you want to remove the border, simply change the border to 0 in the "#header-wrapper" section just above this section.

Step 5) Scroll through the HTML and find the section that looks like the following (which is about 1/2 of the way down):
<h1 class='title'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<data:title/>
<b:else/>
<a expr:href='data:blog.homepageUrl'><data:title/></a>
</b:if>
</h1>
Now make it look like this:
<h1 class='title'>
<!-- <b:if cond='data:blog.url == data:blog.homepageUrl'>
<data:title/>
<b:else/>
<a expr:href='data:blog.homepageUrl'><data:title/></a>
</b:if> -->
</h1>
Step 6) Click the 'Save Template Button' and your blog should now have a custom header.

17 Comments:

Blogger kristinbednarz said...

Yeah! Visual and solid. Thanks so much! I have a few tweaks to work on, but wow!

February 01, 2007 11:00 AM  
Blogger Michelle said...

Thank you so much for doing that, now I finally know "how to".

February 01, 2007 6:02 PM  
Blogger Cameron Clark | baby business blog said...

okay so I did this, but then it still wants me to have text for my title, what do I delete in the code to get ride of the title?

February 05, 2007 6:59 PM  
Blogger Mark Adams said...

You still have to have a text Title, so write whatever you want for a title in the Header, but Step 5 will make sure that the text Title doesn't display. Basically what you're doing in Step 5 is commenting out the portion that display's the text title so that it doesn't display. Let me know if that still doesn't work.

February 05, 2007 8:10 PM  
Blogger Caroline said...

Mark,

I couldn't find that code from Step 5 in my html. any thoughts? for the time being I've put in a "." to minimize it's impact.

thanks.

February 07, 2007 10:34 PM  
Blogger Liz Power Photography said...

Wow! We have been wanting to do this for so long but were clueless how to! Thanks so much. I think I am having the same problems as "Crafty Caroline' and "Cameron" though. When I go to do step 5, I had to expand my widgets. Then i found the right place to enter in the exclamation point and dashes and it told me this :
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 string "--" is not permitted within comments. I've checked several times and seem to be doing this right...any thoughts anyone?

February 13, 2007 5:31 PM  
Blogger Flutterbot said...

Hi there,

Thank you so much for this post it is really helpful. I was very excited to customize my logo and I was having a hard time finding how to do that.

Kay

March 08, 2007 12:50 PM  
Blogger Sara Speert Photography said...

Mark, thanks for posting that. Totally helped me get rid of my boring and ugly header. You're awesome!

March 11, 2007 4:12 PM  
Anonymous Anonymous said...

Much obliged for the step-by-step, good man. I hope all is well in your world. Tell Erin I said, "hiya."

March 15, 2007 11:53 PM  
Blogger Meg said...

Awesome! I've been wondering what the magic height/width ratio is to make my header look pretty. Thanks!

May 20, 2008 5:21 AM  
Anonymous Anonymous said...

Hey Mark, Just wanted to say that your way works great, but there is an easier way. You can go to your Blogger home (the dashboard) and click on the layout button next to whichever blog you want to make a header for. Then click on the edit button for (your blog name)(Header). You can then choose an image from your computer or the web for your header. Thanks a bunch though!

August 26, 2008 9:54 PM  
Anonymous Anonymous said...

Thanks for the tut. I've been looking for a way to add a transparent PNG header to my blog, but did not have the code for step #5 so the header is to the right & the title letters are still visible....

February 06, 2009 2:36 PM  
Blogger Hilary said...

Thanks, your explanation was far better than the one I've been struggling with for the past half hour. Worked like a charm.

March 24, 2009 4:17 PM  
Blogger JoAnna Anderson said...

This is great info...thank you. My problem is that I can't figure out how to create an image (lettering with my picture) to upload. I'm using paint.net & I'm so clueless. Any suggestions?

May 14, 2009 10:40 PM  
Blogger LaCour said...

Although we aren't familiar with paint.net, in Photoshop, you can use the type tool. There's a free online version of Photoshop if you're interested. Just go to Photoshop.com to learn more. Thanks!

May 18, 2009 3:50 PM  
Blogger Betsy said...

Hi there. I stumbled across your page while looking for instructions on how to remove just the border from my blogger blog's title. Your advice was super simple and worked like a charm!

Thanks for the great info!

June 08, 2009 1:51 PM  
Blogger frenchiexpoo said...

Hi! I found your page while I was searching for a way to create my own header. The first code worked fine but, I can't find the second code in step five to edit it. I don't have the default template but it is a template from blogspot. Is there something else I could do?

August 10, 2009 5:52 PM  

Post a Comment

<< Home