Forum Moderators: not2easy

Message Too Old, No Replies

Should I go Tableless with CSS?

         

DaScribbler

12:12 am on Dec 17, 2003 (gmt 0)

10+ Year Member



I see a lot of talk and practice to go tableless on websites utilizing CSS. However I've been reluctant to do so, and perhaps it may just be my flawed thinking, so I'll leave it up to people here to convince me otherwise.

The main reason I'm hesitant is because there are still older browsers out there who's CSS support is rather flaky at best. Am I incorrect in this notion?

I know how to do it, I'm just interested in hearing reasons Pro or Con towards giving in and doing it.

mipapage

12:23 am on Dec 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Netscape 4 blows it's leaky gaskets when rendering CSS. It can be done, but requires a bit of knowledge - if your traffic from that browser is negligable, dive on into fast-forward-coding!

jbinbpt

1:18 am on Dec 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It is a different thought process when you decide to leave tables behind. I abused tables, and I am afraid, my older stuff still is filled with tables.

I had some sort of mental block about css. It took quite a while for me to allow the css to control the flow, but I am please with the results. Not a lot is up yet, but one new site in particular will be almost table free.

almost table free
There are some legit uses for tables.

You won't be sorry. The effort is quite worthwhile.

jb

now if I could only learn to spell, life would be good.

mcguffin

1:29 am on Dec 17, 2003 (gmt 0)

10+ Year Member



I've heard a lot of talk about tableless CSS design for layout, but I have a content-based question.

How does tabeleless design affect content writing?

For example, let's say I've got four widgets, and each widget is priced based on volume (1-10, 11-100, 101+).

It's easy to create a 4x3 table that shows all the prices and discounts. However, if I tell my content writers "we're using tableless CSS design," they will assume that they need to avoid creating content that requires tables.

Is this really the case? Can tableless CSS design allow content writers to create multi-column/multi-row tables for data?

CSS experts might think this is an odd question, but I want to make sure I understand how CSS design principles affect content writing.

Thanks!

edited typo

jbinbpt

1:41 am on Dec 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am sure there are great ways to present that type of data in CSS but that is a legit use for tables. IMHO.

Once you free yourself (sorry about that...I'm also trying to stay away from all of those "The Dark Side" comments) of the tables, the content flows.
jb

TheDoctor

9:39 am on Dec 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mipapage>> Netscape 4 blows it's leaky gaskets when rendering CSS

No it doesn't. In fact, quite the opposite. By the judicious use of CSS you can get your pages to display readably in both Netscape 4 and later browsers. It's as if you're broadcasting in colour, but your pictures look okay when seen on a black & white TV. It's just that some people get disturbed by this...

mcguffin>>For example, let's say I've got four widgets, and each widget is priced based on volume (1-10, 11-100, 101+). It's easy to create a 4x3 table that shows all the prices and discounts. However, if I tell my content writers "we're using tableless CSS design," they will assume that they need to avoid creating content that requires tables.

Mcguffin, you are talking about tabular data here. That is, the content is tabular. CSS is about layout, not content.

You should use a table:

  • For displaying tabular data
  • For resting your coffee on whilst writing your code

Any attempt to use CSS instead of a table in either of these situations could lead to disaster ;)

Of course, in the former case, you can use CSS to control how the table is displayed.

mipapage

9:59 am on Dec 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's as if you're broadcasting in colour, but your pictures look okay when seen on a black & white TV.

What a great way to put it - you nailed it for sure. You can use many different strategies to avoid having problems with Netscape 4. Here are two examples:

  1. Serve it and all other browsers a basic set of styles with a 'linked' css file, then give modern browsers the good stuff with an @import stylesheet.

  2. Use the '/*/*//*/' hack to hide all styles of a stylesheet from everything but netscape 4, in which case you dont even have to use 'judicious use of CSS', as TheDoctor called it. Here you give modern browsers a rich stylesheet with @import, and netscape a linked stylesheet of it's own using the hack to keep things separated.

grandpa

1:09 am on Dec 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Still pretty new to CSS, but I'm finding that any new pages I create are done without tables. Older pages are slowly being transformed to remove the tables. I really like the idea of controlling my presentation from a single file.

I use a page for forms input, which might look similar to the table display of widgets and prices described above. The left table would have my content, the right table would contain my form. It took a little while, but I did this OK with CSS and no tables. The overall effect is quite nice, my left text is aligned to my liking, as are the input boxes on the right.

Simply from a code perspective I have to believe that generating a document with CSS is a whole lot easier than having to spell out table definitions.