Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 02, 2016, 02:05:29 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Web Page Layout Debate: Tables vs. CSS  (Read 7882 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,405
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Web Page Layout Debate: Tables vs. CSS
« on: February 04, 2009, 05:06:51 AM »
The AppScout website is a nice daily blog that doesn't get mentioned enough on DC.  Today there was a nice entry about some recent competing thoughts on using css vs using tables for laying out web pages.  I've had enough experiences cursing out css to consider myself in the camp that is not convinced that css is the holy grail..

Quote
This is all a lead-in to the pissing match in-progress between two groups of web developers. It pits tables against CSS (cascading style sheets). The prevailing wisdom has been tables are bad for you--bad for the environment. Using table is like smoking cigarettes... in a nursery school. CSS is touted as a much more elegant and controllable method (even though it isn't) of design. In 2009 only a schlemiel would use tables...
And then he proceeds to compile a laundry list of the largest most unbreakable sites around--and they're all using tables! Ron Garret adds a little fuel to the fire with point-by-point examples worthy of a closing argument on Law & Order (though on an otherwise awful looking page) showing CSS break where tables thrive.


The blog entry is pretty brief and points to the following essays arguing for using tables or css:

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,117
    • View Profile
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #1 on: February 04, 2009, 05:25:49 AM »
css 3 tables will be taking over - eventually. that should help resolve a lot of css hate.

housetier

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 1,321
    • View Profile
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #2 on: February 04, 2009, 08:04:41 AM »
I have an advantage over mouser: I do not care if a page works in IE. Therefore I can use css as much as I want for layout :)

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #3 on: February 04, 2009, 09:00:10 AM »
I was under the impression that the css way won a long time back due to accessibility reasons. CSS is not a holy grail but neither is tables. I just prefer simpler pages.

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,768
    • View Profile
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #4 on: February 04, 2009, 01:48:56 PM »
IMHO, the advantages of using CSS are somewhat exaggerated. I don't think it has an overwhelming advantage from a design perspective.

From what I've seen, you can just as easily do bad page design with CSS as you can with tables.

I think search engine optimization is the only real argument that can be made for preferring CSS over table layouts.



« Last Edit: February 04, 2009, 02:06:52 PM by 40hz »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #5 on: February 04, 2009, 06:08:31 PM »
40hz: or using mobile devices... or text-based browsers.
- carpe noctem

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #6 on: February 05, 2009, 04:00:55 AM »
or rejigging layout for printing without a seperate print page for every page on your site, or for redesign.. and it's degrades gracefully.
I can recommend Designing with Webstandards if you want to know more / open your eyes to this css over tables discussion. The whole first part of the book deals with the WHY question in an excellent writeup.

The only reason not to use it is because it can be more effort, but only in certain cases. designing for css layout is not more work than tables. What is the new information that causes this debate all over again? the benefits have been proven.
Quote
Why use Cascading Style Sheets?

   1. By editing a single CSS file, you can make sitewide design changes in seconds.
   2. CSS lets you output to multiple formats quickly.
   3. CSS lets you use logical names for page elements. You can, for example, give a DIV the name "header", or a H1 the class "headline". It's self-describing.
   4. External CSS files are cached by browsers, improving load time.
   5. CSS eliminates the need for messy code -- namely font tags, spacer gifs and nested tables. This improves load time and makes developers' lives easier.
   6. CSS lets you do things normal HTML doesn't. Examples: better font control, absolute positioning, nifty borders.
   7. Practical use of CSS encourages proper HTML structure, which will improve accessibility and search engine placement.
   8. CSS's :hover PseudoClass cuts down on the need to use JavaScript onmouseover calls.
   9. If you want valid XHTML Strict you have to use it anyway
more info at http://css-discuss.i...tio.com/?page=WhyCss
« Last Edit: February 05, 2009, 04:05:33 AM by justice »

Gothi[c]

  • DC Server Admin
  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 858
    • View Profile
    • linkerror
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #7 on: February 05, 2009, 03:24:34 PM »
Quote
the benefits have been proven.

Yes, the benifits are real, so are the nightmares. It's a tradeoff either way. Both systems suck. I vote for a 3rd option. Someone wake me up when there is one.

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #8 on: February 05, 2009, 04:33:39 PM »
flash :P

Gothi[c]

  • DC Server Admin
  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 858
    • View Profile
    • linkerror
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #9 on: February 05, 2009, 06:50:42 PM »
Noooooooooooooooooooooooo

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,096
    • View Profile
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #10 on: February 05, 2009, 07:26:07 PM »
That is the speed of with which your money will leave your pocket. Is it not for software to create the Flash (whatever), the designer (home made flash just doesn't look that good), vendor lock-in, the costs of the extra generated traffic.

I'm no fan of flash, especially not with my heavily taxed "information secondary road" (50 USD for 128Kbit/sec).   

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #11 on: February 06, 2009, 09:35:36 AM »
Quote
the benefits have been proven.

Yes, the benifits are real, so are the nightmares. It's a tradeoff either way. Both systems suck. I vote for a 3rd option. Someone wake me up when there is one.
How much does CSS suck, though, when you're designing simple & clean layouts, instead of being moronic and trying to do complicated & pixel-perfect layouts? People (not saying you're part of that camp, Gothic!) should realize that web != DTP and stop overdoing the stuff.
- carpe noctem

Gothi[c]

  • DC Server Admin
  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 858
    • View Profile
    • linkerror
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #12 on: February 06, 2009, 09:19:18 PM »
Well, I don't like to do pixel perfect layouts really, I prefer to work with relative sizes such as em or %. (ie, flexible layouts.)

I guess what bothers me most is the boxing limitations (hacks required to center something vertically, or to have a column fill the whole page, while wildly documented, are ugly and redicilous in the fact that they are even required at all) and then mostly, inconsistencies between browsers.

The boxing stuff seems like it would be fixed in css3, if it ever comes out. Though I'm not sure if the proposed solution is the best one. At least it is A solution, nevertheless.

The browser inconsistencies can't be blamed on css, but should really be blamed on the browsers, I guess. What bothers me is that lots of the proposed 'hacks' to 'fix' lots of the issues don't even validate as valid css, because they are browser-specific things implemented next to/on top of the standards (IE does a lot of that).

I simply refuse to implement stuff that doesn't validate, because I feel I shouldn't have to.

Then you've got the overlapping text issues you can have, or floats that don't behave properly when text is sized to extremes (big or small).

An ironic example, is a web page that tried to argue how CSS is superior to tables, since tables 'print better'.
While it is true that you can easily switch css templates to a non-color printer friendly style, irony has it that when i went to the print-preview of the page, i saw this:

http://linkerror.com...lson_dept(ha-ha).png

Yes, when printing, the text just went all over the place and started overlapping. Needles to say, I was not convinced ;) - If the very same page arguing the better printing, doesn't even print right (yes it was pure css layout), then where are we at?

