Reply to css form elements

Your name:

Reply:


Posted by timothy.pollard on 09/01/06 13:30

Hi all

I've created a form where the form element and text styling is done by
css. I've also set an initial value in my html which clears when you
click in the box - so NAME appears in the form element where name goes,
but this clears as soon as you click in it. Everything is fine except I
want the initial value (NAME) to be in light grey but the text the user
types in once the initial value has cleared to be black (e.g. Tim
Pollard). I've seen this done on other sites, but can't figure out how
to do it.

Anybody know?

Here's my style css for the text boxes:

..blueform {

font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8px;
color: #96969A;
border: 1px solid #7882b8;
}

Here's a typical html form element:

<input name="EmlSubj" type="text" class="blueform" id="EmlSubj"
value="SUBJECT" size="36" ONFOCUS="clearDefault(this)">

Thanks in advance for any suggestions.

TP

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация