Jump to content

Tables? Still?


shoopaie

Recommended Posts

Probably depends on who you ask. I would hope that most professionals would be using CSS layouts by now, but I am sure that there are some who are still creating table based layouts. A lot of beginners seem to use them still since they can be easier to understand than CSS/CSS based positioning.

 

Probably nothing wrong with following along with the book and using tables for the sake of simplicity/learning, but I wouldn't do that for live, professional projects. Tables are for tabular data, not layout.

Link to comment
Share on other sites

I have picked up a php book to supplement my videos. The copyright date is 2008. In this book, the author apparently enjoys using tables. Did css pretty much do away with tables, or are they still being used like they might have been in 2008??

 

 

Surely it depends on what the table is being used for.

CSS is primarily used for layout of standard elements - headers, footers, content areas etc.

But tables can still be very useful and supplementary - especially when combined with forms.

Tables can be more reliable than CSS, as they are less affected by cross browser issues. So if you want, for example, form elements to be perfectly in line: a table can do the job well with less chopping and changing (and less head banging against a brick wall), which can be the case with CSS. CSS often needs to be adjusted, and then re-adjusted (ad infinitum), in order to get the perfect layout accross all browsers. This kind of overkill can make your life needlessly difficult - and mean that you are spending more time, and being less efficient.

I would practice with CSS - working with different objects and elements, and then decide for yourself where it should be used.

 

Tables therefore, in my opinion, will not be redundant anytime soon.

Link to comment
Share on other sites

Tables therefore, in my opinion, will not be redundant anytime soon.

 

Tables are meant to be used to display tabular data, but should not be misused for layout - CSS layout really isn't that difficult, once one's gotten the hang of it, and is not as complicated as you make it sound. Websites designed wit CSS layout are easier maintained and better for search engines.

Link to comment
Share on other sites

Tables can be more reliable than CSS, as they are less affected by cross browser issues. So if you want, for example, form elements to be perfectly in line: a table can do the job well with less chopping and changing (and less head banging against a brick wall), which can be the case with CSS. CSS often needs to be adjusted, and then re-adjusted (ad infinitum), in order to get the perfect layout accross all browsers.

This is a myth. CSS can produce excellent forms with good alignments/positions using proper semantics and css without the headaches or cross-browser issues. The 'banging against a brick wall' is only because users does not have adequate css/html skills to produce good forms or layouts efficiently. You can use unordered list ( <li> ), paragraph ( <p> ), data definition ( <dd> ) tags to align the form fields but it's really not necessary.

 

Here are some good articles on how to make a css form with good results in short time:

 

Fancy Form Design Using CSS

Prettier Accessible Forms

 

Some nice css form examples:

 

Form 1

Form 2

 

In addition, the html is much cleaner to work with because there are no tables plus you can change the entire look of your form by just editing the css.

Edited by Eddie
Link to comment
Share on other sites

I think that you have misunderstood what I was saying.

 

With respect to tables being search engine friendly or not: It's not as if Google/Yahoo etc publish their metric algorithms - so I will hold back on commenting. I'll leave that to the SEO salesmen. But as I don't use tables for layout (generally), this has never really been an issue.

 

For me, tables are very useful. Combined with css AND forms, they can produce very well set out and structured elements.

Having said that - I don't know anyone however who uses tables needlessly for layout.

CSS is the standard approach.

 

Clearly if you are just trying to produce a contact form or something similar, tables are not required. It would be silly to use one.

 

However, for tabulated data - as Andrea said, they serve a purpose.

 

But to approach the layout of a site with tables in mind, instead of CSS would be silly.

 

"CSS layout really isn't that difficult, once one's gotten the hang of it, and is not as complicated as you make it sound". I am not saying it is complicated, but if it is tabulated data you are trying to present - you would surely go with a table. And cross browser issues are a concern. Especially now that CSS3 is here. Chrome and Safari have stepped up to the plate, whereas Firefox surprisingly is lagging behind with its interpretation of many of the new rules.

 

Tables are therefore more reliable for certain tasks, in my opinion, because of these discrepencies.

 

It depends entirely on what is being 'laid out'. Structured presentation of data: use tables. Standard layout of forms (in most cases): use CSS. Positioning of media: CSS. Text and other such content: CSS.

 

This leads on nicely to my next post actually (which is the reason I logged in to here). I have produced tabulated data displaying an administrator list as part of a CMS.

 

I can't get the form controlling it to process!

 

Anyway, good discussion. I am no expert on any of these issues. In fact, I'm not an expert at anything. I would always use the approach that best suits the job at hand. And as my old programming lecturer taught me: keep it simple stupid. Don't make life needlessly difficult. I'd rather be in the pub! :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...