Tutorial for Facebook Like Box: change border color, change background color and remove the header

Hi guys! In this tutorial I will explain to you how you can easily customize the Facebook Like Box.

This is the Facebook Like Box's code:

<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=yourappid&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-like-box" data-href="https://www.facebook.com/FacebookDevelopers" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>

To remove the border, add this code

data-show-border="false"

at

<div class="fb-like-box" data-href="https://www.facebook.com/FacebookDevelopers" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>

To remove the header, change

data-header="true"

with

data-header="false"

If you want to change the border's color, use:

<style>

.fb-like-box{
border:1px solid #900;
}

</style>

And you must hide the standart border by using this code: data-show-border="false"

If you want to change the background color, use this code:

<style>

.fb-like-box{
background-color:#ccc;
}

</style>

Video tutorial:









Leave a Comment