1

I have this code to create a Facebook Login Button in MVC:

<fb:login-button style="height:200px;" scope="public_profile,email,user_friends,user_about_me,user_likes" onlogin="checkLoginState();">
</fb:login-button>

It all works fine but I see the button with this style:

FBActualLogin

I want to see the button like this:

Facebook Login ButtonStyle

And I also want to change background color in the hover

How can I do it with CSS?

Bob Gilmore
  • 12,608
  • 13
  • 46
  • 53
roberto
  • 33
  • 1
  • 8
  • Changing the background color on hover is just applying a :hover pseudo class. Example `.button:hover { background-color: red; }` – Bon Macalindong May 27 '16 at 09:38
  • Hi Bon!Thanks for your reply.I know how to use css..i don't know how to modify an fb:login-button object to trasform it in my second image. – roberto May 27 '16 at 09:51
  • 1
    Looks like styling this button is not possible as it is creating an iframe behind the scenes. What you can do is create a button using html / css (not the facebook button) that will look like the one in your requirement. Then on click, call the facebook api to show the login page.You may refer to this [SO post](http://stackoverflow.com/questions/9810335/how-to-change-facebook-login-button-with-my-custom-image) – Bon Macalindong May 27 '16 at 10:06
  • Thanks it works fine. You are a great! – roberto May 27 '16 at 10:36

0 Answers0