Right align Facebook like button

前端 未结 7 686
无人及你
无人及你 2020-12-29 23:56

I am able to put a Facebook like button on my website, but how do I make it to be right-aligned within the div/iframe it is in?

I tried app

相关标签:
7条回答
  • 2020-12-30 00:31

    Seems as though there are many ways to achieve this that work in different situations.

    None of the above seemed to make any difference to the position of my 'like' button, however a little trial and error with a "margin-left" tag and I got it in the right place.

    0 讨论(0)
  • 2020-12-30 00:32

    What is described in Embed Facebook Like button – Right align with CSS and settings works. However, in my website, I had to change the style to

    position:relative; right:-130px;
    
    0 讨论(0)
  • 2020-12-30 00:40

    Thanks for everyone's input. The position relative trick doesn't always do it for me:

    div.around-fb-like{
        position:relative;
        float:right;
    }
    

    So far this has been more dependable:

    #fb-root{
        position:absolute;
        left:-1000%;
    }
    
    0 讨论(0)
  • 2020-12-30 00:41

    iframe is an inline element, you can use

    text-align: right
    

    for a div that contains that iframe, or float the iframe to the right, but just make sure to clear the float afterwards.

    sample: http://jsfiddle.net/Mujj6/3/
    and: http://jsfiddle.net/Mujj6/5/

    0 讨论(0)
  • 2020-12-30 00:46

    With DIV it's easy:

    .fb-like{ vertical-align:top;}
    

    posted also on SimpleMediaCode.info ( http://e-art.lv/x/fbas )

    0 讨论(0)
  • 2020-12-30 00:49

    the 'like' social plug-in seems to have changed styles within the iframe. what's the best way to prevent the 'like' from flowing right, on the following page?

    [http://www.biographile.com/the-righteousness-and-ruin-of-science-on-this-week-in-history/16573/][1]

    0 讨论(0)
提交回复
热议问题