Hi, I'm exploring the idea of using modules of code to emitting reusable HTML UI elements like postal addresses, login forms, linked images and in turn more sophisticated elements such as invoices, forum posts, etc. Because these elements are supposed to be reusable I do not want to force style information on the user and yet I need to maximize the ease with which the user can apply their own style to each element.
For example, let's say one of these classes emits some HTML like the following: <table> <tr><td colspan="2"><h3>Account Information</h3></td></tr> <tr><td>Username:</td><td>abaker</td></tr> <tr><td>Email Address:</td><td>[EMAIL PROTECTED]</td></tr> <tr><td>Full Name:</td><td>abaker</td></tr> </table> Now let's say I want to change the style of h3 and the field labels but within this table only. This is basically impossible through CSS alone. One possibility would be to allow the user to supply a class name that will be strategically set on some elements like: <div class="myapp"> <table> <tr><td colspan="2"><h3>Account Information</h3></td></tr> <tr><td class="fieldlabel">Username:</td><td>abaker</td></tr> Then the user can supply their own CSS like: div.myapp h3 { color: #000080; border-bottom: 2px #808080 solid; margin-bottom: 0px; } div.myapp td.fieldlabel { text-align: right; white-space: nowrap; } This seems a little clumsy to me but it's the best I can come up with. If you needed to generate HTML that can be styled separately in mostly arbitrary ways, how would you use classes and divs and such to maximize that? If you were given some HTML and you could not change the output other than perhaps the names of some CSS classes, how would you want the elements organized so that you could style it well by only tweaking the CSS file? Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/