June 27, 2011

Widgets

Customize Facebook Like Box With CSS


custom-like-boxStyling Facebook plugins is unfortunately not an easy job because very limited details are shared on the Facebook Developers page. Custom plugins help you to stand out as a brand and promote your business well. In April 2010, Daddydesigns published a tutorial on how to style and apply modifications to Facebook Fan box. Their tutorial was well entertained but with the introduction of Facebook Like Box instead of Fan Box, the change in algorithms made it difficult to modify the plugin using the same guide. After several trials and errors, we managed somehow to make the necessary small changes made by DaddyDesigns to fully customize the Like box with custom flavors of fonts and colors. This would surely have not been possible with their brilliant help.
I have made this tutorial as easy to implement as possible. You just need to carefully follow the easy steps below. I have divided the tutorial in two parts:
  1. Creating The style sheet for Like Box
  2. Creating a custom Like Box code
This Method works 101% till today :)

Update: We only showed you what you can  do. You can edit the CSS to try your creativity and make any design you like. See Likebox with mouse hover effect

1. Creating the Stylesheet For Like Box

Custom like box
Creating a style sheet is really easy. Just do this,
    1.  Copy and paste the code below inside a notepad
/*---------------MBT's Custom Like Box Start--------------*/
.fan_box a:hover{
  text-decoration: none;
}

.fan_box .full_widget{
  height: 200px;
  border: 0 !important;
  background: none !important;
  position: relative;
}

.fan_box .connect_top{
  background: none !important;
  padding: 0 !important;
}

.fan_box .profileimage, .fan_box .name_block{
  display: none;
}

.fan_box .connect_action{
  padding: 0 !important;
}

.fan_box .connections{
  padding: 0 !important;
  border: 0 !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #666;
}

span.total{
  color: #0080ff;
  font-weight: bold;
}

.fan_box .connections .connections_grid {
  padding-top: 10px !important;
}

.fan_box .connections_grid .grid_item{
  padding: 0 10px 10px 0 !important;
}

.fan_box .connections_grid .grid_item .name{
  font-family: "lucida grande",tahoma,verdana,arial,sans-serif;
  font-weight: normal;
  color: #289728 !important;
  padding-top: 1px !important;
}

.fan_box .connect_widget{
position: absolute;
bottom: 0;
left: 0px;
margin: 0 !important;
}

.fan_box .connect_widget .connect_widget_interactive_area {
margin: 0 !important;
}

.fan_box .connect_widget td.connect_widget_vertical_center {
padding: 0 !important;
}

