Hi,
I'm looking for a way to style a legend element with a background that spans the whole width of the page. I originally used a regular heading (h3) because I knew the design would have difficulty with fieldset/legend, but the after the accessibility review it was requested that we use fieldset/legend anyway and I need to get the design as close as possible.

By default, legends are only as wide as they need to be to fit the text and there seems to be little one can do about this in current browsers. I came up with one solution using a thick top border on the fieldset behind the legend element which works in Firefox, but it doesn't quite work in IE because it leaves a small white gap between the legend and fieldset border. I currently don't have access to any other browsers for testing, but I'd like it to work fairly well in at least all major browsers.

The following test case demonstrates how I want it to look and my current solution that works in Firefox. Both examples in the page should look roughly identical

http://lachy.id.au/dev/2006/03/fieldset

--
Lachlan Hunt
http://lachy.id.au/
******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to