Click to See Complete Forum and Search --> : alignment of radio buttons


schmidty
10-31-2005, 01:54 PM
I wasn't sure if this should go here or in CSS but HTML seemed more appropriate.

When I print a form with radio buttons on it the veritcal alignment of the buttons and the text beside the buttons is totally off. I've tried a valign="" within the td tag holding the radio button and the text but that doesnt work (ive tried center, middle, top, and bottom).

Can anyone help me out??

TIA
---Ryan

tegraphix
10-31-2005, 04:19 PM
If you post your HTML/CSS, people will be able to help you.

schmidty
10-31-2005, 05:12 PM
<td class="required" width="25%" valign="middle">
<input type="radio" name="employeeGender" id="employeeGenderMale" value="male">&nbsp;
<label for=employeeGenderMale>Male</label>&nbsp;&nbsp;
<input type="radio" name="employeeGender" id="employeeGenderFemale" value="female">&nbsp;
<label for=employeeGenderFemale>Female</label>&nbsp;&nbsp;
</td>


that's my code for the cell with the radio buttons that wont line up

ray326
10-31-2005, 09:51 PM
So in print preview the radio button graphic is misaligned from the label text? It's always best to do presentation with CSS rather than attributes.

schmidty
11-01-2005, 08:21 AM
well, even when viewing in a web browser the buttons are misaligned. I'll try using CSS but I couldn't get it to work that way either....

ray326
11-01-2005, 04:07 PM
Again, is it a misalignment with a GUI widget and the associated label text or a misalignment between the two GUI widgets? What do you expect the alignment to be?

kelly23
11-01-2005, 05:41 PM
I've had pretty good results using css and the % of line-height attribute. For example:

<style type="text/css">
.rad_btn {vertical-align:-5%}
</style>

<input type="radio" class="rad_btn">


"Vertical-Align Property: Aligns the element in a % value of the 'line-height' property. Negative values are allowed"

Try playing with the percentage and see if it does what you want.