What HTML/CSS would you use to create a text input with a background?

前端 未结 7 763
甜味超标
甜味超标 2021-02-03 10:28

I have a website design that includes text input fields that look like this:

Input Field http://img401.imageshack.us/img401/4453/picture1ts2.png

I\'m wondering w

7条回答
  •  佛祖请我去吃肉
    2021-02-03 10:36

    AFAIK, the background scrolling problem can be solved either in Firefox and friends, OR Internet Exploder; but not make everyone happy at once.

    I would normally have said to style the input directly, but now that I think of it that div example doesn't sound too bad and should take care of your background image scrolling problem.

    In that case you'd set a div as position:relative, and put the input inside it with proper padding and width (or 100% width if padding is 0), background transparent, and put an image on the div.

提交回复
热议问题