/*---------------MBT's Custom Like Box End--------------*/
To keep it simple make these changes:
  • To change the font size edit font-size: 11px;
  • Replace the heading color ( #0080ff ) with a color of your choice. You can use our color generator tool
  • Replace the Profile Nick Names text color ( #289728 ) with one of your choice.
      2.   Now save the file by going to File > Save as
Save the file with the extension FB.css as shown below,
css extension
      3.   Finally upload the file on your hosting server or you can try any other free hosting service. I recommend Google Code.
You can use our link too: http://mybloggertricks.googlecode.com/files/facebook.css
      4.   Once you have uploaded the stylesheet file, you will be provided with a direct link to it. Keep it safe as we would need it later.
     5.    You are done!

2. Creating a Custom Like Box Code

Instead of using the new code provided on the developers page, we will use and modify a custom code. This is the modified code you need to use:
<script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US"></script>
<script type="text/javascript">FB.init("");</script>
<fb:fan profile_id="LIKE PAGE ID" stream="0" connections="10" width="300px" height="200px" header="0" logobar="0"   css="STYLE SHEET LINK"></fb:fan>
The above code structure consists of 4 important sections which must be filled properly.
  1. Like Page ID
  2. Connections i.e. Number of Profile Faces/pics
  3. Width and Height Dimensions
  4. Stylesheet link
Make these changes:
  • Replace  with the 12-15 digit numeric ID of your Facebook Like Page. You can find this ID inside your Like Page URL. For example: The URL of my like Page is,
https://www.facebook.com/pages/My-Blogger-Tricks/147104632016744
  • I have kept the number of profile pics denoted by connections equal to 10. You can reduce it if you want.
  • Replace STYLE SHEET LINK with the link of the stylesheet your previously uploaded. I will mention later how to create
Your Custom Facebook Like Box is now ready to be served! That's All. Paste this code anywhere you want and your personalized and styled box will show up just perfectly. If you face any problems just let me know. I will publish more designs and tutorials on this topic within this week.

Credits

Readers and developers are requested to kindly link back to this page if they wish to share this working tutorial with their visitors. It's the only tutorial published after daddydesigns tut which provides a modified solution.

Please let us know if you needed any help. Peace and blessings pals. :)



If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you Subscribe to our regular Email Updates!

If you don't want to get yourself into Serious Technical Trouble while editing your Blog Template then just sit back and relax and let us do the Job for you at a fairly reasonable cost. Submit your order details by Clicking Here »

61 comments:

aclough on Jun 27, 2011, 9:39:00 AM said... #

I have tried out your code and it doesn't seem to work. The Like box is displayed with default CSS. Can anyone get this working?

Mohammad Mustafa Ahmedzai on Jun 28, 2011, 2:01:00 AM said... #

@although

Did you add your Facebook ID correctly and add the proper CSS extension? Did you upload the file?
Buddy the customization works like 123. See another example here -> Customized Facebook Like Box

true on Jun 28, 2011, 8:31:00 AM said... #

bhai m getting error help me
Plugin cannot be rendered with the specified parameters.

my blog is
www.theindialeaks.blogspot.com

and your blog is too cool!

Irham7297 on Jun 28, 2011, 11:24:00 AM said... #

@true
i have problem like u. How to Fix it?

true on Jun 28, 2011, 12:48:00 PM said... #

@Irham7297

waiting 4 reply

Mohammad Mustafa Ahmedzai on Jun 28, 2011, 5:30:00 PM said... #

@true @irham

Please find the solution here -> Fix Like Box

Helber Lopez on Jul 14, 2011, 8:45:00 PM said... #

Great... I´ve been looking for this.
Thanks a lot for sharing it.

I have onlu one problem, i don´t have a Page ID. My fb site was upgraded and now the address is just facebook.com/purelightphotography

Do you have any idea how should i modify the code?

Have a nice day

Ro on Jul 17, 2011, 2:00:00 AM said... #

Registration has been disabled by mydatanest

Ro on Jul 17, 2011, 2:26:00 AM said... #
This comment has been removed by the author.
Ro on Jul 17, 2011, 3:22:00 AM said... #

But what to do if the "Facebookpagename" is too long, is there a way to change the showing name with css? please answer

Jeremy on Jul 27, 2011, 8:00:00 PM said... #

I seem to have some trouble showing the likebox
www.monity.nl
it wont show up at all

tried multiple css links but nothing comes up

Haz Issac on Aug 11, 2011, 2:04:00 AM said... #

Error.. the msg is : Could not retrieve id for the specified page. Please verify correct href was passed in.

Pankaj on Aug 12, 2011, 7:21:00 PM said... #

i am trying to put like box on my liquid page..can you tell me how to do that

Prime Aque on Aug 18, 2011, 6:25:00 PM said... #

@Jeremy

I solved the problem, I made some modification with MBT link back

SimplifiedBlogging

Prime Aque on Aug 18, 2011, 6:32:00 PM said... #

Okay, I got some fix with this nice tutorial, I made this thing works for me, and i got you the direct link: http://testingforsb.atwebpages.com/fbgreen.css (for the green font)
http://testingforsb.atwebpages.com/fb.css (for red font>

Please red the complete solution with of course credits and back links to MBT! simplifiedblogging.com

Muhd Firdaus on Aug 27, 2011, 2:52:00 AM said... #

better upload on google,

using this tutorial

http://www.intechgrity.com/freely-host-css-js-other-static-files/

Tamil arasan N on Sep 20, 2011, 9:53:00 PM said... #

bro i can't able to upload the file in datanest, can u please suggest me any other file hosting serives top upload my face book like box bro,

this is my blogger www.techradarinfo.blogspot.com

Datoad on Oct 29, 2011, 1:08:00 AM said... #

Thanks... this was a big help.

arhamvhy on Nov 22, 2011, 11:31:00 AM said... #

I like this tutorial..

The Grossner Family on Dec 13, 2011, 8:12:00 AM said... #

THANK YOU, THANK YOU, THANK YOU!

Beat Bookie on Dec 15, 2011, 6:19:00 AM said... #
This comment has been removed by the author.
numtamilnadu.com on Dec 17, 2011, 12:40:00 PM said... #

Can we reduce the width below 300px?

$hubham Meht@ on Feb 7, 2012, 11:59:00 AM said... #

Thanking you for this amazing post hope u will keep it up..

How To Save Ur Blog From Sopa/pipa

Muhammad Azeem on Feb 8, 2012, 4:18:00 PM said... #

http://code.google.com
google code is the best way to upload any file

Abhishek on Feb 13, 2012, 12:40:00 PM said... #

fb like box is not appearing with the style sheet i have defined.... it is appearing with the default css of facebook... what to do ?

Björn Norrlander on Mar 19, 2012, 9:03:00 PM said... #

Great tutorial Mohammad!

A question.
I want to display the facebook wall feed, rather than displaying who likes the page.
If I use the standard way to get a like box, I can simply add the code "force_wall=true" to make it happen.
But do you, or anyone else know a way to display the feed using this tutorial's method? (So that I can style it the way I want)

Cheers!

Björn

$hubham on Mar 20, 2012, 3:32:00 PM said... #

Great... I´ve been looking for this.
Thanks a lot for sharing it.

MBT Facebook Hacking Guide

Nihit Dalmia on Mar 22, 2012, 3:48:00 AM said... #

Thanks Mohd.. I have applied it to my blog but tweaked it & it gives excellent result. Also, provided with complete graphical presentation "How to DIY". I have also solved the problem of not having Like Page ID. Have a look at my Blog & let me know what do you think of the same.

http://www.yourbloggingtips.com/2012/03/facebook-like-box-widget-for-blogger.html

arhamvhy on Mar 26, 2012, 8:45:00 AM said... #

Wow very cool, I want to try it master..

Lauraine on Mar 26, 2012, 5:33:00 PM said... #

Keep posting such kind of information on your blog. I bookmarked it for continuous visit.
html5 media player

Daniyal @ SDHacks on Mar 30, 2012, 7:21:00 PM said... #

nice fb like widget great share
PC Tips and Tricks

Rams on Apr 2, 2012, 3:56:00 AM said... #

Awesome! Long time I thought this was impossible, which is exactly what FB wants us to believe... lol.

Thanks :D Too bad I cant get the locale working.. but working on it. Slm!

Angelina on Apr 6, 2012, 2:56:00 PM said... #

I really like this site, feel this site impressive and interesting.

Custom Facebook App Development

Cloud Tech News on Apr 30, 2012, 6:41:00 PM said... #

I have done. Thanks for sharing.
I share the CSS tips: Programming and Coding

Pete on Jun 2, 2012, 1:17:00 AM said... #

Worked like a charm! Thank you!

Unknown on Jun 6, 2012, 4:12:00 AM said... #

if your widget is not following your css, try adding the following to the end of it like so:

/path/to.fb.css?1

MAKE SURE you increment it by 1 for every time you make changes.

example: /path/to.fb.css?2
example: /path/to.fb.css?3
example: /path/to.fb.css?4

Jitendra Indave on Jun 6, 2012, 10:08:00 PM said... #

dear mohammad..I had sent u already problem detail and here I m again asking to solve it.please let me know how can I get this type of fb like page at startup ...code please? see link below

http://gstek.info/forum/topicseen./webmasters-forum/how-can-i-create-fb-like-widget-see-screen-shot-33856.msg463563.html#msg463563

A2zstudent on Jun 8, 2012, 4:23:00 PM said... #

sir how can i add blog updates in Face Book pages pls send information thank you.

Jeff Neal on Jun 9, 2012, 8:32:00 AM said... #

can I just pay you to do this for me?

James Bishop on Jun 20, 2012, 1:21:00 AM said... #

I love the customized like box - it makes it seem so much more a part of the site instead of a copy and pasted tool from somewhere else.

I do have a question - The Stream content is very short at only (215px) and I would like it to be most of the content (375px of the 400px). I have been trying to edit the length but it is built into the html that I have no access to. Do you have any suggestions?

Mohammad Mustafa Ahmedzai on Jun 20, 2012, 11:05:00 AM said... #

@Nihit
You are required to kindly link back to this page to avoid copyright violation. We found no link on your page pointing here.

@Jitendra Indave

This is a facebook popup that we created two versions. Please find theme here: Jquery Facebook popup1 and Jquery Facebook popup2

and a new one Jquery Facebook pop up with timer

@Jeff Neal

We do offer premier help please contact us through services page

@James
You will have to edit the height both in CSS and HTML. In CSS edit this part:

.fan_box .full_widget{
height: 200px;
border: 0 !important;
background: none !important;
position: relative;
}

In HTML edit the part at the last line i.e. Height="200px"

Also change the number of connections (profile pic number)

Hope this helps :)

