• Resolved fotske

    (@fotske)


    Hi,

    I use the “Add to any” plugin to have share buttons on some of my Pages or Portfolio items that are built with WPBakery Page Builder (Visual Composer).

    To integrate this with WPBakery Page Builder, I use a Text Box and I simply paste the [addtoany] shortcode into the Text Box.
    It works and the share buttons display on my website but they are aligned to the left in the text box by default.
    How can I do to center these buttons into the text box?
    There is a code here (https://www.addtoany.com/buttons/customize/wordpress/center_align_buttons) that I added to the “additional CSS code” of the plugin but it doesn’t work in the Text boxes of WPBakery Page Builder.

    Thank you very much in advance for your help.

    Best regards,

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author micropat

    (@micropat)

    Since you’re using the shortcode, use:

    .addtoany_shortcode { text-align: center; }

    If your theme has an issue with the previous line, try instead:

    .addtoany_shortcode { display: flex; justify-content: center; }

    Thread Starter fotske

    (@fotske)

    Hi @micropat,

    Thank you very much for your answer!

    Should I paste this code into the “additional CSS” of the Settings of the Add to any plugin or in the “additional CSS” field of my theme?

    Best regards,

    Plugin Author micropat

    (@micropat)

    Whichever you prefer.

    AddToAny’s “Additional CSS” box is a good place to paste. ??

    Thread Starter fotske

    (@fotske)

    Hi @micropat,

    Thank you very much for your answer.

    I have an additional question: I have read this in the latest plugin update: “If you have CSS code customizations referencing the universal button (.addtoany_share_save) or the standard share buttons container (.addtoany_share_save_container), those class names have been deprecated and will be removed in a future plugin update. The new class names are .addtoany_share and .addtoany_content respectively. Please update your custom CSS if you are referencing the deprecated class names.”

    Should I change something in the CSS codes that you gave me because of this update?

    I also have another additional CSS that I pasted in the plugin options which is:
    .addtoany_share_save_container { text-align:center; }

    Should I change it to:
    .addtoany_content { text-align:center; }

    Thank you very much for your help.

    Plugin Author micropat

    (@micropat)

    Should I change something in the CSS codes that you gave me because of this update?

    No.

    I also have another additional CSS that I pasted in the plugin options which is:
    .addtoany_share_save_container { text-align:center; }

    Should I change it to:
    .addtoany_content { text-align:center; }

    Yes!

    Thread Starter fotske

    (@fotske)

    Thank you very much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Center the Add to any buttons in a text box’ is closed to new replies.