Usually, you make a button with a given size:
<button style="width: 120px; height: 40px;">
Mememe
<button>
Then you add a background which is the same size as the button:
button
{
background-size: 100% 100%;
}
Obviously, if you want it to be 1:1, the image should be 120×40 px too.
But is there a way to make the button same size as the image is? (With neither IMG elements nor scripts).
Regards,
No, not by using only HTML and CSS. It is, however, possible by using either PHP (or some other server-side scripting language) or JavaScript