homepage Welcome to WebmasterWorld Guest from 54.237.71.86
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
When is tabular data not tabular data?
Having trouble converting table text to css
joolsm




msg:1205746
 5:26 pm on Apr 16, 2003 (gmt 0)

I'm in the process of moving a site over to css from a table based layout. For the moment, I'm working in IE5.5 with a 1024x768 screen. A lot of the pages are minutes of meetings.

Right now, I've got a half-way house situation - the content of each page is in a table but I have redefined html tags and applied css styles, as per the example below.

<tr valign="top">
<td>&nbsp;</td>
<td><h2>184/02</h2></td>
<td><p><span class="head3">LITTER BINS</span> [Minute whatever number
refers] </p><p> <strong>Received:</strong> Correspondence and more text. <strong>AGREED: </strong>Yet more text which goes on so that it runs onto the next line to check the blockquote tag has been set up properly which as far as I know it has.</p><p>&nbsp;</p></td>
</tr>

I now want to complete the move to css. I've got as far as making a blank css page which I can eventually use as a template. The minutes (as per the code above) are to go in div id=cont. This is where I'm having fun. Basically I don't want to be able to tell the difference between the two sets of rendered html.

The minute number has to be on the same horizontal level as the head3 heading. The only way I can get this to work so it looks right is the code below.

<div id="cont">
<span class="head2">184/02</span> <span class="head3">LITTER
BINS</span> [Minute whatever number refers]
<blockquote><strong>Received:</strong>
Correspondence and more text. <strong>AGREED: </strong>Yet more text which goes on so that it runs onto the next line to check the blockquote tag has been set up properly which as far as I know it has.</blockquote></div>

It may be that I'm making things overly complicated for myself, and I should leave the content as tabular data (it would be a whole lot easier for me if I did) and simply put it into the "cont" div.

Please, has anyone got any suggestions, thoughts, ways round this, simple solutions, bright ideas etc - in fact any advice would be welcome. I know once I've got one page sorted the hard bit is done, but right now I'm stumped for which is the best way to go.

Thanks, Jools

 

bird




msg:1205747
 6:09 pm on Apr 16, 2003 (gmt 0)

It may be that I'm making things overly complicated for myself, and I should leave the content as tabular data (it would be a whole lot easier for me if I did) and simply put it into the "cont" div.

Short answer: Yes.

Your example is really a classical case of tabular data. That's exactly what tables were invented for.

DrDoc




msg:1205748
 8:31 pm on Apr 16, 2003 (gmt 0)

To emphasize bird's answer, and further answer the question embedded in the topic for this thread: When is tabular data not tabular data?

Tabular data is always tabular data. If the data can be expressed in a list, in rows and columns... and if that's the natural way to express such information (with "natural", don't think Web... Think newspapers, magazines, and books)

A bus schedule is an excellent example of tabular data. So is a budget spreadsheet.

It is important to remember one basic rule of thumb when it comes to tables and tabular data. According to fundamental guidelines for writing, a table is never to exist inside another table. A table is, by definition, a group of data. If other data belongs to this group, then it is to be included in the same table. If not, then it is to have its own table, separate from the first.

That's why it is wrong, both according to what W3C intended tables to be, and according to basic layout rules, to use a table for layout.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved