Tableless CSS web design?
What is your opinion on the trend towards tableless CSS designs, and the idea that all formatting should be removed from the content.
I use some css for site design, but sometimes find the pressure to use all CSS can drag out completion time in order to hack my way around browser limitations.
If you would share your well-qualified opinions, I would be most appreciative.
dk01 posted this at 13:23 — 8th May 2008.
He has: 516 posts
Joined: Mar 2002
Hello and welcome to the site. IMO, its worth it to use CSS designs without tables because if I ever have to come back and edit my site, I can do it about 10X faster than if I have to sort through all the td and tr tags. Initially the time requirement is greater, but this is usually due to the fact that most new designers are used to WYSIWYG editors which do tables. If you had to write tables by hand, I'm sure you'd end up using CSS instead. After a few sites you will become used to the CSS limitations and it won't really take that much longer.
Note: tables are fine when used as tables (aka to display tabular data) but when they are used in site design it can become a problem.
greg posted this at 13:38 — 8th May 2008.
He has: 1,581 posts
Joined: Nov 2005
I agree with dk01, tables are only a problem when used to make a full page layout. Even then I suppose for a simple site they are 'ok', but using CSS you get much more options for styling and layout.
I often use tables, for example when displaying a load of results from a database query.
Using FOREACH with the array from the DB query I can often get away with 3-4 lines of code to echo massive amounts of data.
I just set the table class in the CSS sheet and from there can manipulate the TD, TR, TH etc.
Sometimes I need a different style on a certain row or perhaps just one cell, then I just use a seperate class for that row/cell and use PHP to determine when to use that particular row/cell class by counting with a var.
webwiz posted this at 17:17 — 8th May 2008.
He has: 629 posts
Joined: May 2007
Perhaps you don't remember the pain of learning how to nest tables, add spacer GIFs, and so on. There is a similar learning curve to using CSS.
You hit the nail on the head when you mention browser limitations. I suggest joining a discussion group like css-discuss to find solutions to these.
Greg and dk01 have a point, too. Tables have a purpose - to display tabular data. Perhaps we should talk about 'meaningful markup' or 'CSS-styled markup' rather than 'tableless'.
Believe me, I would never want to go back to using tables for layout. One day, perhaps even the World's Favorite Browser[TM] will support CSS more fully.
(Well, I can dream, can't I?)
Cordially, David
--
delete from internet where user_agent="MSIE" and version < 8;
rtroxel posted this at 17:29 — 9th May 2008.
He has: 286 posts
Joined: Mar 2003
Is it at all practical to include table formats in the CSS code?
I frequently need to change the contents and format of tables on my web sites, and I'm looking for an easier way to do this. The pages are very basic and include one- or two-column articles, lists of addresses, etc. There wouldn't be many TD or TR sections. By making the entire page a table in CSS, I'm wondering if this would make changing page contents and format easier.
Thanks, as always.
webwiz posted this at 17:11 — 9th May 2008.
He has: 629 posts
Joined: May 2007
Roy: Certainly you can style tables, just as you can any other HTML element on a page. Tables and forms are a bit tricky, though.
Changing HTML content usually means altering the HTML itself, although it can also be done with JavaScript. The main "job" of CSS is to affect the appearance.
AFAICS the main problem of table-based design is exactly the problem you describe - how to make changes to the appearance without having to rewrite the HTML.
Your use of a simple table to structure a web page is a quick way to get around some browser limitations. Perhaps, one day, a certain browser will support the table display properties of CSS. Until then, I'd say a simple table as you describe is not ideal, but okay.
Cordially, David
--
delete from internet where user_agent="MSIE" and version < 8;
Megan posted this at 18:23 — 9th May 2008.
She has: 11,421 posts
Joined: Jun 1999
In my opinion, it's not really a "trend towards" tableless CSS design anymore. It's a fact of web design . The trend towards CSS started in 2001. It did take awhile to really become widely established but it's beyond that point now.
Separating structure and presentation makes a huge difference in design of web pages now. It's so much easier to work with. You can also do so much more with CSS then you could ever do with just HTML. Once you really learn how to do it you can come up with much more sophisticated designs. And CSS is always continuing to improve so you'll be able to do more and more as support improves.
As for your situation, I think it's good to just keep trying. Every time you work on a design try to do a little more without tables. Before long you won't need them at all anymore.
Megan
Connect with us on Facebook!
rtroxel posted this at 03:49 — 10th May 2008.
He has: 286 posts
Joined: Mar 2003
Thanks for the advice. (Now, I've got some reading to do.)
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.