I've been having trouble trying to style a submit button. I'm trying to make it an image with a red/dark red gradient and border, with the words "Search" in the middle, then a small magnifying glass right after the words "Search". Easy enough... but it needs to be able to stretch in width as the window resizes without stretching the words/magnifying glass. It also needs to work on destkop, mobile and tablet. How would I go about doing this?
2 Answers
Comments
Define width of button in percent, that will work.
width: 70%; Use SVG image as background along with background-size: cover.
2 Comments
user2588317
But it will stretch the images
Aaks20
Couple of ideas, Use background-size: cover; not sure whether this will help entirely with the image in use, but the best solution to handle image responsiveness is to use an SVG image as background.