Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS Trick to stop facebook share/like button moving

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #170008
    Neil Ormsby
    Participant

    Please tell me why I cannot keep my FB share/like button in the centre of my webpage.

    On loading it has a tendency to move to the right or left, hardly ever staying centred.

    At the moment I have the code inside a separate div.

    The css is :
    .facebook{text-align:center;width:380px !important;padding:15px;margin:0 auto}

    #170009
    Paulie_D
    Member

    We’d have to see it in action.

    Could you make a Codepen.io example or provide a live link?

    MOD NOTE: Moved to CSS Combat

    #170102
    Neil Ormsby
    Participant

    Hi,
    You will find it here : neilormsby.com
    Regards. Neil

    #170119
    maxisix
    Participant

    Just change the width for something like 325px.

    #170143
    Paulie_D
    Member

    On loading it has a tendency to move to the right or left, hardly ever staying centred.

    I suspect that’s partly because it has to get some of it’s information via the <iframe> and the linked JS & CSS of that linked frame.

    Consequently, it’s loading pieces of the content, one after the other and the layout has to reset as the additional content is added.

    The same sort thing is kind of happening with the other social links as the JS fetches the data and loads in into the page.

    You might want to look into rationalisation of the various scripts controlling all that interaction but, unfortunately, that’s beyond my capabilities.

    #170162
    Neil Ormsby
    Participant

    Just changed it, I will see what happens.
    Thank you.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.