line between radio button in css - html

I've made radio button like this :
and I want to draw line between my radio button in css like this :
I made my form look like this with table tag.
<table>
<tbody>
<tr>
<td>
<label for="answer_1">1</label>
</td>
<td>
<label for="answer_2">2</label>
</td>
<td>
<label for="answer_3">3</label>
</td>
<td>
<label for="answer_4">4</label>
</td>
<td>
<label for="answer_5">5</label>
</td>
</tr>
<tr>
<td>
<input name="answer" id="answer_1" type="radio">
</td>
<td>
<input name="answer" id="answer_2" type="radio">
</td>
<td>
<input name="answer" id="answer_3" type="radio">
</td>
<td>
<input name="answer" id="answer_4" type="radio">
</td>
<td>
<input name="answer" id="answer_5" type="radio">
</td>
</tr>
</tbody>
</table>
You can see the result here :
https://jsfiddle.net/zpejzpw5/
How can I draw line between my radio button?

Using the :after pseudo element, you should be able to achieve this:
td input {
position: relative;
}
td input:after {
display: block;
content: " ";
position: absolute;
bottom: 6px;
background: #000;
height: 2px;
width: 100%;
right: -12px;
}
td:last-child input:after {
display: none;
}
<table>
<tbody>
<tr>
<td>
<label for="answer_1">1</label>
</td>
<td>
<label for="answer_2">2</label>
</td>
<td>
<label for="answer_3">3</label>
</td>
<td>
<label for="answer_4">4</label>
</td>
<td>
<label for="answer_5">5</label>
</td>
</tr>
<tr>
<td>
<input name="answer" id="answer_1" type="radio">
</td>
<td>
<input name="answer" id="answer_2" type="radio">
</td>
<td>
<input name="answer" id="answer_3" type="radio">
</td>
<td>
<input name="answer" id="answer_4" type="radio">
</td>
<td>
<input name="answer" id="answer_5" type="radio">
</td>
</tr>
</tbody>
</table>

Use this code
td {
text-align: center
}
.line td {
position: relative;
}
.line td:after {
content: '';
border-bottom: 1px solid #ccc;
width: 100%;
height: 1px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(0, -100%);
z-index: -1;
}
.line td:last-child:after {
display: none;
}
}
<span id="reponses">
<table>
<tbody>
<tr>
<td>
<label for="answer_1">1</label>
</td>
<td>
<label for="answer_2">2</label>
</td>
<td>
<label for="answer_3">3</label>
</td>
<td>
<label for="answer_4">4</label>
</td>
<td>
<label for="answer_5">5</label>
</td>
</tr>
<tr class="line">
<td>
<input name="answer" id="answer_1" type="radio">
</td>
<td>
<input name="answer" id="answer_2" type="radio">
</td>
<td>
<input name="answer" id="answer_3" type="radio">
</td>
<td>
<input name="answer" id="answer_4" type="radio">
</td>
<td>
<input name="answer" id="answer_5" type="radio">
</td>
</tr>
</tbody>
</table>
</span>

Related

List radio buttons beneath eachother inside a Table

