Tuesday, January 11, 2011

Blogger: More Header Customization

A previous article discussed how to include a second column in the header. I also often see bloggers unhappy with the header spacing. Either there's too much empty space, the header doesn't line up how they'd like or something else is bothersome. In this article I explain which styles give the most control over header spacing and show how to override them to your liking.

New Blogger templates include a large amount of empty space. This is the result of a few pesky styles tucked away in a stylesheet included at run time. These styles aren't visible in Edit HTML and it's easy to miss where exactly the problem is coming from. Much as the main body of a blog is affected by 3 Key Styles,  five styles dominate header spacing.

The below five styles come from the stylesheet I mentioned or in the template:
.header-inner .widget{margin-left:30px;margin-right:30px}
.Header h1{margin-bottom:10px}
 .header-inner .Header .titlewrapper { padding: 22px $(header.padding); }
.header-inner .Header .descriptionwrapper { padding: 0 $(header.padding); } 
.Header .description{margin:.5em 0 10px;padding:0 2px}
Overriding these five styles has a big impact on a blogs header. The easiest thing to do is copy those styles, then paste them into the Design->Template Designer ->Advanced->Add CSS box. Alter the numbers to find the desired look. For example if all values are set to zero like this:
.header-inner .widget{margin-left:0px;margin-right:0px}
.Header h1{margin-bottom:0px}
 .header-inner .Header .titlewrapper { padding: 0px 0px; }
.header-inner .Header .descriptionwrapper { padding: 0 0px; } 
.Header .description{margin:0em 0 0px;padding:0 0px}
The difference is massive, just look at the before and after screen shots from my test blog. The same information takes up about half as much room with the styles overridden. These are the two extremes, adjust the numbers to find what works for your design.
Before
After

Summary
Overriding these five styles has a large impact on the look of a blogs header. It's easy to do and requires very little HTML knowledge to do thanks to the new template designer. Just copy the lines I've shown and play with the numbers until you find the look that fits.
5 Comments
Comments

5 comments :

Anna said...

FINGERS CROSSED this makes sense! I am somewhat new to the whole idea of blogs and I am VERY new to the whole idea of tweaking it by using the css codes or html codes... it leaves me lost and feeling... pretty dumb. After searching for...well, more hours than I care to acknowledge this blog is the first that seems like you may be hitting around what I am wanting to do. Which I didn't think was much!

I want a simple blog. nothing fancy. However, I made (Or am in the process of making) a header in photoshop. I assume (But am not sure) that the best way to get it from ps onto the header of my blog is to save it as an image to my actual 'header' (provided by google) and let it replace my title and description. However, I want the header I make to go A L L T H E W A Y A C R O S S T H E computer screen, instead of stopping the same place where my blog posts and side bar ends.

Does what I am asking make sense? Like I said, I have been searching, and it seems that everyone with an answer says the same thing. They say to locate the header wrapper... and unless I have completely lost my mind I don't see any html that says that.

Please oh please oh please

help me

Thanks so much,

Anna
www.saintannselbys.blogspot.com

Also, I tweaked the banner to fit within the width given currently and it was just too small!

Anna said...

One last thing- I looked for an email so I wouldn't have to take up so much space in your comments section, but was unable to find one. I would be glad to email you if that would work better for you.

Anna

Unknown said...

Hello Anna,

I can show you how to get that banner to full screen width, but it will take me a while to write up exactly how. I have a few things going on right now though, so it will probably be tomorrow morning sometime. I'll add it as a new blog post when I'm done and send you a link over on your blog.

James

El Cubo said...

Hi, from Spain.
Thanx a lot!!!!

Tiffany said...

Hi James. I'm having the same problem as Anna. could you please help me! I have three blogs and would love this tip! if you could please e-mail me at tiki.orberson@gmail.com

Post a Comment