Forums

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

Home Forums CSS Center one element between two floating elements

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #39171
    Chasew
    Participant

    Or don’t float them… I don’t know…

    This is specifically what I’m trying work with. I want all three on one line. Twitter left, FB right.

    https://css-tricks.com/snippets/javascript/async-sharing-buttons-g-facebook-twitter/

    Please and THANKS!

    #107220
    Paulie_D
    Moderator

    Basically the important part is that the centred div come after the left and right divs in the markup. Check out this example, it uses margin-left: auto and margin-right: auto on the centered div, which causes it to be centred.

    Here: http://codepen.io/Paulie-D/pen/BuJaI

    #107223

    I think its good to learn new things from here.

    #107266
    Chasew
    Participant

    Perfect! Come to think of it, I think I had noticed that while scouring Google for a few examples, but it’s importance was never pointed out so I guess I never tried it.

    Thanks for the help!

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