RE: Issue with legend content wrapping to fieldset width?

Thanks all.
I gather it is a poor css implimentation on behalf of IE.
My solution to this issue was to put a div inside the legend with the content inside the div and to specify width for the div.  It seems to work fine with legend div {width: 100%;} along with form, fieldset and legend widths also specified as 100%.



> -----Original Message-----
> From: Geoff Deering [mailto:gdeering@acslink.net.au]
> Sent: Saturday, January 10, 2004 7:39 AM
> To: Mirabella, Mathew J
> Cc: w3c-wai-ig list
> Subject: Re: Issue with legend content wrapping to fieldset width?
> 
> 
> Mirabella, Mathew J wrote:
> 
> >All.
> >
> >I am tweeking my online survey application.  In surveys 
> where there are sets of radio buttons or other grouped 
> controls, I am using fieldset and I am using the legend text 
> as the overall label for that set of controls.  For items 
> that are single text boxes or textareas, I am using normal 
> paragraph text for the labels.
> >
> >Using CSS, i have specified widths for the paragraphs used 
> as labels for form controls and also fieldsets and legends as 
> they are used so that all content is 100% of the screen width.
> >
> >However, while the paragraph text seems to wrap when it is 
> too long for one screen width, the legend text does not.  
> Thus, with long group labels in legends, the page requires a 
> degree of horizontal scrolling.  I wish to avoid this and 
> ensure that the legend text does in fact wrap.
> >
> >Does anyone know how this can be done, short of using a div 
> inside the legend itself?
> >
> >I am primarily using IE 5.5 / 6.  I wonder if this is 
> another css bug/issue with the browser?
> >
> >Mat.
> >  
> >
> 
> My first guess is that it is fieldset's poor support in most 
> browsers, 
> it would almost have to be the most poorly supported element, 
> and after 
> all, it is probably close to the least used.
> 
> Once you start implicitly defining CSS classes within the 
> fieldset it is 
> probably not going to have the power or hooks for any 
> inheritance of css 
> hierarchy to apply properly.
> 
> Suggested Workaround: I'd try dropping any CSS class reference to 
> anything specifically withing the fieldset and see if it wraps 
> naturally.  If not, apply the same class to the fieldset.  This maybe 
> one that is not solvable, but I think there should be others on this 
> list that have worked with this a bit more than me and do 
> have solutions.
> 
> Fieldset also causes Javascript to not work in certain browsers cause 
> for some reason (poor implementation) fieldset can cause DOM hiccups.
> 
> Geoff
> 

Received on Sunday, 11 January 2004 16:57:07 UTC