How To Customize Facebook Fan Box With CSS
We find difficulty in modifying the actual fan page code given by Facebook. So first of all we will make our own fan box code which will be further modified.Your new fan page code should code should be in following format.
<!--http://internetricks4u.blogspot.in -->
<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("1690883eb733618b294e98cb1dfba95a");</script>
<fb:fan profile_id="335783349790411" stream="0" connections="10" logobar="0" width="300"></fb:fan>
<div style="font-size:8px; padding-left:10px"><a href="http://www.facebook.com/bloggingtrick"></a></div>
- Replace profile_id="335783349790411" to your profile_id. This id will appear on your address bar in condition to editing the page.
- Replace http://www.facebook.com/bloggingtrick with your page url
<!--http://internetricks4u.blogspot.in -->
<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("1690883eb733618b294e98cb1dfba95a");</script>
<fb:fan profile_id="335783349790411" css="http://shahbazproject.googlecode.com/files/myfacebook.css?1" stream="0" connections="10" logobar="0" width="300"></fb:fan>
<div style="font-size:8px; padding-left:10px"><a href="http://www.facebook.com/bloggingtrick"></a></div>
- You can use Google Code to upload CSS code.
- In Blogger Dashboard, Go to Design / Page Element.
- Choose Add a Gadget
- Hit HTML / JavaScript and paste the above fan box code in it.
Working Of Modified Facebook Like Box:-
The CSS list given below will explain the effect on Like box. You can add different property in it to modified it further./* code on http://internetricks4u.blogspot.in */
.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: #FF6600;
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: #666 !important;
padding-top: 1px !important;
}
.fan_box .connect_widget
{
position: absolute;
bottom: 0;
right: 10px;
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;
}
Explanation
- .fan_box a:hover define the effect produced on fan page under hover condition.
- .fan_box .full_widget define the complete fan page size you can increase or decrease the size of fan page from here.
- .fan_box .connect_top define the header of like box. We set background property to none, you can also change it to any color by adding suitable CSS color code.
- .fan_box .profileimage, .fan_box .name_block it define the profile image container and name of fan page container.
- .fan_box .connect_action it contain like button.
- .fan_box .connections specifies the box that contain FB fan connections and text that shows X people like profile name.
- span.total define a block that contain the total number of like.
The complete CSS property used by Facebook fan page can be seen from here.
More Amazing Stuff With Same Author
No comments:
Post a Comment