I am currently using images as button backgrounds, and I have programmed them to change when the button is clicked to give the impression that it is being pressed. However, I am looking to enhance the responsiveness of the page, so that the images also change size when the browser window is resized. I have tried a few methods but haven't been successful.
Here are the images in question:
https://i.sstatic.net/ws3zG.png
https://i.sstatic.net/Lu9mH.png
Is there a way to achieve this effect using CSS?
Although I have made an attempt at this, I encountered a new issue where the text does not shrink along with the background when the browser window is made smaller. Am I overlooking something?
#buttons {
font-family:arial;
text-align:center;
color:#b5a642;
}
#buttons ul {
list-style-type:none;
padding:0;
}
#buttons li a {
width:10%;
display:block;
background-color:#7B4A18;
color:#b5a642;
padding:10px;
box-shadow:0 -30px 50px #603913 inset;
border:5px solid #7B4A18;
text-shadow:0px 2px 4px #222, 0px 2px 4px #333;
}
#buttons li a:active {
background-color:603913;
box-shadow:0 -30px 50px #7B4A18 inset, 0 0 15px #222 inset;
border:5px solid #603913;
text-shadow:2px 2px 1px #706729;
}