Margarita Stoffberg on Jul 3, 2012, 6:28:00 PM said... #

Hey there! Thanks so much for this! I followed each step carefully but for some reason it's not working?

The file is called FB.css.txt - I uploaded it onto Google Code as advised. Have I named it incorrectly?

Thank you!

callentx on Jul 8, 2012, 8:07:00 PM said... #

I'm new to this is the instruction that you are listing here for this cool light box pop up that shows up at the lower right hand side of your blog page? The one that is a facebook like botton and it has a list of recent article.

Does this get set up in your blog or your facebook page. I would love to get it on my site. my site has a plug in tool box that makes it easy to add things like this. I would love to see if it would work on my site. I have a service request in. Not sure what the style sheet is, is related to the facebook like box?

Nelda Ceroli on Jul 14, 2012, 12:39:00 AM said... #

Please please i want set an image width and height for all thumbnail of fb like box. How to do it? Thank you very much..

Santu on Aug 5, 2012, 1:04:00 PM said... #

cool trick..I will surely try it on my blog .

Regards
Technology Blog

Mie Samorn on Aug 17, 2012, 10:42:00 PM said... #

It's work for me, but idon't want to show face! when i set conncetion to (0) it don't show amount of people like. Thanks

LJ on Aug 26, 2012, 11:07:00 PM said... #

