Redmond, WSE2 Presentation, ASP.NET Form Trick

Dominic left to begin his internship in Redmond today. He was suitably excited. Let’s hope the “homeland security” folks let him in. I’m going to be giving another presentation at the local .NET users group this month on WSE 2. This will be my 4th user group presentation (the 3rd this year), and they do seem to be getting easier each time. If only there was some job out there that would let me do this all the time…. The time is only 45 minutes, which is a long time to hold somebody’s attention, but no long enough to do justice to WSE.

And now for some content: one of my co-workers who is something of a css junkie showed me some tags I was not aware of before, and how they can be nicely styled up to give some interesting form effects. The tags are the “fieldset” and “legend” tags which can enclose one or more “form” elements (I won’t try to post the html here for fear of skrewing up other dotnetjunkies weblogs). They render quite nicely in IE without styling (see below, I like the rounded corners). And you can style them up with colour (see here towards the bottom). They also display quite nicely in mozilla (albeit without the rounded corners). They are in the HTML 4.01 standard so you have a fighting chance of them working in older browsers too.


Yeah! fieldset tags rock!

Oh - of course as Joseph mentions the "fieldset" and "legend" tags are able to be styled like anything else so if you want the rounded corners in Mozilla (BTW those rounded corners are an IE on WinXP only thing - because XP is full of rounded goodness) or Mozilla-based browsers just use the good ol’ "-moz-border-radius" property thus:

-moz-border-radius: 10px;

And enjoy your rounded corners!

For more info on what is available with the fieldset element check out the spec:

16/07/2004 12:57:00 AM
Richard Mason
Looking forward to the WSE goodness tomorrow night. I’ve already bought the popcorn :)
18/07/2004 9:02:00 AM
Jon Galloway likes fieldset too
20/10/2004 2:36:00 PM