Yes I have had this problem too. I end up trying to ignore the inconcistency and just live with it.
What does look cool is if you put a padding (0.2em) or something small on the legend.
Give it a border, the same colour as the fieldset, then a new background colour.
add cursor: pointer, and with a little javascript you can have a collapsing form :)
I love it, rarely do it, but its a cool application I think.
:)
Cheers!
- Chris
Andreas Boehmer [Addictive Media] wrote:
I am having some difficulties to position the content of <legend> using CSS in Firefox. Firefox (and IE) default positions the legend so that it overlaps with the border of the fieldset. Which in general is quite nice, but in my particular case I want the content of the legend to be inside the fieldset's border, not overlapping it.
IE behaves quite friendly in this case: I give the legend a padding-top and it moves down into the fieldset. But Firefox wrecks things by moving the fieldset at the same time as the padding.
Another interesting thing is that I cannot give the legend a background-color that would run the entire length of the fieldset. Even if I give <legend> a display:block and a set width, these settings are being ignored in Firefox.
I'd be interested to hear whether somebody else has found a way to solve this problem? To me it seems that Firefox forces a certain layout on the legend and there's no possibility to move away from that.
Thanks for the feedback!
Andreas Boehmer User Experience Consultant
Phone: (03) 9386 8907 Mobile: (0411) 097 038 http://www.addictiveMedia.com.au Consulting | Accessibility | Usability | Development
****************************************************** The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************
****************************************************** The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************