Getting LEGEND tags to wrap text properly.
- by DA
Legend tags are always a nuisance as they don't adhere to a lot of CSS rules.
I'm trying to get the text within a LEGEND tag to wrap using the typical solution of wrapping the text in the LEGEND with a span and setting the width and display: block.
<legend>
<span style="border: 1px solid blue; width: 250px; display: block">
This text should wrap if it gets longer than 250px in width
</span>
</legend>
I thought this used to work In Firefox, but does not appear to work anymore in 3.6. Sample:
http://jsbin.com/exeno/5
It still works in IE.
Has anyone found a fix for this or is it just a matter of forgoing LEGEND tags and go back to H# tags?