By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,882 Members | 2,482 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,882 IT Pros & Developers. It's quick & easy.

Is there a way to change the color of the text fields in html?

P: n/a
Hi All,
Recently went through the site www.google.com/adsense
Was really surprised to see how the color of the text fileds and button
on the right frame ,which is used for login ,changed from 'plain' to
'yellow'.
Can anyone please let me know,how this is done.Is it something simple
attribute recommended by W3C,or is it just another googled technology.

Thanks in advance.
-Pradeep

Mar 9 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
pr************@gmail.com wrote:
Recently went through the site www.google.com/adsense
Was really surprised to see how the color of the text fileds and button
on the right frame ,which is used for login ,changed from 'plain' to
'yellow'.
Can anyone please let me know,how this is done.Is it something simple
attribute recommended by W3C,or is it just another googled technology.


Inputs can be styled (more or less) the same as all other elements.
input {background-color: yellow;}

Add additional selectors (class, id, etc.) to limit the effect to just
some inputs.

Google are quite fond of yellow. Users of the Google Toolbar find that
fields that said toolbar can auto-populate are coloured yellow.

Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Mar 9 '06 #2

P: n/a
pr************@gmail.com wrote:
Hi All,
Recently went through the site www.google.com/adsense
Was really surprised to see how the color of the text fileds and button
on the right frame ,which is used for login ,changed from 'plain' to
'yellow'.
Can anyone please let me know,how this is done.Is it something simple
attribute recommended by W3C,or is it just another googled technology.

Thanks in advance.
-Pradeep


If you mean that, when you put your cursor over an area, the background
or text changes color, this is done with style-sheets. I have setup my
Web pages to have a yellow background when a visitor puts the cursor
over a link.
a:hover { background-color: #ffa }
This means that, when the cursor hovers over an anchor, the background
color changes to yellow.

Note: This is a CSS2.1 feature. Browsers supporting only CSS1 might
not show the color change.

--

David E. Ross
<http://www.rossde.com/>

Concerned about someone (e.g., Pres. Bush) snooping
into your E-mail? Use PGP.
See my <http://www.rossde.com/PGP/>
Mar 10 '06 #3

P: n/a
Gazing into my crystal ball I observed Steve Pugh <st***@pugh.net> writing
in news:lj********************************@4ax.com:
Google are quite fond of yellow. Users of the Google Toolbar find that
fields that said toolbar can auto-populate are coloured yellow.


Yes, and that cannot be overwritten, which is a PITA. For example, in
forms I do, if there is a missing field, I use pink background for that
input id. Google overrides this, but no biggy, the label text is strong
and red. See <http://www.intraproducts.com/usenet/requiredform.asp> for an
example.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Mar 10 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.