For my website, I've been wanting to add a Facebook Follow button. I want it to look something like this:
Follow us on Facebook: [THE FOLLOW BUTTON]
Note that the <p> tag and the <div> tag of the button should be inline.
I'm using the following code:
<p>Follow us on Facebook:</p><div id="follow-button"></div>
When using the code, it's not rendering properly and the Follow button is always displayed below the <p> tag
You need to make both elements inline:
Your html:
<p> Follow us on Facebook: </p>
<div id="follow-button"> Button </div>
Your css:
p { display: inline; }
div { display: inline; }
(Note you can also set them to 'inline-block' if you want them to act like block elements)
Its because <div
> always take 100% width. Why don't you take <button>
in place of <div>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With