View Full Version : form text color help

11-25-2008, 11:00 PM
I have a form. I specify white text, but it does not work

<title>Our Location</title>
<body bgcolor="black">
<EMBED src="nav_bar.swf" width="750" height="100">
<link rel="stylesheet" type="text/css" href="style.css">
<div id="content">
<font face="Arial" size="3" color="white">
<table border="0" cellspacing="3" cellpadding="3">
<form method="post" action="./mail.php">
<font face="Arial" size="3" color="white">
<tr><td>Name: </td><td><input type="text" name="name"></td></tr>
<tr><td>Phone number: </td><td><input type="text" name="phone"></td></tr>
<tr><td>Model Year: </td><td><input type="text" name="year"></td></tr>
<tr><td>Make: </td><td><input type="text" name="make"></td></tr>
<tr><td>Model: </td><td><input type="text" name="model"></td></tr>
<tr><td>E-mail: </td><td><input type="text" name="email"></td></tr>
<tr><td>Date (dd/mm): </td><td><input type="text" name="date"></td></tr>
<tr><td colspan="2" align="right"><input type="submit" name="submit" value="Schedule"></td</tr>

11-25-2008, 11:11 PM
It's better practice to set colors and other style related things in CSS. The font tag you're using is deprecated, so it won't work in future versions of HTML.

Try putting this in your css file:

#content {

That should set all your text inside that div to white. If this doesn't work, there could be something in your CSS file that is overwriting your font color. (For example, this code would overwrite it by setting the text inside the form inside the div to black:

#content form {

Post your css if you still have trouble.

11-26-2008, 12:02 AM
Thanks it worked! (sorry for the late reply, the DSL fiber-optic cables needed repairs)