[thelist] <fieldset>? WAS: (lining up forms using CSS)

Tony Crockford tonyc at boldfish.co.uk
Fri Nov 15 15:52:01 CST 2002

> tony, i love your fieldsets
> all i saw in the source code was
>      <form ...
>          <fieldset>
>            <legend>Simple Search</legend>  etc.
> what's the css that got you those gorgeous boxes?
> and thank you for putting your form fields in <p>...</p> blocks
> i was -- sternly, or so i felt -- recently admonished to
> place my form fields within divs, by someone who thought
> that a paragraph was not the semantically correct
> container for form fields
> so thanks for that

Oh!  I'll wait for my ticking off then ;o)  Seems to me that in order to
cater for those browsers that don't do fieldset you need a container,
the w3c says <p> and it seems okay to me, they are after all a group of
words, not a logical page division?

The CSS?

Nothing fancy:

fieldset {
	padding: 15px;
	font-size: 0.8em;

legend {
	color: #FF8000;

I did try messing with border but it looked just right the way IE
rendered it.

Hat tip to Dunstan Orchard for sparking the fieldset idea off for me in
the first place.



More information about the thelist mailing list