Results 1 to 3 of 3

Thread: Automatic Form Control Colors?

  1. #1
    Join Date
    Nov 2007
    Location
    USA
    Posts
    170
    Thanks
    8
    Thanked 22 Times in 22 Posts

    Default Automatic Form Control Colors?

    Hey,

    So I added a style to my form controls:

    Code:
    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:

    Code:
    <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>
    What is obvious to you might not be to another.


    My Site

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Do you have google toolbar installed? It appears to be the cause on IE.

    To disable:
    1. Go to Options
    2. select More tab
    3. uncheck Automatically highlight fields that AutoFill can fill


    ...or you can alternatively add highlighted:
    Code:
    input, textarea, select
    {
    	background-color: black !IMPORTANT;
    	color: white;
    	border: 1px solid red;
    }
    Hope that helps.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. The Following User Says Thank You to rangana For This Useful Post:

    Moshambi (10-22-2008)

  4. #3
    Join Date
    Nov 2007
    Location
    USA
    Posts
    170
    Thanks
    8
    Thanked 22 Times in 22 Posts

    Default

    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
    What is obvious to you might not be to another.


    My Site

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •