By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,739 Members | 1,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,739 IT Pros & Developers. It's quick & easy.

CSS vs. tables for column layout

P: n/a
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
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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?

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #2

P: n/a
"Barry Pearson" <ne**@childsupportanalysis.co.uk> wrote in message
news:wY**************@newsfep1-gui.server.ntli.net...
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
Jul 20 '05 #3

P: n/a
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?

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #4

P: n/a
Tim
On Thu, 4 Dec 2003 13:37:28 -0500,
"Peter Foti" <pe****@systolicnetworks.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 - 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.
Jul 20 '05 #5

P: n/a
Tim wrote:
On Thu, 4 Dec 2003 13:37:28 -0500,
"Peter Foti" <pe****@systolicnetworks.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.
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.