Add Logo to Ning Bar - (collaborative efforts of Jen and Kris)
Kris of Bikerspost.com wrote tonight and asked how to add his logo to his NingBar. Kris is a Design Client, and a VIP Member of JenSocial. So, I was happy to share this code with him. Ironically I had already written the code for the new design for JenSocial - - coming soon! We discussed behind the scenes and decided we'd share with everyone.
Important Note: If you are using the tip for adding the SignIn Box links to your NingBar, this will not format correctly.
Instructions:
Be sure to see the awesome tip Kris offered to add logo to your SignIn Box.
Have fun!
Jen and Kris
Tags: add logo to ningbar, logo, logo in ningbar, ning bar, ningbar
Permalink Reply by Glenn Lynch on June 6, 2012 at 7:08am OMG!!! What is this witchcraft?!!! Thanks so much Jen!!!! :D
Permalink Reply by Glenn Lynch on June 6, 2012 at 7:18am Hey Jen sorry to bother you so much with this but how can I make the code above a hyperlink?
Permalink Reply by Jana Arnold on June 5, 2012 at 1:48pm I had the same problem after I added a link to the logo in the top bar.
Permalink Reply by Sylvia Hysen on June 10, 2012 at 4:02pm love it...thx all
Permalink Reply by bILLY on June 11, 2012 at 11:42pm Can someone help when i add the link to my code my logo is cut in half.

Permalink Reply by Patrick Chappelle on June 13, 2012 at 9:41am See Jen's response here.

Permalink Reply by Patrick Chappelle on June 20, 2012 at 8:33am This didn't work for me. Ugh! :(
Permalink Reply by Erik Woods on June 20, 2012 at 2:53pm May I suggest these changes?
<style>
#xn_bar {
height: auto !important;
}
#xn_bar #ningbar_logo {
float: left; /* although I don't think you will always need this - can probably use left: 0 with position relative or something */
padding: 0 0 0 10px;
}
</style>
<script>
if (typeof(x$) != 'undefined') {
x$("#xn_bar #xn_bar_menu").prepend('<img id="ningbar_logo" src="yourimageurl">');
}
</script>
If you say height: auto, it will stretch as big as you need it for the image, without having to edit it anytime you feel like updating the image. If you want more spacing, use something like padding: 0 0 10px 0; to put 10px at the bottom of it, no matter the height.
I also moved the styles for the logo outside of the javascript, because it is good practice to keep those things separate.
And then you could also probably .prepend() the whole dang bar to #xg_head, eliminating the need to override styles for #xn_bar's width and margin.
Also, you can leave type="text/javascript" off of <script> tags in the HTML5 specification. Same goes for <style> tags (but I see you've already done that here).
I haven't really tested this code much at all, but it should all work in theory.

Permalink Reply by Patrick Chappelle on June 20, 2012 at 5:56pm Oh wow! Thanks David. I should have mentioned that I prefer the logo in the sign in box.

Hi Erik,
It looks very good to me, especially like the height:auto on xn_bar - - and adding the style for ningbar_logo in proper place. Sometimes I type so fast while thinking, may not come out with the cleanest final solution. I haven't tested it.
Thanks!
Jen
Permalink Reply by Paul Mambwe on December 7, 2012 at 1:55pm Jen, Thank you very much for this code, Now I have one more problem, How did you add the navigation menu to your Ning bar? I want to get rid of my navigation bar, the name of my website and the tagline words. Please help!
Dustin Craig replied to John Bizley's discussion 'Show Your Ning 3.0 Sites'
Paul Corona replied to Suzie Nielsen's discussion 'Watching Cultivating videos- have questions!'
Chris replied to JFarrow's discussion 'Ning Emails Going to Spam?'
Larry Matthews replied to Larry Matthews's discussion 'Photos'
Fabio replied to Phil McCluskey's discussion 'Site Manager Updates for Ning 3.0 Networks'
© 2013 Created by Ning.
