NYCPHP Meetup

NYPHP.org

[nycphp-talk] Abstracting CSS: Reusable HTML UI Components

Michael B Allen ioplex at gmail.com
Sun May 4 11:10:29 EDT 2008


On Sun, May 4, 2008 at 10:28 AM, Daniel Convissor
<danielc at analysisandsolutions.com> wrote:
> Hi Mike:
>
>
>  On Sat, May 03, 2008 at 09:57:06PM -0400, Michael B Allen wrote:
>  >
>  >   <div class="myapp">
>  >   <table>
>  >   <tr><td colspan="2"><h3>Account Information</h3></td></tr>
>  >   <tr><td class="fieldlabel">Username:</td><td>abaker</td></tr>
>  >
>
> > This seems a little clumsy to me but it's the best I can come up with.
>
>  This isn't clumsy.  It's exactly what CSS is for.  I'd put the class
>  inside the table element, but that's me.

At this point of uncertainty I've been in the habit of applying style
through divs because they can quietly affect groups of any type of
element without changing the css (e.g. in the above example, the div
applies style to h3 regardless of whether or not it's in a table). If
that style info turns out to be specific to tables of that type then
yes, I agree that it should be on the table. In fact it is very likely
that I will need table classes since tables are frequently used for a
wide range of purposes including page layout, form structure and data
display of different types.

Mike

-- 
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/



More information about the talk mailing list