I am trying to align a FB share button to the right in a box. The problem is the counter on the right side of the button, which makes the button wider with each character, so I can't set a proper width.
- Removing the width values from the
iframe
does not help. width: auto;
does not help.width: 135px;
fits nice IF the counter is 3 digits long, but leaves a margin if it's shorter.
.share {
display: inline-block;
float: right;
text-align: right;
width: 135px;
height: 34px;
overflow: visible;
}
<footer>
<iframe class='share' src='https://www.facebook.com/plugins/share_button.php?href=SOME_URL&layout=button_count&size=large&width=110&height=28' width='110' height='28' frameborder='0'></iframe>
</footer>