• Resolved kramer842

    (@duonger)


    Hello, great plugin. Thank you. I’m wondering if it’s possible just center the horizontal floating share buttons so that on mobile they’re not pushed all the way to the left. Also is there a way to have them disappear when scrolling up or allow them to collapse? Similar to ShareThis or AddThis? Thank you!

    https://wordpress.org/plugins/add-to-any/

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

    (@micropat)

    Yes, Settings > AddToAny > Additional CSS:

    .a2a_floating_style.a2a_default_style {
        left: 50% !important;
        margin-left: -100px !important;
    }

    That negative margin-left value of -100px should be the total width of your buttons. Generally, the total width can be calculated by multiplying the number of icons by 20. For example, 5 icons (multiplied by 20) gives a margin-left value of -100px.

    Also is there a way to have them disappear when scrolling up or allow them to collapse?

    You can show/hide on scroll with jQuery right now. This will come more easily as as option in a future plugin release.

    Thread Starter kramer842

    (@duonger)

    Hi micropat,
    Thank you for the help. The centering code worked fine. Regarding the show/hide using jquery do we need to just add the css and javascript in the sample or do we need to include the html? If so where does the html go? Thank you!

    Thread Starter kramer842

    (@duonger)

    Hi Micropat,
    To fit better with the design of our site, we needed to increase the size of the buttons to 44px and take out all the padding. Looks much better but your formula above removed the centering. with 44px buttons, no padding multiplied by 7 buttons we came up with 308. “-308” aligned the buttons to the left. We also need to take out any space on the buttom of the floating buttons as well. Thank you for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Center Just Floating Horizontal Share Buttons?’ is closed to new replies.