Write your message below:
Could someone please tell me the correct way to add a list field, in a standard html a list field would look something like:
<select name="whatever" size="2" id="whatever">
<option>first choice</option>
<option>Second choice</option>
<option>Third choice</option>
</select>
This works but you cant change the colour of background of the text box.
So I assume I have this wrong.
Any help please.
List Field, the correct way please
Hello Raidersgue,
This is not the forum for that kind of questions.
For help on html and other web related languages i often use http://www.w3schools.com/
But here's my answer:
<form>
<select name="whatever" size="2" id="whatever">
<option value="1">first choice</option>
<option value="2">Second choice</option>
<option value="3">Third choice</option>
</select>
</form>
In words:
The select tag has to be inside a form.
The option tag has to be assigned a value.
For the background color use
Greetings,
Henrie
This is not the forum for that kind of questions.
For help on html and other web related languages i often use http://www.w3schools.com/
But here's my answer:
<form>
<select name="whatever" size="2" id="whatever">
<option value="1">first choice</option>
<option value="2">Second choice</option>
<option value="3">Third choice</option>
</select>
</form>
In words:
The select tag has to be inside a form.
The option tag has to be assigned a value.
For the background color use
Code: Select all
select {
background-color:red;
}
Henrie
-
- Posts: 18
- Joined: Thu Aug 17, 2006 9:30 pm