on-internet
← Community

How do I set a background image so that it appears as a single image anchored to the right? [duplicate]

Stack Overflow ·

I would like to have an <input> element that contains an image, anchored to the right. Since I cannot place elements inside an <input> tag, I believe the best approach is to use a specifically configured background. I would like to achieve a result like the one in the photo (The magnifying glass is the image I want to appear inside the <input> element) . I don't know if it might be useful, but here is the <input> style so far: .searchbar { width: 100%; height: 22.5px; padding: 1px 3px; box-sizing: border-box; color: rgb(66, 66, 66); font-family: 'Segoe UI'; background: linear-gradient(white, r

Comments

Sign in or sign up to comment and upvote.

No comments yet.