center facebook messenger boot

Asked

Viewed 74 times

0

I’m not getting to center the facebook button at all! If anyone can help me, I’d appreciate it!

Follows HTML of what I tried to do:

<div id="fb-root"></div>

<!-- Your customer chat code -->
<div style="margin-left: auto !important;
    margin-right: auto !important;
    width: 6em !important;" class="fb-customerchat"
  attribution=setup_tool
  page_id="283210402013309"
  theme_color="#0084ff"
  logged_in_greeting="Oi! Deixe sua mensagem!"
  logged_out_greeting="Oi! Deixe sua mensagem!"
  center_align="true">
</div>

Javascript:

<script>
  window.fbAsyncInit = function() {
    FB.init({
      xfbml            : true,
      version          : 'v3.3'
    });
  };

  (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 = 'https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js';
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Picture the way I want it to look: inserir a descrição da imagem aqui

  • But line up where? You want to line up the div <div id="fb-root"></div> horizontal in the center of the page? Or vertical in the middle of the page? More details

  • I would like you to go to the center of the page, but if possible. Center in the bottom left corner of the page.

  • Dude is hard to understand what you wrote... center on the left? is either in the left corner or is in the center of the page...

  • Sorry the way I explained it. I edited the post, I wanted it to stay that way the Whats button is.

  • Pq does not use positive Fixed?

  • position: Fixed; The button doesn’t even move. Just like I did above

Show 1 more comment

1 answer

-1

Try it this way

style="display: block !important; margin-left: auto !important; margin-right: auto !important; width: 6em !important;"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.