Add a Widget Beside Your Header
Hey Annie!
Thanks for the tutorials on this blog. They're a big help.
I would like to know, is there a way to add content to the right of my header? Sort of like another sidebar? My blog is HERE. Please take the time to visit. It's still under construction though.
Thank you and more power.
There is a way, and it can be done with creating a widget. First you will make a couple of changes to your CSS style sheet. You will want to find the Header section. Look for something like this:
#header {Basically what we are doing is dividing the header up. I'm going to make each side equal, but you can use any proportion you want allowing for the margins. So, replace that code with this:
margin: 5px;
border: 1px solid $bordercolor;
text-align: center;
color:$pagetitlecolor;
}
#header {You can adjust these values to fit your template. (It should not equal more than your outer-wrapper.) Almost done! Find this code in your template:
width: 300px;
float: left;
margin: 5px;
text-align: center;
color:$pagetitlecolor;
}
#header-right {
width: 300px;
float: right;
color: $pagetitlecolor;
margin: 5px;
padding: 5px;
}
<div id='header-wrapper'>And replace it with this:
<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
<b:widget id='Header1' locked='true' title='YOUR BLOG TITLE (Header)' type='Header'/>
</b:section>
</div>
<div id='header-wrapper'>Take a look at your page element page and you will see your new widget.
<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
<b:widget id='Header1' locked='true' title='YOUR BLOG TITLE (Header)' type='Header'/>
</b:section>
<b:section class='header' id='header-right' showaddelement='yes'>
</b:section>
</div>
You can now add content to that widget. For my example, I added my profile. Here is a screen shot before:
and here is after:
You don't have to do anything where it says YOUR BLOG TITLE. Your title will automatically fill in. Now you can add whatever you like in that widget, from your profile to a picture!
38 Comments:
I need this code, thank you very much.
Thanks a lot Annie! Will implement it right away! :)
Hi Annie, I know this is completely unrelated to this post but I wanted to let you know I have something for you over at my blog.
Another great one Annie. :) What I am looking for is a drop down menu which I can add widgets too. So far I can only find those which will add links, like a blogroll. I have seen others with drop downs including widgets and other bulky things, not just blogrolls. Hope you have something like that. Trying to search Blog U again but I did not find it the first time around.
@Laura, Thanks!
Interesting idea, but I don't have a tutorial for that type of drop down. I will add it to my list of things to figure out. If you come across any blogs with that feature, send me the links, please. Maybe I can reverse engineer it!!
This is some good code! I have been wanting to rearrange my widgets but certain ones just have to be at the top for maximum exposure. With this I can put those by the header.
hi there, how can i add a widget directly on the template, because when i'm trying to rearrange my widgets it goes broke, i wanna add a widgets in the bottom part after my post please help me.
i'm searching thru your post but i can't find answer please please help me.
I really like the ideas you have in this blog, and think that its a great place to read about new techniques, but I'm afraid I do have a bit of an issue.
It's difficult to judge how browser fiendly some ideas are. I know that dear old IE is a wild child, and doesn't help itself or us, but sadly there are quite a lot of Microsoft children out there.
When I navigate the site with IE7, lots of wierd things start to happen, like it asks me if I want to download the site! Also I get page errors when I eventually navigate to it.
Please don't feel that this is an attack against you, because everything works fine in FF, but is it possible that there are cross browser issues in these techniques?
warmest wishes
Rob Wendes
Rob
@rigor (Rob), sorry you experienced problems. I agree that IE is less than perfect. (and slow as I just discovered again) For that reason, I use Firefox, but that is me.
I do all my posts and editing of BlogU from Firefox, so sometimes a problem with IE escapes me. So, I just opened my site in an IE window, and didn't experience any of the problems you described. And I navigated to different areas of my blog. So, I don't understand why you are having problems.
I don't feel it is an attack on me. My reader's are quick to point out any display problems they have with my blog. So, I'm use to it. Thanks for your input.
i have just found this code here, thank you
@julia, take a look at this: Postbar - something new.
Hi Annie,
Wow, this is really a great blog. I emailed you earlier and just found this post, although my concern is, is it possible to use this with my header? I have 3 images for the header and I am not sure if using this code will have the same output. Thanks.
@KeNeShEa, It may work with 3 images...you would just have to carefully watch your padding and margins of all the elements involved. May be more than the average blogger can do.
i would love to be able to do this on my blog...www.purpleandpaisley.blogspot.com...but my html seems to be different than what you show? for example, my b:section's have the words 'includable' and stuff like that so i keep getting errors that my code is not parsed correctly?
Thanks for the tutorial, it works and I needed it.
Nice code thx
Thanks for the tip on how to include widgets!
We just started offering widgets for your sharing your favorite links, movies, and books at KartMe, and are glad to have this tip for blogger users.
Hi Annie,
I stumbled upon your blog as I was looking for a solution to something I wanted to do with mine. I was wanting to embed another page element right into the header (blog title). I was thinking of a search box or a place to put Adsense Ads.
I did try this one and it worked as it should - except that my blog has 3 columns and the end result was that the narrow left sidebar was moved up before the wide middle section.
Is there a way to embed Adsense Ads/Search Box right into the Blog Title without disturbing other parts? (My blog appears here.
Would appreciate your help.
@Gwen, Sorry, but I don't have an answer right off the top of my head. This blogging stuff, believe it or not, doesn't come easy to me. But, when I have time it is like a giant puzzle that I love solving. Only right now I don't have the time to solve this particular problem.
Thank you so much for this code i am going to try it with my new blog hope i will make mistake because the template i use is a little tricky see it here thank you so much.
i can't change it to left. i need it on the left of the header. can i?
This is one way to have some additional space on your blog...however, I like it more if my blog's title is found on the center...it is more easy to the eyes and less cluttered...by the way Annie, how can I reduce the size of my header?
@downtown saratota, about the only way I know is to physically make the header smaller when creating it.
Hi Annie, great blog! I'm trying to do what this post is saying, but I don't have anything that says "#header". Instead I have stuff that looks like this:
.Header .description {
font-size: $(description.text.size);
color: $(description.text.color);
}
.header-inner .Header .titlewrapper {
padding: 22px $(header.padding);
}
.header-inner .Header .descriptionwrapper {
padding: 0 $(header.padding);
}
Any help on what I do with that?
@Dale, I went to look at your blog, but you have several. Which one are you trying to add the widget to?
I'm with the same problem as Dale... maybe the Blogger code changed?
i think this is the header part now
/* Header
----------------------------------------------- */
.header-inner {
padding: 27px 0 3px;
}
.header-inner .section {
margin: 0 35px;
}
.Header h1 {
font: $(header.font);
color: $(header.text.color);
}
.Header h1 a {
color: $(header.text.color);
}
.Header .description {
font-size: 115%;
color: $(description.text.color);
}
.header-inner .Header .titlewrapper,
.header-inner .Header .descriptionwrapper {
padding-left: 0;
padding-right: 0;
margin-bottom: 0;
}
If you could help me I would be really gratefull! Very informative blog, now I know where to find the CSS ;) thanks
Well, right now the only thing I can see is to get the old template. You can still find them. Go to the dashboard | design | edit html | (scroll down to) Old Templates | Select layout template. I would then choose Minima. (That is the best template to modify in my opinion.)
hey, thanks so much for publishing this post, it's a great add on for my site. I really like the way you wrote it all down, the step by step instructions etc. Happy Holidays! :)
Thank you so much for this code i am going to try it with my new blog.....
ive visited this blog couple times, useful posts, great blog.
BTW can i add more columns in my header?
thanks a lot.
thanks so much for your information.i will try it and i will add some ads in beside my header blog.sorry if my comment like spam.i hate spam.
Thank you for such a valuable post ! This is looking to be great feature. No doubt, it is great add for my blog site. I am also looking for drop down menu bar widget. Could you please help me in letting more about that..
this is a good post.now i can add a menu navigation beside in my header with my ads.thanks
< b:section cl ass='hea der' id='header' maxwi dgets='1' showadd element='no'>
now I understand it if you want to add the widget must have a command like this ..: D thanks dude
i think someone what can i add a widget?but thanks for this info.i want to add some banner.
Hi;
I tried to divide my header right 300, left 700 but nothing appear. I tried your instruction and I saved and its ok on HTML but nothing appear.
Hope you can help me.
thank you
This WORKS FOR ME
#magazine-left {
width: 44%;
float: left;
}
#magazine-right {
width: 44%;
float: right;
}
.post-body img {max-width:99% !important;}
]]>
Hope this helps
I have seen so many complicated ways to do this, and I was failing at all of them. Thank you so much!