1

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?

0

2 Answers 2

1

Is this the effect you aiming for?

<img width="in %"> 

demo : http://jsfiddle.net/e2qpfakq/5/

Sign up to request clarification or add additional context in comments.

Comments

0

Define width of button in percent, that will work.

width: 70%; 

Use SVG image as background along with background-size: cover.

Example fiddle

2 Comments

But it will stretch the images
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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.