I'm trying to get a list of radio buttons listed below eachother inside a
table data. Is this possible? Here is my current code
<table>
<tr>
<td> Voornaam </td>
<td> <input type="text" class="profiel_inp"> </td>
<td> Studentennr </td>
<td> <input type="text" class="profiel_inp"> </td>
</tr>
<tr>
<td> Achternaam </td>
<td> <input type="text" class="profiel_inp"> </td>
<td> Klas </td>
<td> <select class="selectinp">
<option value="volvo">V1L</option>
<option value="saab">V1C</option>
<option value="mercedes">V1E</option>
<option value="audi">V1F</option>
</select>
</td>
</tr>
<tr>
<td> Adres </td>
<td > <input type="text" class="profiel_inp size2"> </td>
<td> Studierichting </td>
<td > SNE <input type="radio" class="profiel_inp" name="Studierichting"> </td>
<td > BIM <input type="radio" class="profiel_inp" name="Studierichting"> </td>
<td > SIE <input type="radio" class="profiel_inp" name="Studierichting"> </td>
<td > SNE <input type="radio" class="profiel_inp" name="Studierichting"> </td>
</tr>
<tr>
<td> E-mail </td>
<td> <input type="text" class="profiel_inp"> </td>
</tr>
<tr>
<td> Telefoonnr </td>
<td> <input type="text" class="profiel_inp"> </td>
</tr>
<tr>
<td> Geslacht </td>
<td> Man<input type="radio" name="geslacht" class="profiel_inp">
Vrouw<input type="radio" name="geslacht" class="profiel_inp"> </td>
</tr>
<tr>
<td> Geboortedatum </td>
<td> <input type="date" class="profiel_inp"> </td>
</tr>
</table>
with the CSS :
table {
width:100%;
margin-top:25px;
margin-bottom:25px;
}
input[type="text"], input[type="date"], .selectinp {
min-height:30px;
border:1px solid black;
padding:5px;
width:75%;
}
table tr {
padding-bottom:5px;
}
.size2 {
min-height:60px!important;
}
So ive got a table with a left and right side. Now on the left side is pretty basic but the right side has to contain a list of 4 radio buttons listed beneath eachother!
You could add them to a fieldset and wrap them in labels. Then in css set label display to block.
html
<td name="Studierichting">
<fieldset>
<label><input type="radio" class="profiel_inp" name="Studierichting">SNE</label>
<label><input type="radio" class="profiel_inp" name="Studierichting">BIM</label>
<label><input type="radio" class="profiel_inp" name="Studierichting">SIE</label>
<label><input type="radio" class="profiel_inp" name="Studierichting">SNE</label>
</fieldset>
css
label {
display:block;
}

Table Design Css

I am very new to Bootstrap css, can any one help me to design table header like this, column is seperated by pipe like css
Below is css .
<style>
.table-bordered tbody tr td {
border: none !important;
}
.table-bordered tbody tr td input.form-control[type=text] {
border-radius: 0px !important;
}
#input_container {
position: relative;
direction: rtl;
}
#input_img {
position: absolute;
bottom: 4px;
right: 5px;
width: 24px;
height: 24px;
}
Here i have used "table table-bordered" class for table and using above css i have removed td border lines
<div class="container">
<table class="table table-bordered">
<thead>
<tr>
<th>Product Name</th>
<th>Color/Size</th>
<th>Qty. Needed</th>
<th>Need By Date</th>
<th>Special Instructions</th>
<th>Art Files</th>
</tr>
</thead>
<tbody>
<tr>
<td><input class="form-control" id="Text1" type="text" /></td>
<td>
<div id="input_container">
<input class="form-control" type="text" id="input" value="">
<img src="~/Images/calendarImg.png" id="input_img">
</div>
</td>
<td><input class="form-control" id="Text1" type="text" /></td>
<td>
<input class="form-control" type="text" />
</td>
<td><input class="form-control" id="Text1" type="text" /></td>
<td><input class="form-control" id="Text1" type="text" /></td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="6"><a>Add Rows</a></td>
</tr>
</tfoot>
</table>
I have created a demo for you. Take help and modify as per your requirement.
<table frame="box" rules="none" cellpadding="2" cellspasing="5"> <tr style="background-color:yellow; ">
<td colspan="4">
<table style="width:100%">
<tr>
<td style="width:25%;border-right: thin solid #000;">First</td>
<td style="width:25%;text-align:center; border-right: 1px solid #000;">Second</td>
<td style="width:25%;text-align:center;border-right: 1px solid #000;">Third</td>
<td style="width:25%;text-align:center;">Fourth</td>
</tr>
</table>
</td> </tr> <tr>
<tr>
<td>
<input type="text">
</td>
<td>
<input type="text">
</td>
<td>
<input type="text">
</td>
<td>
<input type="text">
</td>
</tr>
<tr>
<td>
<input type="text">
</td>
<td>
<input type="text">
</td>
<td>
<input type="text">
</td>
<td>
<input type="text">
</td>
</tr>
<tr>
<td>
<input type="text">
</td>
<td>
<input type="text">
</td>
<td>
<input type="text">
</td>
<td>
<input type="text">
</td>
</tr> </tr> </table>
click here to see it in fiddle

Table Column width won't change

I have a table 900px wide with 13 columns. The problem I'm having is that my first column Tap won't change regardless of the width I give it. I want to make the first column smaller so that my last column doesn't look as squished.
This is what my table looks like:
I've even tried adding a style="width: 40px;" to my first column but it doesn't affect it.
.print_ttr {
width: 900px;
border: solid 1px;
border-collapse: collapse;
}
.print_ttr th {
border-color: black;
font-size: 12px;
border: solid 1px;
border-collapse: collapse;
margin: 0;
padding: 0;
}
.print_ttr td {
border-color: black;
font-size: 12px;
border: solid 1px;
border-collapse: collapse;
margin: 0;
padding: 0;
text-align: center;
}
.print_tableInputBox {
width: 100%;
height: 100%;
border: none;
display: inline-block;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
color: black;
text-align: center;
margin: 0;
padding: 0;
border-collapse: collapse;
}
.holder{
width: 100%;
height: auto;
margin: 0 auto;
}
.section{
width: 100%;
margin-bottom: 15px;
}
<div class="section">
<div class="holder">
<table class="print_ttr">
<tbody>
<tr>
<th style="width: 30px;">Tap</th>
<th>Primary Voltage</th>
<th>Secondary Voltage</th>
<th>Calculated Ratio</th>
<th>Phase A Ratio</th>
<th>Phase A Excitation[mA]</th>
<th>Phase A Deviation %</th>
<th>Phase B Ratio</th>
<th>Phase B Excitation[mA]</th>
<th>Phase B Deviation %</th>
<th>Phase C Ratio</th>
<th>Phase C Excitation[mA]</th>
<th>Phase C Deviation %</th>
</tr>
<tr>
<td>
<input type="text" class="print_tableInputBox" name="ttr_0_334_7556" value="1">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_1_334_7556" value="28980">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_2_334_7556" value="600">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_3_334_7556" value="48.3000">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_4_334_7556" value="48.1370">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_5_334_7556" value="1.542">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_6_334_7556" value="0.338">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_7_334_7556" value="48.1380">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_8_334_7556" value="2.493">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_9_334_7556" value="0.338">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_10_334_7556" value="48.3220">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_11_334_7556" value="2.398">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_12_334_7556" value="0.045">
</td>
</tr>
<tr>
<td>
<input type="text" class="print_tableInputBox" name="ttr_0_335_7556" value="2">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_1_335_7556" value="28290">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_2_335_7556" value="600">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_3_335_7556" value="47.1500">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_4_335_7556" value="47.2070">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_5_335_7556" value="1.598">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_6_335_7556" value="0.120">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_7_335_7556" value="47.2110">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_8_335_7556" value="2.594">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_9_335_7556" value="0.122">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_10_335_7556" value="47.2250">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_11_335_7556" value="2.525">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_12_335_7556" value="0.159">
</td>
</tr>
<tr>
<td>
<input type="text" class="print_tableInputBox" name="ttr_0_336_7556" value="3">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_1_336_7556" value="27600">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_2_336_7556" value="600">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_3_336_7556" value="46.0000">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_4_336_7556" value="46.0070">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_5_336_7556" value="1.689">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_6_336_7556" value="0.010">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_7_336_7556" value="46.0070">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_8_336_7556" value="2.704">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_9_336_7556" value="0.010">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_10_336_7556" value="46.0160">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_11_336_7556" value="2.601">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_12_336_7556" value="0.010">
</td>
</tr>
<tr>
<td>
<input type="text" class="print_tableInputBox" name="ttr_0_337_7556" value="4">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_1_337_7556" value="26910">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_2_337_7556" value="600">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_3_337_7556" value="44.8500">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_4_337_7556" value="44.9060">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_5_337_7556" value="1.773">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_6_337_7556" value="0.124">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_7_337_7556" value="44.9080">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_8_337_7556" value="2.830">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_9_337_7556" value="0.124">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_10_337_7556" value="44.9160">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_11_337_7556" value="2.736">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_12_337_7556" value="0.147">
</td>
</tr>
<tr>
<td>
<input type="text" class="print_tableInputBox" name="ttr_0_338_7556" value="5">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_1_338_7556" value="26220">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_2_338_7556" value="600">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_3_338_7556" value="43.7000">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_4_338_7556" value="43.7160">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_5_338_7556" value="1.857">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_6_338_7556" value="0.036">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_7_338_7556" value="43.7090">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_8_338_7556" value="2.970">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_9_338_7556" value="0.020">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_10_338_7556" value="43.7130">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_11_338_7556" value="2.874">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_12_338_7556" value="0.029">
</td>
</tr>
</tbody>
</table>
</div>
</div>
After inserting your code into JS Bin here, this is what it came out as:
Even after adding your container div:
You can try adding this to your code:
.print_ttr th:first-child{
border-color: black;
font-size: 12px;
border: solid 1px;
border-collapse: collapse;
margin: 0;
padding: 0;
width: 30px;
}
I don't know what is going on, but I am pretty sure this is what you were looking for. I am using Google Chrome. Even after inserting your code into a code snippet it still comes out that way. Look here:
.print_ttr {
width: 900px;
border: solid 1px;
border-collapse: collapse;
}
.print_ttr th {
border-color: black;
font-size: 12px;
border: solid 1px;
border-collapse: collapse;
margin: 0;
padding: 0;
}
.print_ttr td {
border-color: black;
font-size: 12px;
border: solid 1px;
border-collapse: collapse;
margin: 0;
padding: 0;
text-align: center;
}
.print_tableInputBox {
width: 100%;
height: 100%;
border: none;
display: inline-block;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
color: black;
text-align: center;
margin: 0;
padding: 0;
border-collapse: collapse;
}
<table class="print_ttr">
<tbody>
<tr>
<th style="width: 30px;">Tap</th>
<th>Primary Voltage</th>
<th>Secondary Voltage</th>
<th>Calculated Ratio</th>
<th>Phase A Ratio</th>
<th>Phase A Excitation[mA]</th>
<th>Phase A Deviation %</th>
<th>Phase B Ratio</th>
<th>Phase B Excitation[mA]</th>
<th>Phase B Deviation %</th>
<th>Phase C Ratio</th>
<th>Phase C Excitation[mA]</th>
<th>Phase C Deviation %</th>
</tr>
<tr>
<td>
<input type="text" class="print_tableInputBox" name="ttr_0_334_7556" value="1">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_1_334_7556" value="28980">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_2_334_7556" value="600">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_3_334_7556" value="48.3000">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_4_334_7556" value="48.1370">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_5_334_7556" value="1.542">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_6_334_7556" value="0.338">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_7_334_7556" value="48.1380">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_8_334_7556" value="2.493">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_9_334_7556" value="0.338">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_10_334_7556" value="48.3220">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_11_334_7556" value="2.398">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_12_334_7556" value="0.045">
</td>
</tr>
<tr>
<td>
<input type="text" class="print_tableInputBox" name="ttr_0_335_7556" value="2">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_1_335_7556" value="28290">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_2_335_7556" value="600">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_3_335_7556" value="47.1500">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_4_335_7556" value="47.2070">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_5_335_7556" value="1.598">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_6_335_7556" value="0.120">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_7_335_7556" value="47.2110">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_8_335_7556" value="2.594">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_9_335_7556" value="0.122">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_10_335_7556" value="47.2250">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_11_335_7556" value="2.525">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_12_335_7556" value="0.159">
</td>
</tr>
<tr>
<td>
<input type="text" class="print_tableInputBox" name="ttr_0_336_7556" value="3">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_1_336_7556" value="27600">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_2_336_7556" value="600">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_3_336_7556" value="46.0000">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_4_336_7556" value="46.0070">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_5_336_7556" value="1.689">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_6_336_7556" value="0.010">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_7_336_7556" value="46.0070">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_8_336_7556" value="2.704">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_9_336_7556" value="0.010">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_10_336_7556" value="46.0160">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_11_336_7556" value="2.601">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_12_336_7556" value="0.010">
</td>
</tr>
<tr>
<td>
<input type="text" class="print_tableInputBox" name="ttr_0_337_7556" value="4">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_1_337_7556" value="26910">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_2_337_7556" value="600">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_3_337_7556" value="44.8500">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_4_337_7556" value="44.9060">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_5_337_7556" value="1.773">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_6_337_7556" value="0.124">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_7_337_7556" value="44.9080">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_8_337_7556" value="2.830">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_9_337_7556" value="0.124">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_10_337_7556" value="44.9160">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_11_337_7556" value="2.736">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_12_337_7556" value="0.147">
</td>
</tr>
<tr>
<td>
<input type="text" class="print_tableInputBox" name="ttr_0_338_7556" value="5">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_1_338_7556" value="26220">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_2_338_7556" value="600">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_3_338_7556" value="43.7000">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_4_338_7556" value="43.7160">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_5_338_7556" value="1.857">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_6_338_7556" value="0.036">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_7_338_7556" value="43.7090">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_8_338_7556" value="2.970">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_9_338_7556" value="0.020">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_10_338_7556" value="43.7130">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_11_338_7556" value="2.874">
</td>
<td>
<input type="text" class="print_tableInputBox" name="ttr_12_338_7556" value="0.029">
</td>
</tr>
</tbody>
</table>

How to display second checkbox name aligned

<html>
<table width="45%"><tr><td>
<input type="checkbox" name="mahesh" value="mahesh">Mahesh</td>
<td>
<input type="checkbox" name="mahesh" value="mahesh">Mahesh kunenaddsfsdfasdfasdfa</td></tr>
<tr><td>
<input type="checkbox" name="mahesh" value="mahesh">Mahesh</td>
<td>
<input type="checkbox" name="mahesh" value="mahesh">Mahesh kunenaddsfsdfasdfasdfa</td></tr>
</table></html>
I want second check box name is to large, it should align properly below the name .
It should start from the name not form checkbox
you can use additional element - label, like this:
HTML:
<table width="45%">
<tr>
<td>
<input type="checkbox" name="mahesh1" value="mahesh"/>Mahesh
</td>
<td>
<input type="checkbox" id="maesh1" name="mahesh1" value="mahesh"/>
<label for="maesh1"> Mahesh kunenaddsfsdfasdfasdfa</label>
</td>
</tr>
<tr>
<td>
<input type="checkbox" name="mahesh2" value="mahesh"/>Mahesh
</td>
<td>
<input type="checkbox" id="maesh2" name="mahesh2" value="mahesh"/>
<label for="maesh2"> Mahesh kunenaddsfsdfasdfasdfa</label>
</td>
</tr>
css:
label {
display: block;
white-space: nowrap;
}
fiddle:
http://jsfiddle.net/ywg632c3/2/

Line up radio buttons

I have the following HTML:
<tr>
<td class=tabTwo vAlign=top>
<table border=0 cellPadding=0 cellSpacing=0 width=100%>
<tr>
<td vAlign=top width=5%>4.</td>
<td>Test 1?</td>
</tr>
<tr>
<td width=5%></td>
<td colSpan=2>a) <input type="radio" name="S1Q4" value="a" id="s1q4a" /> <label for="s1q4a">A</label></td>
</tr>
<tr>
<td width=5%></td>
<td colSpan=2>b) <input type="radio" name="S1Q4" value="b" id="s1q4b" /> <label for="s1q4b">B</label></td>
</tr>
<tr>
<td width=5%></td>
<td colSpan=2>c) <input type="radio" name="S1Q4" value="c" id="s1q4c" /> <label for="s1q4c">C</label></td>
</tr>
<tr>
<td width=5%></td>
<td colSpan=2>d) <input type="radio" name="S1Q4" value="d" id="s1q4d" /> <label for="s1q4d">D</label></td>
</tr>
</table>
</td>
</tr>
Produces:
How do I made the radio buttons align in a straight line? B & C seem crooked.
If you are going to use a table. Put the inputs in their own cell. The letter width of a),b) etc. is what is throwing of the alignment.
I would not use a table though. Your choice.
Your question seemed a little vague but to best my knowledge, the presence of bullets a) b) c) in the same cell is causing the problem. Here's my fiddle: http://jsfiddle.net/bTNvA/
I have tried to resolve this by moving bullets to other cell:
<tr>
<td width=5%> a) </td>
<td colSpan=2> <input type="radio" name="S1Q4" value="a" id="s1q4a" /> <label for="s1q4a">A</label></td>
</tr>
HTML
<div class="form-wrapper">
<div class="radio-choice">
<span>a) </span>
<input id="option1" type="radio" name="opt1"/>
<label for="option1">Option 1</label>
</div>
<div class="radio-choice">
<span>b) </span>
<input id="option2" type="radio" name="opt2"/>
<label for="option2">Option 2</label>
</div>
<div class="radio-choice">
<span>c) </span>
<input id="option3" type="radio" name="opt3"/>
<label for="option3">Option 3</label>
</div>
</div>
CSS
.radio-choice * {
vertical-align: middle;
}
.form-wrapper div{
float: left;
clear: both;
}
.form-wrapper span {
display: inline-block;
width: 10px;
}
http://jsfiddle.net/NewwV/1/