Tutorials

Latest Word » Tutorials » Facebook Style Footer Admin Panel Part 1
Facebook Footer Admin Panel

Facebook Style Footer Admin Panel Part 1

Tags: ,

The popularity of social media has been booming in the past few years and Facebook definitely has climbed high to the top of the social network rankings. Facebook has many Ajax driven features and applications that are very impressive, and one of the things I particularly like is the footer admin panel, where it neatly organizes frequently used links and applications.

This week I would like to cover part 1 of how to recreate the Facebook footer admin panel with CSS and jQuery.

Final Demo

Step 1. Wireframe and Tooltip Bubbles – HTML & CSS

Lay out the wireframe of the admin panel using an unordered list for the foundation. The last two list items (Alert Panel & Chat Panel) will have sub-panels nested within them. Since these two panels will float to the right, the order in the markup will be reversed.

Tooltip foundation

Notice that there is a <small> tag nested within the <a> tag, this is how we will achieve our tooltip bubble on the navigation.

HTML

<div id="footpanel">
    <ul id="mainpanel">
        <li><a href="#" class="home">Inspiration <small>Design Bombs</small></a></li>
        <li><a href="#" class="profile">View Profile <small>View Profile</small></a></li>
        <li><a href="#" class="editprofile">Edit Profile <small>Edit Profile</small></a></li>
        <li><a href="#" class="contacts">Contacts <small>Contacts</small></a></li>
        <li><a href="#" class="messages">Messages (10) <small>Messages</small></a></li>
        <li><a href="#" class="playlist">Play List <small>Play List</small></a></li>
        <li><a href="#" class="videos">Videos <small>Videos</small></a></li>
        <li id="alertpanel"><a href="#" class="alerts">Alerts</a></li>
        <li id="chatpanel"><a href="#" class="chat">Friends (<strong>18</strong>)</a></li>
    </ul>
</div>

CSS

First start by fixing the panel to the bottom of the viewport.

#footpanel {
	position: fixed;
	bottom: 0; left: 0;
	z-index: 9999; /*--Keeps the panel on top of all other elements--*/
	background: #e3e2e2;
	border: 1px solid #c3c3c3;
	border-bottom: none;
	width: 94%;
	margin: 0 3%;
}

As you may already know, IE6 does not understand fixed positioning. I stumbled across a tutorial that fixed this problem*.

*html #footpanel { /*--IE6 Hack - Fixed Positioning to the Bottom--*/
	margin-top: -1px; /*--Prevents IE6 from having an infinity scroll bar - due to 1px border on #footpanel--*/
	position: absolute;
	top:expression(eval(document.compatMode &&document.compatMode=='CSS1Compat') ?documentElement.scrollTop+(documentElement.clientHeight-this.clientHeight) : document.body.scrollTop +(document.body.clientHeight-this.clientHeight));
}

*Note: Due to heavy loading on the browser, an alternative solution would be to either use an position: absolute; or if the situation/client allows it use display: none; for those with IE6.

Style the unordered list which will be the foundation of this panel.

#footpanel ul {
	padding: 0; margin: 0;
	float: left;
	width: 100%;
	list-style: none;
	border-top: 1px solid #fff; /*--Gives the bevel feel on the panel--*/
	font-size: 1.1em;
}
#footpanel ul li{
	padding: 0; margin: 0;
	float: left;
	position: relative;
}
#footpanel ul li a{
	padding: 5px;
	float: left;
	text-indent: -9999px; /*--For text replacement - Shove text off of the page--*/
	height: 16px; width: 16px;
	text-decoration: none;
	color: #333;
	position: relative;
}
html #footpanel ul li a:hover{	background-color: #fff; }
html #footpanel ul li a.active { /*--Active state when sub-panel is open--*/
	background-color: #fff;
	height: 17px;
	margin-top: -2px; /*--Push it up 2px to attach the active button to sub-panel--*/
	border: 1px solid #555;
	border-top: none;
	z-index: 200; /*--Keeps the active link on top of the sub-panel--*/
	position: relative;
}

Tooltip Demo

Declare the text replacement for each link.
You can download these great icons by Pinvoke here.