I feel lots of the css evangelists, like css so much, because it does have good ideas behind it, and a lot of it truly is pure beauty and freedom. However, the actual implementation (in browsers) is very much a horrible mess.

All in all, I really do find that with tables you have more certainty that your layout will stay where it is supposed to, and not wrap around, or start overlapping when things are resized too much or whatever, and you can make a flexible layout that stays in place no matter what, regardless of the complexity of the layout, very easily... But that's probably the only thing they have going for them. All the disadvantages argued against tables are valid. But I do feel that the layout, boxing, placement of things on a website, and having these things stay consistent, is a very important thing. And if this thing is complicated to the level of needing hacks and un-validating code, then I find the solution a mess.

I can't help but conclude that tables are messy, css is implemented messy. The www is messy, and imho, has a lot of maturing to do as far as standards and consistency.
« Last Edit: February 06, 2009, 09:33:13 PM by Gothi[c] »

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #13 on: February 07, 2009, 06:00:57 PM »
You don't need to apply invalid css to fix things in internet explorer, use conditional comments and then set styles that work just for ie (or specific versions of ie).

Gothi[c]

  • DC Server Admin
  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 858
    • View Profile
    • linkerror
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #14 on: February 07, 2009, 06:06:31 PM »
I don't want to have to create separate styles to applease a specific browser. That's the point I'm trying to make.

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 677
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #15 on: February 16, 2009, 03:47:59 AM »
For those struggling to make CSS-only designs that work in all major browsers, you might want to use a CSS framework like http://960.gs/

If anyone's interested, I can share links to couple of walk-through practical usage examples of 960 framework.
<a href="https://sridharkatakam.com">My blog</a>

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Web Page Layout Debate: Tables vs. CSS
« Reply #16 on: February 16, 2009, 06:13:20 AM »
I don't want to have to create separate styles to applease a specific browser. That's the point I'm trying to make.
And this is sucky. The browser incompatibilities are imho partially the W3C's fault, though - they ought to have written a reference web-tech rendering engine. And of course MS should also be bashed for being so slow at fixing IE :)
- carpe noctem