HighDots Forums  

CSS vs. tables for column layout

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss CSS vs. tables for column layout in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Peter Foti
 
Posts: n/a

Default CSS vs. tables for column layout - 12-04-2003 , 10:49 AM






I started out making an application that should have a layout such as the
following:

<table>
<tr>
<td>Categories</td>
<td>SubCategories</td>
</tr>
<tr>
<td>Categories Management</td>
</td>SubCategories Management</td>
</tr>
</table>

Note that the items in the 2nd row should be lined up together and below
everything in the first row. I started this project using CSS (and div
elements with id attributes) to position the elements. I had given width
values to Categories and SubCategories, and I used absolute positioning to
get SubCategories to the right of Categories. The problem, however, will
come if SubCategories contains more data than Categories, at which point it
would be on top of the next "row". Can anyone suggest a CSS alternative
that would give me the same layout as the table structure above, and would
ensure that the 2nd row of data was always below the Categories and
SubCategories?

Thanks!
Peter Foti



Reply With Quote
  #2  
Old   
Barry Pearson
 
Posts: n/a

Default Re: CSS vs. tables for column layout - 12-04-2003 , 12:22 PM






Peter Foti wrote:
Quote:
I started out making an application that should have a layout such as
the following:

table
tr
td>Categories</td
td>SubCategories</td
/tr
tr
td>Categories Management</td
/td>SubCategories Management</td
/tr
/table

[snip]
Can anyone suggest a CSS alternative that would give me the same
layout as the table structure above, and would ensure that the 2nd
row of data was always below the Categories and SubCategories?
Why? Looks like a good case for a table.

Is there a reason why tables won't work?

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/




Reply With Quote
  #3  
Old   
Barry Pearson
 
Posts: n/a

Default Re: CSS vs. tables for column layout - 12-04-2003 , 12:22 PM



Peter Foti wrote:
Quote:
I started out making an application that should have a layout such as
the following:

table
tr
td>Categories</td
td>SubCategories</td
/tr
tr
td>Categories Management</td
/td>SubCategories Management</td
/tr
/table

[snip]
Can anyone suggest a CSS alternative that would give me the same
layout as the table structure above, and would ensure that the 2nd
row of data was always below the Categories and SubCategories?
Why? Looks like a good case for a table.

Is there a reason why tables won't work?

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/




Reply With Quote
  #4  
Old   
Peter Foti
 
Posts: n/a

Default Re: CSS vs. tables for column layout - 12-04-2003 , 12:37 PM



"Barry Pearson" <news (AT) childsupportanalysis (DOT) co.uk> wrote

Quote:
Peter Foti wrote:
I started out making an application that should have a layout such as
the following:

table
tr
td>Categories</td
td>SubCategories</td
/tr
tr
td>Categories Management</td
/td>SubCategories Management</td
/tr
/table

[snip]
Can anyone suggest a CSS alternative that would give me the same
layout as the table structure above, and would ensure that the 2nd
row of data was always below the Categories and SubCategories?

Why? Looks like a good case for a table.

Is there a reason why tables won't work?
Well, it's not really tabular data. Perhaps the descriptions I used didn't
make that clear. Categories will list a bunch of Categories (as links,
except for the "currently selected" category). Subcategories will list a
bunch of subcategories for the "currently selected" Category (these will
also be links, except for the "currently selected" sub category). A good
analogy might be directory listing on the left, and files within that
directory on the right. Then below those would be a row containing links or
buttons related to the cell above it.

Pete




Reply With Quote
  #5  
Old   
Tim
 
Posts: n/a

Default Re: CSS vs. tables for column layout - 12-04-2003 , 11:43 PM



On Thu, 4 Dec 2003 13:37:28 -0500,
"Peter Foti" <peterf (AT) systolicnetworks (DOT) com> wrote:

Quote:
Well, it's not really tabular data. Perhaps the descriptions I used didn't
make that clear. Categories will list a bunch of Categories (as links,
except for the "currently selected" category). Subcategories will list a
bunch of subcategories for the "currently selected" Category (these will
also be links, except for the "currently selected" sub category). A good
analogy might be directory listing on the left, and files within that
directory on the right. Then below those would be a row containing links or
buttons related to the cell above it.
That still sounds like tabular data - where one cell contains something
that's *related* to other adjacent cell(s). I'd say that if you make
something logically coherent by putting it into a table, then you've
made proper use of a table.

--
My "from" address is totally fake. The reply-to address is real, but
may be only temporary. Reply to usenet postings in the same place as
you read the message you're replying to.


Reply With Quote
  #6  
Old   
kchayka
 
Posts: n/a

Default Re: CSS vs. tables for column layout - 12-05-2003 , 06:18 AM



Tim wrote:
Quote:
On Thu, 4 Dec 2003 13:37:28 -0500,
"Peter Foti" <peterf (AT) systolicnetworks (DOT) com> wrote:

Well, it's not really tabular data. Perhaps the descriptions I used didn't
make that clear. Categories will list a bunch of Categories (as links,
except for the "currently selected" category). Subcategories will list a
bunch of subcategories for the "currently selected" Category (these will
also be links, except for the "currently selected" sub category). A good
analogy might be directory listing on the left, and files within that
directory on the right. Then below those would be a row containing links or
buttons related to the cell above it.

That still sounds like tabular data
Sounds more like a tree to me. Nested lists would be a suitable
replacement for table(s), methinks.


--
To email a reply, remove (dash)un(dash). Mail sent to the un
address is considered spam and automatically deleted.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.