Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3
This is the forum to discuss the Wrox book Beginning CSS: Cascading Style Sheets for Web Design by Richard York; ISBN: 9780764576423
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 28th, 2005, 10:28 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Fairfield, Iowa, USA.
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 10

I am finally at chapter 10, a lot of things are becoming clearer but one question still remains, when is it good to use tables? I know u must be pretty busy but a couple of examples would be great.


Thanks

Christian
__________________
Christian
  #2 (permalink)  
Old March 28th, 2005, 11:30 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

When you have tabular data that you must show a relationship between.

I mean most people will tell you to avoid tables in a purely presentational application, but in all honesty even that is perfectly fine. And yes this may go a little against the grain of what I said in my book, cause I came down pretty hard on tables in Chapter 10, but (obviously) didn't really say when it is proper and fine to use one (actually I don't recall if I did or not, but obviously there is some doubt). In all truth tables only become bad when they're overused (nest 'em ten deep, and fill 'em to the rim with transparent gifs), especially when better, cleaner, simpler, easier methods exist (Ahem, CSS). When tables are overused a website becomes a nightmare to maintain, it becomes more difficult to tweak the look and feel without breaking the whole thing, it becomes far less accessible (and all that other stuff I said in Chapter 10).

Standards enthusiasts (myself included) often encourage designers to avoid using tables for purely-presentational purposes (e.g. to layout a whole page) because from a semantic standpoint it isn't the best use of tables, and it is also more difficult to create truly flexiable designs (a la CSS Zen Garden[1]) with tables as opposed to block elements like div.

So there is a fine line here, when I say tables are bad I'm saying overusing tables is bad, because it makes a design exponentally more complex than it really needs to be. So if a table is the most appropriate, use tables, don't try to recreate calendars or other tabular data with divs, that's what tables are for, and when it comes to doing a three-column layout or something like that go with divs, those are more flexible and appropriate for that application (IMHO)!

The biggest mistake I personally see designers making is not using the right markup for data, for instance wrapping headings in <p> and <b> tags, that's what <h1> - <h6> is for! Or worse, going to complicated and extreme measures to manipulate space using <p> tags or transparent gifs, when CSS margin or padding is more appropriate. Look at the source of any non-standard designed site and you're likely to find mostly <table>-esque tags and a handful of others, and very little of it will actually add any meaning to the data. Headings won't be in heading tags, paragraphs will probably be separated by line breaks <br />, that is what I'm saying to not do in Chapter 10, avoid making a mess of your markup!

You'll also be interested in Chapter 16 & 17 BTW, where I explore the possibilities CSS offers using tables, and a few seldom used table tags that are actually very useful.

Hope that clears things up.

[1] http://www.csszengarden.com/

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
  #3 (permalink)  
Old March 29th, 2005, 09:35 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Fairfield, Iowa, USA.
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, It definetly did. The reason for my question was that I am building this site for the University I work for, and part of it will be to show the different classes available(PHP) for students, and I thought the best way to show these classes and all pertinent infomation would be to use tables, but then I wasn't so sure because of what u said(more than once ;) ) on chapter10, so from your post I think is probably best if I use tables for this specific situation, the whole layout of the site will be table-free.

Thanks once again.

Christian


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 10 - Ajax try it out VeganMan BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 5 May 2nd, 2008 05:11 PM
Chapter 10: TreeView example postoak7 BOOK: Access 2003 VBA Programmer's Reference 0 September 19th, 2006 12:25 PM
Chapter 10 gogeo BOOK: Beginning Access 2003 VBA 1 January 22nd, 2006 09:41 AM
Chapter 10 columbiasmiles JSP Basics 0 May 17th, 2004 08:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.