HighDots Forums  

Graphic that shows through text box on a form

alt.html alt.html


Discuss Graphic that shows through text box on a form in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David Wright
 
Posts: n/a

Default Graphic that shows through text box on a form - 01-06-2006 , 08:07 AM






At http://www.itv.com/ they have a text box that forms part of a search
facility - but the text box has a visible graphic behind it.

When I put a text box in a form, it obliterates any graphics behind it.

I have not seen this on any other site - does anyone know how it's done?

D.



Reply With Quote
  #2  
Old   
Steve Pugh
 
Posts: n/a

Default Re: Graphic that shows through text box on a form - 01-06-2006 , 08:23 AM






David Wright wrote:
Quote:
At http://www.itv.com/ they have a text box that forms part of a search
facility - but the text box has a visible graphic behind it.

When I put a text box in a form, it obliterates any graphics behind it.

I have not seen this on any other site - does anyone know how it's done?
A background image can be applied to an input box just the same as it
can be applied to any other element, via the CSS background-image
property.

You can also make a parent element's background show through by setting
the background property to transparent.

Simple demo: http://steve.pugh.net/test/test101.html

Be careful when setting backgrounds on form elements as anything that
makes it even slightly more difficult for the user to see what they're
typing is any obvious problem.

I can't be bothered to dig into the code of the ITV site, they write
the serch form into the page with JavaScript which shows just how
clueless they are.

Steve



Reply With Quote
  #3  
Old   
David Wright
 
Posts: n/a

Default Re: Graphic that shows through text box on a form - 01-06-2006 , 08:40 AM



Just the job - many thanks.

D.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.