Reputation: 2649
I'm trying to get the div that contains the Facebook like and share button and the text inside displaying how many people liked it to be as wide as everything that's inside, but the width of the div is twice as wide as whatever is being displayed inside, even though I displayed it to inline-block.
.fb-like {
position: absolute;
border: 1px solid black;
display: inline-block;
bottom: -22px;
float: right;
}
<div class='fb-like' data-href='' data-layout='standard' data-action='like' data-show-faces='false' data-share='true'></div>
Upvotes: 0
Views: 87
Reputation: 135
Have you tried setting a fixed width
for your div
?
.fb-like {
position: absolute;
border: 1px solid black;
display: inline-block;
bottom: -22px;
float: right;
width: 100px; // added, change value to what you need it to be
}
Upvotes: 1