#footpanel a.home{
	background: url(home.png) no-repeat 15px center;
	width: 50px;
	padding-left: 40px;
	border-right: 1px solid #bbb;
	text-indent: 0; /*--Reset text indent since there will be a combination of both text and image--*/
}
a.profile{ background: url(user.png) no-repeat center center;  }
a.editprofile{ background: url(wrench_screwdriver.png) no-repeat center center; }
a.contacts{ background: url(address_book.png) no-repeat center center; }
a.messages{ background: url(mail.png) no-repeat center center; }
a.playlist{ background: url(document_music_playlist.png) no-repeat center center; }
a.videos{ background: url(film.png) no-repeat center center; }
a.alerts{ background: url(newspaper.png) no-repeat center center; }
#footpanel a.chat{
	background: url(balloon.png) no-repeat 15px center;
	width: 126px;
	border-left: 1px solid #bbb;
	border-right: 1px solid #bbb;
	padding-left: 40px;
	text-indent: 0; /*--Reset text indent since there will be a combination of both text and image--*/
}
#footpanel li#chatpanel, #footpanel li#alertpanel {	float: right; }  /*--Right align the chat and alert panels--*/

Tooltip Demo

Style the tooltip bubble, by default the <small> tag will be hidden with a display:none;. On hover over, allow the tooltip to appear with a display:block;

#footpanel a small {
	text-align: center;
	width: 70px;
	background: url(pop_arrow.gif) no-repeat center bottom;
	padding: 5px 5px 11px;
	display: none; /*--Hide by default--*/
	color: #fff;
	font-size: 1em;
	text-indent: 0;
}
#footpanel a:hover small{
	display: block; /*--Show on hover--*/
	position: absolute;
	top: -35px; /*--Position tooltip 35px above the list item--*/
	left: 50%;
	margin-left: -40px; /*--Center the tooltip--*/
	z-index: 9999;
}

What’s Next?

Part 2 of this tutorial will go over how to style the sub-panels and how to activate them using jQuery. If anyone had any questions or comments regarding the tooltip technique, please let me know!

Related Posts

Author Bio

My name is Soh Tanaka and I am a Los Angeles based designer/front-end developer specializing in CSS driven web design with an emphasis on usability and search engine optimization. I also run a CSS Gallery which is updated daily with the best CSS websites from around the world. Come check it out!

You can learn more about me or Twitter  Follow me on twitter for more updates and resources!

Did You Enjoy This Post?

subscribe  Subscribe via RSS or by email to get all upcoming tutorials and articles delivered straight to you.

