[Home]Color of input fields

HomePage | RecentChanges | Preferences | Newbie Help

Category HTML Forms -:- [Category JavaScript FAQ]? -:- Category CSS FAQ

Martin Honnen (On Wed, 23 May 2001 13:10:03 on alt.html) says:

<form name="formName">
<input type="text" name="fieldName">
<input type="button" value="green"
       onclick="if (this.form.fieldName.style)
                  this.form.fieldName.style.backgroundColor = 'green';">
</form>


Add a border with inline CSS -- <input type="text" style="border-width:1px; border-style: solid; border-color: red">
The Matthias Gutfeldt Color Your Forms page -- http://gutfeldt.ch/matthias/articles/styleforms/index.html
Try using CSS

<input type="text" style="background-color: green; border: 1px solid red; color: white;">

You could even change the height, width, font size, and other things with CSS.


Comments --
HomePage | RecentChanges | Preferences | Newbie Help
This page is read-only | View other revisions
Last edited January 9, 2002 7:47 am (diff)
Search:

This FAQ is happily hosted by Betadome Digital Media