I have 2 small problems with my form that I can't seem to sort out and don't know if it can be done
The first problem is to do with a drop down list. At the moment the border is the standard blue colour and I would like to change it to mathc the rest of the form. How do I do this?
The second thing is this:
I have labels to the left of my input fields so if the user clicks on the label, the cursor moves into the text box. In the label I have some text which I have got to line up centrally so it looks nice.
Next to my drop down list I have a second label (with input box) which text does not line up correctly. The text is postioned at the bottom of the label. I would like it to match.
Also there is a similar problem with the labels next to the radio buttons (I have used the same class)
Here is the
CSS
This
css lines up all the label text centered vertically
- Code: Select all
.label1 {
width: 30%;
float: left;
margin-right:0.5em;
padding-top:0.2em;
text-align: right;
display: block;
}
This
css is for the other labels which doesn't center the text vertically
- Code: Select all
.label2 {
width: 10%;
margin-right:0.5em;
padding-top:0.2em;
text-align: right;
}
Here is the
HTML
- Code: Select all
<label class="label1" for="title">Title:</label>
<select name="title" tabindex="1" id="title">
<option value=" "> </option>
<option value="Mr">Mr</option>
<option value="Mrs">Mrs</option>
<option value="Miss">Miss</option>
<option value="Ms">Ms</option>
<option value="Dr">Dr</option>
<option value="Rev">Rev</option>
<option value="Cllr">Cllr</option>
</select>
<label class="label2">Other:</label><input type="text" name="other" id="other" size="8" tabindex="2" />
<label class="label1"> </label>
<input type="radio" name="contact" id="R1"><label for="R1" class="label2">Email</label>
<input type="radio" name="contact" id="R2"><label for="R2" class="label2">Letter</label>
<input type="radio" name="contact" id="R3"><label for="R3" class="label2">Telephone</label>
<input type="radio" name="contact" id="R4"><label for="R4" class="label2">Not Required</label>