grabenair Posted June 11, 2011 Report Share Posted June 11, 2011 (edited) The link http://www.robertswebdesigns.com/contact_me.htm My problem is I want the input boxes to change color when clicked on. I wrote input.text:focus, textarea:focus { background:#191919; color:#FF0; } The textarea:focus works and the the text:focus does not. The form <div id="frmContent"> <form action="http://www.robertbonnerswebdesigns.com/cgi-sys/formmail.pl" method="post"name="hgmailer"> <p> <input type="hidden" name="recipient" value="robert@robertbonnerswebdesigns.com" /> <input type="hidden" name="subject" value="FormMail E-Mail" /> </p> <p> Your Name:<br /> <input name="name" type="text" onClick="MM_effectHighlight(this, 1000, '#ffffff', '#ff0000', '#ffffff', false)" value="" size="30" /> </p> <p><br /> Your E-Mail:<br /> <input type="text" name="email" size="30" value="" /> </p> <p><br /> Message:<br /> <textarea name="comment" cols="50" rows="5"></textarea> <br /><br /> <input type="button" value="E-Mail Me!" onClick="hgsubmit();" /> <input type="hidden" name="redirect" value="http://www.robertbonnerswebdesigns.com" /> </p> </form> </div> Edited June 11, 2011 by grabenair Quote Link to comment Share on other sites More sharing options...
falkencreative Posted June 11, 2011 Report Share Posted June 11, 2011 "input.text:focus" refers to an input with a class of text that has been focused on. You can use "input[type=text]:focus", which selects inputs with a type of text that have been focused on, but that uses CSS3 and it isn't fully supported across all browsers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.