Log in

View Full Version : Automatic Form Control Colors?



Moshambi
10-22-2008, 05:18 AM
Hey,

So I added a style to my form controls:



input, textarea, select
{
background-color: black;
color: white;
border: 1px solid red;
}


Now the text boxes are being colored a light yellow for some reason. I am not sure why this is happening but here is my html code for the form just in case you might need to see it:



<form action='gdform.php' method='post'>
<div>

<p>
<input type="hidden" name="redirect" value="thankyou.htm" />
<label>Name:</label>
<input type='text' name='contactName' />
</p>
<p>
<label>Email:&nbsp;</label>
<input type='text' name='contactEmail' />

</p>
<p>
<label>Phone:</label>
( <input type='text' name='phone1' size='3' maxlength='3' /> )
<input type='text' name='phone2' size='3' maxlength='3' /> -
<input type='text' name='phone3' size='4' maxlength='4' />
</p>
<p>
<label>How did you hear about us?</label><br />

<textarea rows='6' cols='45' name='heard'></textarea>
</p>
</div>

rangana
10-22-2008, 06:31 AM
Do you have google toolbar installed? It appears to be the cause on IE.

To disable:

Go to Options
select More tab
uncheck Automatically highlight fields that AutoFill can fill


...or you can alternatively add highlighted:


input, textarea, select
{
background-color: black !IMPORTANT;
color: white;
border: 1px solid red;
}


Hope that helps.

Moshambi
10-22-2008, 06:41 AM
Awesome!

I did just install the Google Toolbar and that was the problem.

I didn't ever think of the !important idea. Works just how I want it now.

Thanks a bunch rangana :)