RE: [PHP] -less layouts; Ideas welcome

Mon, 01 Jun 2009 17:53:30 -0700

Um. why. This type of tabular data is exactly what tables are for. 

All you've done is substitute a whacky DIV layout for a TABLE one:

<div class="table_tr row_color{$mod}">
    <div class="table_td first_name">{$row['first_name']}</div>
    <div class="table_td last_name">{$row['last_name']}</div>
    <div class="table_td address">{$row['address']}</div>
    <div class="table_td phone_number">{$row['phone_number']}</div>
    <br clear="both" />

isn't much different than:

<tr class="table_tr row_color{$mod}">
    <td class="table_td first_name">{$row['first_name']}</td>
    <td class="table_td last_name">{$row['last_name']}</td>
    <td class="table_td address">{$row['address']}</td>
    <td class="table_td phone_number">{$row['phone_number']}</td>

what the hell did it save or give you??!

And dude. What's with the hiddeous HEREDOC stuff? Ugh.

Pop in and out of PHP like Rasmus intended. There's virtually no speed hit
and it makes the code hella-easier to read (and colorize in any normal IDE).

<tr class="table_tr <?= row_color{$mod} ?>">
    <td class="table_td first_name"><?= $row['first_name'] ?></td>
    <td class="table_td last_name"><?= $row['last_name'] ?></td>
    <td class="table_td address"><?= $row['address'] ?></td>
    <td class="table_td phone_number"><?= $row['phone_number'] ?></td>

It pisses me off all these people going out of their way to bad-mouth tables
and think their elitist DIVs are so great (Not you Jim). I've been a web
developer since 1992 and I HATE DIVs for layout too. They never work exactly
right and I always end up using tables again for layout.

> -----Original Message-----
> From: Jim Lucas [] 
> Sent: Thursday, May 21, 2009 1:02 AM
> To:
> Subject: [PHP] <table>-less layouts; Ideas welcome
> Since this has been a topic of dicussion, I figured I would 
> add my thoughts.
> I have been toying with the idea of doing a <table>-less 
> layouts involving tabular data, calendars, 
> etc...
> Recent threads have finally made me do it.  Let me know what 
> you think.
> (source for above)
> When you turn off the styles, the calendar becomes pretty 
> rough on the eyes, but still "accessible".
> Same thing with the tabular data structure.
> But, not knowing how the various types of accessibility 
> applications work, I am guessing that the 
> layout to an application trying to read it should work fairly 
> well.  Let me know if I am way off the 
> mark with my thoughts.
> If you want to respond off list, that if fine by me.
> -- 
> Jim Lucas
>     "Some men are born to greatness, some achieve greatness,
>         and some have greatness thrust upon them."
> Twelfth Night, Act II, Scene V
>      by William Shakespeare
> -- 
> PHP General Mailing List (
> To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to