I am experiencing an issue with a table that is nested in a fieldset. The problem arises when the height of the table exceeds the height of the fieldset, causing a left scrollbar to appear. However, the <legend>
element scrolls along with the table instead of remaining fixed.
<fieldset>
<legend>Header</legend>
<table>
<tr>
<td>Val 1<td>
</tr>
<tr>
<td>Val ....<td>
</tr>
.......
</table>
</fieldset>
<fieldset {
border: 1px solid lightgrey;
padding: 20px;
border-radius: 8px;
background: #f9f9f9;
padding: 5px;
height: 280px;
max-height: 280px;
vertical-align: top;
font-size: 11px;
overflow-y: auto;
}
Can anyone advise on how to prevent the <legend>
element from scrolling along with the table?