0

I'm trying to insert text on input image like below image

enter image description here

i.e. I have

<input id="faq" type=image" src="img_path"/>

and I want to put text on it using CSS. (also I should do handle the position of text)

Is there any way to do it?

2
  • 1
    This link might help link Commented May 16, 2017 at 1:11
  • @KaoriYui thank you for comment. Im referencing it Commented May 16, 2017 at 1:22

1 Answer 1

2

.container {
  position: relative; 
}

.text {
  position: absolute; 
  font-size: 12px;
  left: 10px;
  top: calc(50% - 9px); 
  color: red;
}
<div class="container">
  	<div class="text">FAQ</div>
  	<input class="imgInput" id="faq" type="image" src="https://i.sstatic.net/I5t4o.gif">
</div>

This is one way to do it. This may not be exactly what you are looking for but this is one way to do it.

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.