2

I have a problem with a form template I am working on, which has a default inline image.

<input src="//assets.emailmeform.com/images/submit-orange.png?RU1GLTAyLTI3" type="image" alt="Submit" onmouseover="return true;">

Is there any way of overriding this? I have

#ID input[alt="Submit"]{
    background-image: url("url here")no-repeat !important;

However the result was the CSS image that I assigned was under the default inline image. Is there a way to hide the inline image so that the CSS image will appear on top?

1
  • <input src="url" type="image" alt="Submit" onmouseover="return true;"> Here is the default inline code for the button. Commented Dec 3, 2015 at 9:22

1 Answer 1

1

Please take a look at this solution.

What I basically did there is that I had set the width and height of the image (picture of a sparrow) to 0 so that it would not show up anymore. And instead I had added a background image to replace it (picture of a parrot).

HTML

<input src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/House_Sparrow_mar08.jpg/1024px-House_Sparrow_mar08.jpg" alt="submit" type="image">

CSS

input{
  height: 0;
  width: 0;
  padding: 1000px 1000px;
  background-image: url("https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Ara_ararauna_Luc_Viatour.jpg/1024px-Ara_ararauna_Luc_Viatour.jpg");
  background-repeat: no-repeat;
}

Cheers,

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.