* Rob Cochrane <[EMAIL PROTECTED]> [2005-09-23 01:20]: > Alan Gutierrez wrote: > > A newbie question on styling forms. > > > A structure question... > > > > What elements do I use to markup structure? DL/DT/DD? UL/LI? > > > > For me label is a pretty logical way of marking up forms along with > fieldset all are designed to work in a form. IE has some presentation > issues with legend and persists in styling it blue unless you > specifically alter it to another colour. Someone with a deep knowledge > of Cascading may be able to say why. > > Display the labels as block with width and you can then flow them, clear > them all along with the inputs. > > Here is an excellent article: > http://www.themaninblue.com/experiment/InForm/index.htm
That is a nice article. Thank you to everyone who sent me pointers. I'm digesting all of them. My take... Styling forms is not straightforward. Forms are interactive not passive content. It is not straightfoward because there are only a few elements in HTML to describe forms. Forms could represent a data model that is far more more complicated that fieldsets. There are many relationships to model, not simply groups inputs, but parent/child, recursive, sequences, etc. One poster said it was really markup topic, and I suppose it is a problem of limited, not terrilby descriptive, markup. Forms are not paragraphs, and definition lists are tricky since I don't know how to markup an error message... -- Patient Billing -- [Please enter a SSN in the form XXX-XX-XXXX] SSN: [FOO! ] -- -- (I like to put error message smack above the field with the error.) I don't see how document centric markup can logically express a form layout. A box model layout like in XML makes more sense for forms or dialog boxes. I think it depends on whether the form elements are part of a document, or whether they are an application in their own right. There may be a text input that is part of a paragraph, and then it's okay to mark it up as such. If it is an application, then I guess it is a problem of layout, and if it's a problem of layout, then the same tricks used to layout the page, should be used to layout a form. (That's the approach I've decided upon: jot to be shy about positioning. I'm not saying this is correct, or starting a flame war, I know this is a list of practical CSS matters. How you approach forms, when they lack a proper representation, is a practical matter for me today.) -- Alan Gutierrez - [EMAIL PROTECTED] - http://engrm.com/blogometer/index.html - http://engrm.com/blogometer/rss.2.0.xml ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/