Build Online Store! | Penguin Panda Series - New! | 4 Rules To Make Money | SEO Settings | Facebook Popup 1, 2, 3 | Mashable 1 , 2


Monday, June 27, 2011

Customize Facebook Like Box With CSS


Pin It
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

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 mydatanest
      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 the code provided by daddydesigns. 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 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.

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 »


Thanks for making this possible! Kindly Bookmark and Share it.
Technorati Digg This Stumble Facebook Twitter

34 comments:

Comment Page :
aclough on 9:39 AM, June 27, 2011 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 2:01 AM, June 28, 2011 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 8:31 AM, June 28, 2011 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 11:24 AM, June 28, 2011 said... #

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

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

@Irham7297

waiting 4 reply

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

@true @irham

Please find the solution here -> Fix Like Box

Helber Lopez on 8:45 PM, July 14, 2011 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 2:00 AM, July 17, 2011 said... #

Registration has been disabled by mydatanest

Ro on 2:26 AM, July 17, 2011 said... #
This comment has been removed by the author.
Ro on 3:22 AM, July 17, 2011 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 8:00 PM, July 27, 2011 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 2:04 AM, August 11, 2011 said... #

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

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

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

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

@Jeremy

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

SimplifiedBlogging

Prime Aque on 6:32 PM, August 18, 2011 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 2:52 AM, August 27, 2011 said... #

better upload on google,

using this tutorial

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

Tamil arasan N on 9:53 PM, September 20, 2011 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 1:08 AM, October 29, 2011 said... #

Thanks... this was a big help.

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

I like this tutorial..

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

THANK YOU, THANK YOU, THANK YOU!

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

Can we reduce the width below 300px?

$hubham Meht@ on 11:59 AM, February 07, 2012 said... #

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

How To Save Ur Blog From Sopa/pipa

Muhammad Azeem on 4:18 PM, February 08, 2012 said... #

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

Abhishek on 12:40 PM, February 13, 2012 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 9:03 PM, March 19, 2012 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 3:32 PM, March 20, 2012 said... #

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

MBT Facebook Hacking Guide

Nihit Dalmia on 3:48 AM, March 22, 2012 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 8:45 AM, March 26, 2012 said... #

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

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

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

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

nice fb like widget great share
PC Tips and Tricks

Rams on 3:56 AM, April 02, 2012 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 2:56 PM, April 06, 2012 said... #

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

Custom Facebook App Development

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

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

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. Please do not spam Spam comments will be deleted immediately upon our review.

Regards,
Mohammad

 

Recent Posts

Join Me On Facebook

8600+ Followers

Join The Team!

Licensed Under CC

Recent Comments

Follow Me On Twitter

2601+ Followers

My Blogger Tricks (MBT) © 2012. All Rights Reserved | Contact |