0

I can't add multiple button in 1 line although I tried many times.

This is my code:

<div class="fb-like" data-href="https://www.facebook.com/xxx" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div>

<div class="g-follow" data-annotation="none" data-height="24" data-href="//plus.google.com/u/0/105096562375742" data-rel="publisher"></div>

<a href="https://twitter.com/twittert" class="twitter-follow-button" data-show-count="false" data-lang="en" data-size="large">Follow @twitter</a>

Please help me ! Thank you !

1 Answers1

3

Div elements are always block level elements. This means that they will display on their own lines. To make them display as inline elements, you will need to set the css property display: inline; (or inline-block depending on the specific behavior you want) on the divs in question.

Sam Hanley
  • 4,707
  • 7
  • 35
  • 63
  • Can you tell more detail, please ? – user3614540 May 13 '14 at 16:17
  • I don't really know what more detail there is -- in your CSS, you need to apply `display: inline;` to each of the buttons. I'd do that by giving them all an extra class `button` and applying the rule to that class, but you could refer to them all by their classes or even IDs --`display` is the property you need to change. – Sam Hanley May 13 '14 at 16:19
  • Yes ! It worked. Can you tell me how to create spaces between buttons, please ? My buttons is sequential. Thanks ! – user3614540 May 13 '14 at 16:37
  • I would recommend using the `margin` or `padding` css properties to set the spacing in between. – Sam Hanley May 13 '14 at 16:39