View Full Version : <fieldset> & <legend> & CSS

11-16-2002, 04:21 AM
Ok, I recently stumbled across this little bit of coding:

This Is A Legend
This is 'body' stuff.

This is valid stuff, so no worries there. :cool: See This Tut (http://www.htmlcodetutorial.com/forms/_FIELDSET.html).

I'm currently using CSS to format my block of code...Here's the appropriate snip from my style sheet:

border:2px solid #DE4A00;

Now here's where I'm running into my problem...Multiple tutorials state that you move the 'title' (Legend) from left to center to right, depending on <legend align="left/center/right">

However, I am at a loss on how to include this in the style sheet? I've tried a multitude of things, including...


And none of it works. I'd like to include this in the style sheet to avoid having to change the align=xxxxxx on several pages if I want to impliment a change. Any ideas? Any links? I've browsed a ton of pages this evening trying to find a solution, and nothing has worked. Any help would be greatly appreciated. Thanks! :)


11-16-2002, 10:28 AM
I've used fieldsets and legends on a few pages and noticed the following (on Macintosh);
In IE text-align:left/center/right makes the legend go left, center or right;
In Mozilla the legend sits always left, no matter what I specified;
In Opera, the legend is not only always at the right, no matter where I told it to go, it's IN the fieldset and not at the border like in IE and Moz.
I don't worry about it anymore..

11-16-2002, 08:34 PM
center is IE only. Left and Right in Netscrap 6+. Top and bottom not supported by IE. You need to use align in the tag itself to get it to work properly. Alignment is depreciated in the HTML standard 4.0 and I think not support at all in the XHTML1 standard.

11-16-2002, 09:19 PM
Ok, thanks guys! :)
Was afraid I'd have to do it in the tag, but I think it's still managable. :)

Thanks, again! :)