faqts : Computers : Internet : Web : CSS : Styling FORM Elements

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

23 of 31 people (74%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

How can i make my textfields blue and other input elements (buttons, checkboxes etc) green

Oct 10th, 2001 08:32
Ben Gordon, nikhil b, jsWalter,


You could accomplish this by adding a style sheet to the head section of 
your document something like (or by creating an external style sheet if 
you want to use these on more than 1 page)
<style>
.blue {background-color: blue;}
.green {background-color: green;}
</style>
then in your code you would add class="blue" or class="green" to the 
tags that you want to change
<input type="text" class="blue">
<input type="radio" class="green">
<input type="button" value="a button to nowhere" class="green">
you need to be aware however that these changes will not be seen by NS 
4.xx users and there is no cross compatible way that I know of