+ Add Comment92 Peeps Have Spoken Their Minds...

  1. SavenokRyslan

    Wow! Great article!

    По русски:
    Спасибо огромное, узнал пару новых вещей)

  2. Rosalind Wills

    Very cool, and really clever choice for a post subject! I’ll be watching for the second half of this for sure.

  3. Martin

    Nice idea for a tutorial, looking forward to the second part. Tho I think you might be able to pull off the fixed positioning for IE6 using position:absolute, thus avoiding the use of expressions which can slow the browser down.

  4. macsim

    Kick ass like all your blog. Thanks a lot and keep going.

  5. Marco

    Well done – looks VERY slick. Can’t wait to see more activity going on that bar. Keep up the great work mate!

  6. Gaiz

    I recommend to change CSS Hack by remove “top:expression”
    and use domready in JavaScript to fix instead because CSS expression make heavy load on browser :)

  7. Sascha Heinze

    Danke, das ist wieder ein super Artikel von euch!!

  8. Agnieszka

    Nice article and, as always, an interesting subject. I have a question though: I’m using the newest Opera (10.10) and the tooltips are showing aligned to the left corner of the icon, instead of being centered. The weird thing is – they are showing correctly when I view the site using Opera Dragonfly (their webdeveloper tool). Am I missing something or is it some kind of a bug in Opera that I should report?

  9. Mark

    Wow! This is very nice. I can’t wait for the part 2.

  10. YongWei

    Very cool.
    Thanks for your sharing. :)

  11. shankar

    this really nice, very cool

  12. Soh

    @Agnieszka Thanks for catching that, I went ahead and corrected the bug. We just have to add the position: relative; to the link as well~

    #footpanel ul li{
    	padding: 0; margin: 0;
    	float: left;
    	position: relative;
    }
    #footpanel ul li a{
    	padding: 5px;
    	float: left;
    	text-indent: -9999px; /*--For text replacement - Shove text off of the page--*/
    	height: 16px; width: 16px;
    	text-decoration: none;
    	color: #333;
    	position: relative;
    }
    

    @Gaiz and @Martin thanks for the heads up. I agree with the absolute positioning switch for IE6, or if the situation or client allows it, just display: none; :-p

    thanks guys~

  13. Richard Tape

    Hi Soh, As always, great article. Have spotted a strange little bug in Firefox 3.5.5 on Windows 7 (for the final demo). When you click on the link for chat, the list of friends appears flush to the _left_ hand side of the menu bar, rather than the right. The link which pops up the news displays correctly, however. Just seems that the list of friends isn’t positioned correctly, that’s all.

    Can’t wait to see the second part of this tutorial!

  14. Max

    Great tut! looking forward to part 2.

  15. scvinodkumar

    wow excellent tutorial….

  16. Tyler

    I really like this idea, and im looking forward to seeing what people will do with it. Although, I am concerned it doesnt work correctly in Chrome 4. I have provided a link to my screenshot. Hope you can work this out :) Thanks for sharing, and keep up the great work. http://tycat.recoding.net/somethingsWrong.png

  17. Jamal Mohamed

    This would be cool if applied to WordPress Mu, as that app is more social oriented than single WordPress install.

    Thanks Soh for the inspirational work… I like your blog by the way.

  18. Design Informer

    Nice tutorial man! I can’t wait for part 2. I was actually looking for something like this before but there was nothing out until now!

  19. Spenser

    Such an awesome and well written tutorial. Retweeting immediately.

  20. Khalil

    Wonderful Article! like it. waiting for part2

  21. Madhukar

    Nice article, very useful one. Looking forward for second part.

    - Madhu

  22. Ais

    Great tutorial.. thank you..
    Part 2 please… :)

  23. Grga

    Can’t wait for the part 2… Great job!

  24. sharin_sg

    awesome tutorial and thanks for sharing. love it!

  25. chris

    Thank you, and beautiful blog design..

  26. Fred

    Really nice post, thank you.

  27. J DesigN

    Cool tips again ^^

  28. Aditya Sanghi

    Couldn’t wait for part 2 :) Started reading and trying out code from the final demo! Thanks man, you’re a champ!

  29. m4

    Amazing! Please publish the next part! :)

  30. double dik

    Cooooooolllllllll tips!! Please publish the next part!

  31. En3r

    Hi
    Nice tutorial
    how can i make it work on a joomla website?
    Which files must i edit?
    thanks

  32. Marcell Purham

    Great tutorial. Anxious for the next part :)

  33. dev

    Awesome tutorial.

  34. kuflu

    thanks friend perfect

  35. VangOS

    Great and useful tutorial. Thank you for sharing.

  36. Jehnee

    very cool i can use it to my site… thanks.

  37. Janvier

    I am always impressed by your creations! The facebook footer is something I have wanted to reproduce so often for buddypress and here’s a neat way to go about it!

  38. Janvier

    I created a buddypress plugin based on this one today. If you encounter glitches please let me know.

    http://www.wprooms.com/2010/01/05/facebook-like-foot-panel.html

  39. Hi_Jack

    Very cool, i will use this tool on my site. Thanks again

  40. Jhon Doe

    Awesome tutorial.

  41. Dan Lawson

    This is very useful thanks. I’m thinking of adding some code for logged in users so that this only shows for admin’s who can edit the content of the pages using this footer.

  42. Attila Bogozi

    nice..thanks for sharing…

  43. katakataku

    nice nice nice …………..

  44. Mansur

    I think this article was most wanted started 2010.

    Thank for the tutorial.

  45. exa

    wow, really amazing tuts…
    iam glad can found this tuts
    anyway i gonna looking forward for the next part
    thanx alot.. ^^

  46. viet flex

    Thanks for post, it very nice!

  47. trần ngọc Hiếu

    thank . but if IE6 is not running

  48. eltechno

    hello tutorial how I can incorporate that into my site built with Joomla? which file should I edit, I use as a component joomsocial

  49. emilio

    how it integrates with joomola?Facebook Style Footer Admin Panel Part 1/Part 2?anyone can help me

  50. art

    Awesome!

  51. hanaptayo

    nice post, iam glad can found this tuts, hope i can integrate this to my site… up up up thanks

  52. Kevin John

    te pasaste chato.. tiene buena pinta.. lo implementare y le sacare mucho provecho.. gracias :D

  53. Else Pelto

    Hi, I found your page when I was searching google for sites related to this article. I have tell you, your site is brilliant. I don’t have much time at the moment to fully read your website but I have bookmarked it. I will be back in a day or two. Thanks.

  54. CSS Web Design

    this is something I’ve always found useful on Facebook. However, it’s important to find the right situation…the appropriate website to use this on because it wouldn’t suit everyone. I do like the idea of having fixed navigation that is always at the top or bottom of a site.

  55. Mr. herre mode

    Wow, this is a cool admin panel. And a very good and understandable tutorial. Thanks a bunch :-)

  56. nano

    Thats cool! Keept up..

  57. zac

    Hi great posts.. I always enjoy and appreciate your work. I just wanted to let you know I noticed a minor bug in IE 7 + 8, the Inspiration/Design Bombs speech bubble does not display correctly, it splits into two lines, the top one popping out of the panel. Anyhoo.. thanks for sharing =)

  58. Cem

    Nice work , is there any way to change position ? for example inverting the panel , moving it to the top?

  59. Rex S. Sacayan

    Wow! Excellent! This is what I have been looking for. It works well also with IE6.

    THanks SOH!

  60. DesignerSandbox

    This is so sweet, I would like to use this to implement with my ongoing twitter module for joomla.
    This is nicely done.

  61. Fre

    Wouldn’t it be a more logical choice to add the ‘small’ text to the link as a a title? That way you could avoid having double content and still have it work. It would be far more user-friendly and semantically correct, because the small tag should be avoided as it is a presentational tag.

    The standard tooltip could then be avoided by deleting the title tag on mouseover and replacing it on mouseout.

  62. vdubplate

    Yea, try to get this to float over flash ads on your site.

  63. wptidbits

    Is there anyway that we can do features like wibiya.com etc? I will be great to have that. Means like our own customization and themes or images that we like. May developed into a plugins too. Good idea isn’t it?

  64. Jack

    if you have problems getting it over the top of flash ads…
    you might need to change the “wmode” of your flash to transparent or you might need to set z-index on the footer really high.

  65. Harry

    No doubt, a great article.

  66. Thomas Craig Consulting

    Awesome tutorial, thanks for sharing.

  67. Marb

    Thanks,this is just what i needed.

    Great tutorial, and nice website to!

    greets

  68. Rushabh Vasa

    This is amazing post.. really liked it a lot… thanks.

  69. Hakan

    download link?

  70. Bob

    Cool~Thanks for sharing~

  71. Nikita Sumeiko

    Thanks for sharing. I’m really satisfied with such a work. I like that. Twitted your post (http://twitter.com/manakor/status/10926164567) to give it a small push. My audience will be happy with this stuff too.

    Thx a lot :)
    And keep doing thing like that.

  72. Raghib suleman

    Thanks for sharing its dude…

  73. gin

    i have a question. when i click a online friend nickname i want open a window on bar for the chat how can i do this.

  74. mark xtian vasquez

    thanks for the source………
    i’m looking forward for more demo’s……..
    i’m a beginner developer, thanks a lot……….

  75. AmilaDG

    Thanks very much for the article. This is the i’m looking for.

  76. Astematur

    good cod thanks.

  77. gin

    no answer for my question?

  78. guillermo

    u are really amasing!!!!!!!

  79. Ed

    I’m really blown away with your site and tutorials…amazing work…will subscribe to your site and follow you on twitter…Cheers!

  80. Jordan Walker

    Excellent implementation of a common user interface.

  81. kat

    Thanks for this! The best facebook style footer code i’ve used!

  82. brixter

    Wordpress v 3 should have added a feature similar to this but I guess they still haven’t…

  83. Buster Benson

    I love this. However, I noticed that the footer doesn’t quite work on the iPhone. The bar initially gets pushed to the bottom of the page, but if you scroll it stays at the same location on the page. Any idea how to fix that?

  84. Emanuel

    Great u are the best :X

  85. teknospor

    thank you… i like post

  86. yasam phani

    Nice article

  87. gecko

    very interesting. how to detect the user online? any idea?

  88. yasamphani

    Nice article

  89. Mukesh

    This is awesome.. I am keen to see second part..

  90. Anil yadav

    I was searching for it from very long time. Finally i got that…

    Nice work keep it up….

Speak Your Mind...

Post HTMLNeed to Post HTML Code? Use Postable to post code friendly html. *Wrap all html code in <pre></pre> tags.
Post HTMLNeed to Keep Updated with Comments? Subscribe to comments now.

CSS Gallery