[thelist] Multi-Column Layout Not Wrapping

Ian Anderson ian at zstudio.co.uk
Mon Aug 8 15:49:40 CDT 2005


Kasimir K wrote:

>  
>
>> How do I tell it to wrap to the second column?  Or is there a better
>> way to do this with asp?
>
>
> How about using a table? That sounds very much like tabular data to 
> me, and while using tables for lay-out is bad, using them to present 
> tabular data is good :-)
>
> .k

True :)

But this isn't straightforward tabular data; I was coding something 
similar last night in ASP, which displays different column arrangements 
of checkboxes depending on how many there are - nice little programming 
exercise, it was.

Thing is, you mustn't have cells for each item, otherwise the reading 
order is screwed - humans expect such columns to read alphabetically 
down the way first, then along, rather than along then down the way that 
writing out a standard table in a loop would work.

The correct markup (in my opinion) is to have a single row table with 
one cell for each column of results, and BR or P tags separating items 
in each column; it should fill column 1 then column 2 (and 3 or however 
many) and balance the number of items sensibly. This way, a screen 
reader user or a sighted user will be able to read the things in 
sensible fashion.

Of course, you could as well use floated DIVs or whatever, since the 
content fails one of the main tests for tabular data - the meaning of an 
item in this scenario is not dictated by its position in a grid.

If browsers supported the CSS that Jess was trying to use, it would 
probably work just fine as a solution to the stated problem. Thing is, I 
think only late builds of Mozilla support that part of CSS3 at present. 
Couldn't find a good list by googling, so not sure if situation has changed.

Cheers

Ian

PS - Jess, if you're interested I can email you the code I am working 
on. I won't post it as it is a complete hack and too embarrassing to 
make public in its current state. You may be able to adapt it.



More information about the thelist mailing list