NYCPHP Meetup

NYPHP.org

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

Michael B Allen ioplex at gmail.com
Sun May 4 12:10:32 EDT 2008


On Sun, May 4, 2008 at 11:27 AM, tedd <tedd at sperling.com> wrote:
> At 11:10 AM -0400 5/4/08, Michael B Allen wrote:
>
> >
> > On Sun, May 4, 2008 at 10:28 AM, Daniel Convissor
> >
> >  >  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
> >
>
>
>  Mike:
>
>  Tables should not be used for anything except column data. Using tables for
> layouts is just bad practice and demonstrates a disregard for, or ignorance
> of, accessibility issues.

I see. So how does one do layouts without tables? Do you have a simple
example on the web somewhere? Is there a good tutorial I can look at?

Mike

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



More information about the talk mailing list