0
How to make button adapt to background image size?
Hello guys! I want to set a background-image for a button, but it doesn`t fit the size of a button itself. Of course, I can just set height and width for button itself, but this will not be useful if there will be many elements with images as background. Now my code looks like this: #a { min-width: 100px; min-height: 100px; background-size: cover; background-image: url(); } This code shows only part of my image, and that is why I am here, waiting for your advice:) Thanks a lot!
2 Respuestas
+ 1
This will help you:
https://code.sololearn.com/W0zH3IDDAEPP/?ref=app
+ 1
Thank you!
This worked, but vice verca. It made the backhround image adapt to the button size, while I need button to adapt to different images. Maybe there are some other solutions?