I have a button with a image as a background and I would like to resize the image size depending on screen resolution. For the images, I use width:100%, but in this case, if I use it for the button, the button size adjust to the screen resolution, but not the image it uses as a background. What can I do so the image resize the same way as the button?
<!DOCTYPE html>
<html>
<body>
<button class="dog"><img src="pictures/dog.png" ></button>
<style>
.dog {
position:absolute;
width:100%;
left:1%;
top:6%;
}
</style>
</body>
</html>