HTML and CSS Reference
In-Depth Information
padding: 3px;
margin: 6px;
}
7. Each of the radio buttons is an input element and is accompanied by a
<label>
. To
prevent each one being treated as an individual cell, add a new rule to override the
display
property like this:
fieldset label, fieldset input {
display: inline;
}
8. Save the style sheet, and test the form again. As Figure
12-17
shows, the contents
of the
<fieldset
>
fails to display in separate columns like the rest of the form,
even though browser developer tools confirm that the
display
property has been
changed to
table-cell
. It's not clear why this happens, but it's consistent across all
browsers. So, it appears that a fieldset generates a nested table within the table row.
Figure 12-17.
The <fieldset> appears to generate a nested table