Help - Search - Members - Calendar
Full Version: Shading within Forms text field
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
SteveD
I'm creating an HTML form and when using a text input field I would like the box (where you type) to be shaded. I've seen this before to indicate a required field. How do I make that happen?

<input type="text" size="20" name="misc" value="">

Thx
pandy
Shaded? Do you mean you want it to have a different background color?
http://htmlhelp.com/reference/css/color-ba...background.html

CSS
CODE

.req   { background: #fff8dc; color: #000 }


HTML
HTML
<input class="req" value="This field is required">
<input class="req" value="This field is required">
<input value="This is not">
SteveD
Yes, I meant the background color changed. Thanks, I'll give this a try.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.