Jump to content

Text Color In Form


kirbyweb

Recommended Posts

OK I have created a bunch of stuff on my website, but out of all things, I am stuck at how to change the text color in a form.I know this is a noob question but can anyone help?Here is my code:

<form action='______' method='POST'>Username: <input type='text' name='username'><br>Password: <input type='password' name='password'><br><input type='submit' value='Log in'></form> <p><a href='register.php'>Register?</a>

Thanks.

Link to comment
Share on other sites

If you want to change the text "Username" to a different color, either change the style of the form or wrap the text in <span> tags.Changing the form will change all of the text in that form.Using <span> tags will change just the part inside the tags:<span style='color: blue;'>Username</span><input ...

Link to comment
Share on other sites

I copied and pasted your code and it works fine in both FF and IE. I'm not sure why it wouldn't work for you

Also around the inputs how do I make it black?
You mean the border? That would be:<input type='text' style='border-color: black;' />Just thought of something. Try using hex values instead:Black would be: style='border-color: #000000;'Blue would be: style='border-color: #0000FF;'See if that works.
Link to comment
Share on other sites

Well for starter's you're going to want to clean up your code. This is really old style coding.The <title> tag should be inside the <head> and you should declare a !DOCTYPE.Also you have a duplicated section in your code:<OPTION VALUE="url">Warlords Heroes</SELECT><DIV></FORM></SELECT><DIV></FORM><br><br><br><form action='login.php' method='POST'>The extra:</SELECT><DIV></FORM>might be throwing your document out of whack, not sure.Aside from that, I copied your code to a new document and tried it in Firefox 3.5 and in IE 8. Both browsers colored the username, so if it's still not working, I'm at a loss.Sorry I couldn't be of more help.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...