Tables v. CSS

Sid59

Lifer
Sep 2, 2002
11,879
3
81
table cause im familar ..

but i went off a bit and came back to read this thread and i thought it was about your sig. hahha. oops.
 

BZeto

Platinum Member
Apr 28, 2002
2,428
0
76
a little of both...

I like tables for simplicity... I like using div for precision.
I'm no expert, but thats my opinion.
 

Psych

Senior member
Feb 3, 2004
324
0
0
Tables are just so much easier to implement. It is recommended that CSS is placed in a separate document, and that just gets annoying sometimes. Positioning the div blocks can also be quite tedious. Tables are for me.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
CSS + div tags can't portably/sanely emulate a table, and likewise, a table is overkill for many things that just need a simple box. I hate to spam my own site but notice I use one table for something that a table makes easy (splitting an area into a left and right box), and I use a div to surround it, since there's no point in using a table for that.

Right tool for the right job.
 

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
I find tables easier when I am coding on the fly. When using CSS I have to step back and thing about the big picture. I'm happy to say my website doesn't use any tables except to display tabular data (like my music playlist). I have another application in a dev environment that I hacked out quickly and it uses tables.

The more I got into CSS the more I realized I didn't know. I've found some incredible CSS tricks that can replace JavaScript hacks.
 

stndn

Golden Member
Mar 10, 2001
1,886
0
0
it depends on what you're trying to accomplish.
<table> was designed to display data in tabular format, while CSS was designed for presentation.

if you're just whipping out something for quick display, table is the way to go.
eventually you should consider using CSS for layout.

there are a few reasons why CSS is considered better:
1. changing a page layout can be done simply by changing the CSS. no need to touch the data that's already there. This is easy if you have a major facelift to do.
2. CSS loads faster compared to table
3. If you have too many nestings, you can get lost in <td> easily. Sure, one can argue it's as easy to get lost in the ocean of <div>'s, but it's not as hard to debug (hint: use different background-color for different DIV's and you'll find out which one belongs to which)

and to be fair, there are a few reasons why tables are better:
1. simpler especially for beginner web designers.
2. more compatible across different browsers, even way back to Netscape 4.x (CSS layout gives different strange results on even some recent browsers *coughmsiecough*)
3. easier to position certain elements at certain places.

i'm leaning towards CSS myself, just because it makes <div>'s more customizable. I can do more things with CSS than i can with table. Of course the tradeoff is figuring out the differences between all the browsers and trying to figure out the hacks to make everything works similar.

one thing to remember: pixel perfect design across browsers is impossible without (mostly IE) css hacks.
 

screw3d

Diamond Member
Nov 6, 2001
6,906
1
76
stndn pretty much nailed it all. Tables were never designed to become a layout tool, and CSS was introduced as the "correct" way to implement layout. Of course, nobody said it was easy to achieve cross-browser compatibility, especially with crap like IE occupying 90% of the browser market :(
 

AFB

Lifer
Jan 10, 2004
10,718
3
0
Originally posted by: BingBongWongFooey
CSS + div tags can't portably/sanely emulate a table, and likewise, a table is overkill for many things that just need a simple box. I hate to spam my own site but notice I use one table for something that a table makes easy (splitting an area into a left and right box), and I use a div to surround it, since there's no point in using a table for that.

Right tool for the right job.


Easy
 

WobbleWobble

Diamond Member
Jun 29, 2001
4,867
1
0
I'm transitioning from table based layouts to CSS, myself.

I'll use a table it's really supposed to be a table, but for layouts it's CSS all the way now.
 

stndn

Golden Member
Mar 10, 2001
1,886
0
0
hmmm...
interesting enough, i found these readings over the past few days while browsing for a few unrelated information...
tables are evil...
... or, are they?
can css replace tables?
discussion on CSS 'hacks'
when css goes too far ...

and this is kind of sort of but not really related, enlightening reads...
when semantic markups go bad

basically from what i've gathered so far, the holy war of CSS vs non-CSS has started (if not ongoing).
just like the MSIE vs NS war (may they rest in peace), AMD vs Intel, PC vs Mac, Pepsi vs Coke, Pop vs Soda, and so on...

and i think my post has started something kind of sort of off-topic ...
and that makes me think a bit about what i have written up there as reply to the original poster ....
 

XBoxLPU

Diamond Member
Aug 21, 2001
4,249
1
0
I am 100% Divs at the moment, can be a pain getting them to work right though

dswann.com ( sorry for the spam )
 

MScrip

Member
Dec 30, 2003
132
0
0
I've been designing websites for about 9 years... but I'm new to the whole CSS vs. Tables argument. I can see the advantage of cross-browser compatability and cool-factor of CSS. But why is everyone saying that tables are suddenly wrong for layout? Since the beginning of the web, tables have been used to align items on a page and create layout for different elements on a page... long before this new love for CSS. For a long time, tables were the only way to do layout. In fact, CSS was recognized first as a way to control colors and fonts, not for layout. Although tables can be tricky to figure out... tables have been the basis of web-design for almost 10 years.

Someone recently said, "Whether we like it or not, CSS layout is the standard for web development." When exactly did this happen? Shouldn't standards have developed in the beginning of the web, and not in 2004?

Only the smallest percentage of tech-savvy websites are switching over to pure CSS for layout. What about the billions of other websites on the web?

Don't get me wrong... I'm all for new trends in web-design. But the overall mood today is, "if you still use tables, you're an asshole!" How can tables be suddenly so BAD, when they have been used on a billion websites already? Tables were fine last year, but now they are horrible... It sounds like the diet trend... Suddenly carbs are bad! Don't ever eat carbs!

I've played with CSS layouts, and it's kinda cool making an entire site without using a single <TABLE> tag. But right now it's a hobby. I'm not switching over to pure CSS for layout yet. And I probably don't have to... I'm sure tables will continue to be supported by browsers for many years to come.

I think it's funny that so many people now say "tables should only be used for tabular data." When for the past 8-9 years, every site was built with tables.

CSS for layout is cool... but you can't go back to 1994 and teach CSS instead of tables!
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: amdfanboy
Originally posted by: BingBongWongFooey
CSS + div tags can't portably/sanely emulate a table, and likewise, a table is overkill for many things that just need a simple box. I hate to spam my own site but notice I use one table for something that a table makes easy (splitting an area into a left and right box), and I use a div to surround it, since there's no point in using a table for that.

Right tool for the right job.


Easy

That'll work the same on all browsers? What if I want something more complex? What if I want to mess with the padding and margins, will I run over 100% and cause a scrollbar? etc etc etc.
 

AmigaMan

Diamond Member
Oct 12, 1999
3,644
1
0
unfortunately if you have to support that POS browser, AKA Nutscrape 4.x, then tables are your only option. And even if I could get rid of NS4.x, I'd still have to worry about IE 5, 5.5, and MacIE5.x. If I could just say, "Everyone must use Mozilla 7+, Firefox .9+, IE6, or Opera" then my life would be so much simpler...