How do you get the like button to appear on top again. when I use stream "yes", the like button falls in the middle of my stream post. Please Help

book24u.blogspot.com on Sep 7, 2012, 8:44:00 PM said... #

very nice tricks...Download lot of bangla books

Navin on Sep 26, 2012, 4:28:00 PM said... #

Its nice way to edit the style of like box. Will certainly do it in my blog .

Navin on Sep 26, 2012, 4:28:00 PM said... #
This comment has been removed by the author.
Munna Haque on Oct 3, 2012, 7:28:00 PM said... #

Thanks nice post
All Pc Tips

pushpinnder singh on Oct 4, 2012, 1:01:00 PM said... #

sir how to find our page id.. I see my page url but page id was not there....Pls answer......
Thanx

Abu Shaleh on Oct 10, 2012, 12:12:00 PM said... #

Well this trick worked for me :) and nice share 1 like for this.

CSS3 Zoom Out Social Sharing Plugin For Blogger

run19 on Oct 24, 2012, 12:20:00 PM said... #

my neighbor's mother got paid $18735 the prior month. she been working on the computer and bought a $423000 house. All she did was get blessed and profit by the directions made clear on this web page http://Run19.com

Satinder Singh on Nov 7, 2012, 11:52:00 AM said... #

For bloggers amispace Widget Creator is a wonderful tool to create a custom Facebook Like box for your blog. You can adjust height, width along with background colour.

http://amispace.com/create-custom-facebook-like-box/

Muhammad Hussain on Jan 2, 2013, 8:14:00 PM said... #

if you have converted your Facebook page ID into username you can still get your page id.
=> Click on Edit Page Button
=> Update infor
when you open this link your page id will be shown in browser address bar copy this id and use it..
Mohammad Mustafa bai thank you soo much for sharing this..

tube on Jan 16, 2013, 12:32:00 PM said... #

Remember to add your SDK code guys,the one that has:

<div id="fb-root"></div>
<script>undefinedfunctionundefinedd, s, id) {
var js, fjs = d.getElementsByTagNameundefineds)[0];
if undefinedd.getElementByIdundefinedid)) return;
js = d.createElementundefineds); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=265806670123892";
fjs.parentNode.insertBeforeundefinedjs, fjs);
}undefineddocument, 'script', 'facebook-jssdk'));</script>

I totally left that out lol.

LJ on Jan 26, 2013, 2:36:00 AM said... #

Is there an alternative since Facebook has changed the script again. All of my Fanbox has changed to default box again.

Toshihiro Maruyama on Jan 26, 2013, 7:56:00 PM said... #

They did change the code...
Now all the custom layout and design have been destroyed....

Kristian on Jan 30, 2013, 3:17:00 PM said... #

Yes they changed something, not working any longer...

ס on Jan 31, 2013, 2:06:00 AM said... #

Can someone *PLEASE* post a link to a working example of this?

Click Here To add Comment

Confused? Feel free to ask

Your feedback is always appreciated. We will try to reply to your queries as soon as time allows.

Note:
1. To add HTML CODE in comments then please use our HTML Encoder
2. You can always Test the tutorial on our HTML Editor
3. No cheesy/spam Comments tolerated Spam comments will be deleted immediately upon our review.

Regards,
Mohammad

Support Us

If our Tutorials have helped you a little, then kindly spread our voice using the badge below:-

or try a Beautiful Banner


Widgets

 
  • MBT Icons and buttons

    Icons and Buttons

    Our resources have been successfully downloaded over 10K times and found almost every where. Get yours!

  • choosing webhost for a blog

    Why HostGator?

    Learn Why we chose HostGator as our Web Host and find discount coupons to kick start your blog today!

  • SEO Settings for blogger

    ALL IN ONE SEO PACK 2012

    Learn every single SEO tip that will boost your blog's ranking and organic traffic. We got them all!

  • Blogger widgets and plugins

    Visit MBT's Blogger LAB

    Why not take a tour of all great Blogger widgets published so far? You Name it we have it!

  • become a six figure blogger!

    Become a SIX FIGURE BLOGGER

    Learn what it takes to become a successful entrepreneur and build a living online!

About The Author

Hi! I am Mohammad, a certified SEO Consultant, Pro Blogger, Computer Engineer and an addicted Web Developer. Read More..

Recipes

SEO Affiliate Marketing Social Media

Make Money Online Web hosting

Blogging Tips Web Designing

Plugins and Widgets Blogging Ethics

Recent Comments

Popular Series

Powered by:

My Blogger Tricks © 2013. All Rights Reserved | Contact |