473,382 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

CSS vs. tables for column layout

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
5 2444
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
"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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

44
by: Mariusz Jedrzejewski | last post by:
Hi, I'll be very grateful if somebody can explain me why my Opera 7.23 (runing under linux) doesn't show me inner tables. Using below code I can see only "inner table 1". There is no problem with...
5
by: Ben Jessel | last post by:
I am in the process of converting my site to using XHTML and CSS. A lot of my sites include tables of data, which are highlighted using javascript rollovers. I have converted my a lot of my...
40
by: Mason A. Clark | last post by:
CSS Experts: OK, I'm a stupid newby. Now, here's the question: Can CSS replace slightly complicated Tables and work in three browsers (e.g. MSIE 6.0, Net 7.1, Op 7.03) ? After countless...
81
by: sinister | last post by:
I wanted to spiff up my overly spartan homepage, and started using some CSS templates I found on a couple of weblogs. It looks fine in my browser (IE 6.0), but it doesn't print right. I tested...
2
by: Mario T. Lanza | last post by:
Greetings, I've been working on a 3-column layout where the center column is of a fixed width (230px wide). The center column must always be 230px and the columns on the right/left (always the...
8
by: kaeli | last post by:
I have had a little free time lately to revisit a problem I have with the 3 column layout plus a header and footer. See this example: http://glish.com/css/7.asp There is a header and 3...
7
by: Wilhelm Kutting | last post by:
Hi again i want to replace the following layouttabel with css/xhtml: ---------------------------------- <table width="640" cellspacing="0"> <tr> <td valign="top">My Title</td> <td...
18
by: Dave Thomas | last post by:
I am starting to learn how to code CSS vs using tables. I have used tables for many years, and can do just about anything with them. However I can see how CSS is more flexible and compact (and...
53
by: Alan Silver | last post by:
Hello, I understand the issue that tables should be used for tabular data and not for layout, but I would like some clarification as to exactly what constitutes tabular data. For example, if...
32
by: Simon Dean | last post by:
Duh... Not another one... Hopefully simple though, I hate the way *I* (and it might be a CSS trait) can't intermix fixed width divisional elements with a variable auto expanding div??? The...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.