• I playing around with my websites test site and trying to get the facebook like button to align right. https://ata.staging.wpengine.com/

    I currently have a text widget in the header and inserted the facebook code. Does anyone have suggestions on how to get this to align right?

    Any help would be much appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,

    There is a problem with the way you have added the facebook like button on your website…
    In the source code, your have one HTML open tag and the BODY open tag, as usual in HTML pages, but more in the bottom of the code we can see that your Facebook like button DIV container in also included in asecondary HTML and BODY tags !
    https://www.monsterup.com/upload/1361646993274.png

    You can do an CSS rule override and make it to the right, but I suggest you to change the plugin/code you have used to implement your Facebook like button.

    Thread Starter austintenantadvisors

    (@austintenantadvisors)

    I just took the exact code Facebook gave me for the like button.

    Is there another or better way to get the code?

    Ok ok… Yes I said anything !
    It’s normal to have a second HTML and BODY when inserting an external embed code that contains an iframe.

    So, in your widget, you can add your facebook code in a DIV container that have a CSS rule to align right :

    <div style="float-right;">
    [Leave the facebook code here]
    </div>

    Regards

    Thread Starter austintenantadvisors

    (@austintenantadvisors)

    Thank You for your help on this. I just tried the code above and it didn’t seem to work. See below.

    <div style=”float-right;”>
    <iframe src=”//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.austintenantadvisors.com&send=false&layout=button_count&width=450&show_faces=false&font&colorscheme=light&action=like&height=21″ scrolling=”no” frameborder=”0″ style=”border:none; overflow:hidden; width:450px; height:21px;” allowTransparency=”true”></iframe>
    </div>

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You’ll need to some CSS to the table containing your facebook icons.
    Which theme are you using? Does that theme provide you with a section in the dashboard named, “Custom CSS”, “Jetpack” or “Custom Styles”, or are you using a Child Theme?

    Thread Starter austintenantadvisors

    (@austintenantadvisors)

    I’m using studio press responsive child theme

    Sorry sorry sorry !
    I made a mistake in the CSS rule. I typed ‘-‘ instead of ‘:’

    Try with this :

    <div style="float:right;">
    [Leave the facebook code here]
    </div>

    I tried in a HTML test file, and it’s working with :

    <div style=”float:right;”>
    <iframe src=”//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.austintenantadvisors.com&send=false&layout=button_count&width=450&show_faces=false&font&colorscheme=light&action=like&height=21″ scrolling=”no” frameborder=”0″ style=”border:none; overflow:hidden; width:450px; height:21px;” allowTransparency=”true”></iframe>
    </div>

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Please contact your theme’s vendors in future. These forums are not for supporting commercial themes.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Trying to get Facebook like button to align right’ is closed to new replies.