Re: CSS & tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2009-05-15 at 14:11 -0400, tedd wrote:
> At 1:25 PM -0400 5/15/09, PJ wrote:
> >I know of no better place to ask. This may not be strictly a PHP issue,
> >but...
> >I am busting my hump trying to format rather large input pages with CSS
> >and trying to avoid tables; but it looks to me like I am wasting my time
> >as positioning with CSS seems an impossibly tortuous exercise. I've
> >managed to do some pages with CSS, but I feel like I am shooting myself
> >in the foot or somewhere...
> >Perhaps I am too demanding. I know that with tables, the formatting is
> >ridiculously fast.
> >Any thoughts, observations or recommendations?
> 
> PJ:
> 
> You have a choice:
> 
> 1. Learn css and do it right;
> 
> 2. Use tables.
> 
> If you are in a time pinch, number 2 will suffice enough to get it 
> past a client (besides, what do they know anyway). But number 1 is 
> really the best way to go. Never use tables to hold a layout together.
> 
> I know, I have clients who *require* me to use tables for their 
> layout and I must bite my lip and comply. But, more and more clients 
> are listening to reason as they discover it really is better way to 
> go.

Hi tedd,

I made a post a week or so ago where I asked a question about a better
way to do a layout... specifically I wrote the following...

I thought I'd dredge up this old, old topic to add some comments about
some recent stuff I did since this thread (or many similar to it) were
in the back of mind. Specifically I was creating a new look and feel for
my MUD hobby website and I wanted to make use of lots of PNG images with
alpha transparency. Additionally I wanted variable width. I felt tables
were the best approach for this because div based sliding door
techniques and multi-level div containers don't work when the alpha
transparency will reveal the underlying sliding or container background.
I just don't think I could accomplish the same results using divs and
floats.

    http://www.wocmud.org/welcome.php

Comments?

I didn't get any feedback... maybe you have thoughts on it. I'm well
versed in HTML and CSS and I felt the need to drop back to tables on
that one (though I did use CSS appropriately). The WCAG have this to say
on the matter:


Checkpoints:
5.1 For data tables, identify row and column headers. [Priority 1]
        For example, in HTML, use TD to identify data cells and TH to
        identify headers.
        Techniques for checkpoint 5.1
5.2 For data tables that have two or more logical levels of row or
column headers, use markup to associate data cells and header cells.
[Priority 1]
        For example, in HTML, use THEAD, TFOOT, and TBODY to group rows,
        COL and COLGROUP to group columns, and the "axis", "scope", and
        "headers" attributes, to describe more complex relationships
        among data.
        Techniques for checkpoint 5.2
5.3 Do not use tables for layout unless the table makes sense when
linearized. Otherwise, if the table does not make sense, provide an
alternative equivalent (which may be a linearized version). [Priority 2]
        Note. Once user agents support style sheet positioning, tables
        should not be used for layout. Refer also to checkpoint 3.3.
        Techniques for checkpoint 5.3
5.4 If a table is used for layout, do not use any structural markup for
the purpose of visual formatting. [Priority 2]
        For example, in HTML do not use the TH element to cause the
        content of a (non-table header) cell to be displayed centered
        and in bold.
        Techniques for checkpoint 5.4
5.5 Provide summaries for tables. [Priority 3]
        For example, in HTML, use the "summary" attribute of the TABLE
        element.
        Techniques for checkpoint 5.5
5.6 Provide abbreviations for header labels. [Priority 3]
        For example, in HTML, use the "abbr" attribute on the TH
        element.
        Techniques for checkpoint 5.6

It is my opinion that browsers do not yet provided the necessary
functionality across a large enough user spectrum to facilitate the
versatility of layouts used by many sites today. That said, I place most
of the blame squarely on Microsoft.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux