简体   繁体   中英

how to make Facebook like button's popup box to appear on the left

html to show like button:

<div class="fb-like" data-href="https://www.facebook.com/TheGloopal/?fref=ts" data-layout="button" data-action="like" data-show-faces="false" data-share="false" style='float:right;'></div>

在此处输入图片说明

BUt the popup when clicked on the fb like, appear on the right. But I want it to appear to the left as the button placed on the right.

在此处输入图片说明

I referred to this: Facebook send button flyout

and tried the following but doesn't work,

.fb_edge_widget_with_comment span.fb_edge_comment_widget {
   left: -45px !important;
}

its in the html button code:

<div class="fb-like" data-href="https://www.facebook.com/TheGloopal/?fref=ts" data-layout="button" data-action="like" data-show-faces="false" data-share="false" style='float:right;'></div>

you need to change where it says style='float:right;' to style='float:left;'

尝试这个:

<div class="fb-like" data-href="https://www.facebook.com/TheGloopal/?fref=ts" data-layout="button" data-action="like" data-show-faces="false" data-share="false" style='float:left;'></div>

This solves the matter. I added below in the css

.fb_iframe_widget iframe {
    position:absolute;
    right:0px;
    background:#fff; /* in your case you may want to add a white background */
    transition: all .5s; /* completely optional, but adding a transition makes for a nice effect */
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM