Forum Moderators: not2easy
I was looking for a way to group 4 radio buttons on one line together within a table cell, with a short description center aligned under each radio.
<td>
<input type="radio> Radio1
<input type="radio> Radio2
<input type="radio> Radio3
<input type="radio> Radio4
</td>
Would be parsed like:
--O------O------O------O
Radio1 Radio2 Radio3 Radio4
Obviously ignore the -- I have used them to represent spaces ;)
TIA,
-Gs
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset:utf-8">
<title></title>
<style type="text/css">
#radioGroup label
{
float: left;
}
</style>
</head>
<body>
<table cellspacing="0">
<tr>
<td id="radioGroup">
<label for="radio1">
<input type="radio" id="radio1">
<div>Radio1</div>
</label>
<label for="radio2">
<input type="radio" id="radio2">
<div>Radio2</div>
</label>
<label for="radio3">
<input type="radio" id="radio3">
<div>Radio3</div>
</label>
<label for="radio4">
<input type="radio" id="radio4">
<div>Radio4</div>
</label>
</td>
</tr>
</table>
</body>
</html>