Prevent the fieldset element’s border from going through the legend element
I have a fieldset, how can I position the legend inside a fieldset with a border? I want the border to go around the legend and not through the middle of it.
One option would be to float the
legend element to the left:
Another approach would be to use an
outline rather than a
Another approach would be to absolutely position the
legend element relative to the parent
fieldset element. This is probably the least flexible approach.