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
  • #39171

    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.

    Please and THANKS!


    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.



    I think its good to learn new things from here.


    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.