TABLE vs CSS

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

TABLE vs CSS

Post by alex.barylski »

Just posted a question in Client Side in regards to CSS conversion from TABLE to CSS...

Made me think...

Do you really think CSS will replace TABLES when it comes to rendering complex interfaces/layouts???

I really like tables...even though I have before encountered limitations...maybe it was a bug in IE...not sure...never checked in FF :)

Anyways...

If you think about it...TABLES are IDEAL...for 2 reasons:
1) WYSIWYG editors understand them
2) The css knowledge I do contain suggests that reading the structure of a table in HTML format makes slightly more sense than CSS equivleant???

Again just my opinion :)

I'm thinking HTML just a more human readble pattern...unless I"m missing something about CSS...

In CSS wouldn't you render a table of say...3 columns and 4 rows...each with a ANCHOR surrounding a IMAGE...

Wouldn't you wrap the ANCHOR/IMAGE in a DIV regardless of where they reside and just set the css width/height/top/left to position the thing relative???

Get what i'm asking?

As CSS grows in popularity or stops where it is...do you think TABLES and CSS will always coexist???

Cheers :)
Gambler
Forum Contributor
Posts: 246
Joined: Thu Dec 08, 2005 7:10 pm

Post by Gambler »

CSS sucks at positioning. I would never ever thought of using it for layouts, if not for all that table-bashing. It's mssing many vital features that would make it worthwhile. For example, there is no eay way to do this:

Code: Select all

######
#pic #  String A
#ture#  String B
######
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

I agree it sucks, but maybe only because I only barely understand it???

I know enough to style my pages so it's easy to change font color, etc... :)

And thats it :)
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

I think you should reference it as "divs" or "div layers" for the sake of the arguement because CSS can be used in tables too (just not in entirely the same way) =P
187skillz
Forum Commoner
Posts: 39
Joined: Sun Aug 10, 2003 8:35 pm
Location: London

Post by 187skillz »

It seems the way to go if you wanna be considered as a good developer or should I say designer is CSS layout, you would not believe the amount of people that are claiming that's the best thing since whatever, I do find it to have a lot og bug, it seems like a harder way to do things, but they all swear by it and even me myself I'm gonna have to go the CSS way...table seems a lot better from the front end side of things.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: TABLE vs CSS

Post by Roja »

Hockey wrote:Do you really think CSS will replace TABLES when it comes to rendering complex interfaces/layouts???
I'd say it already has for most of the best developers.

Take a look around the CSS zen garden, and witness *hundreds* of incredibly complex interfaces and layouts - all done without a table. Entirely using simple divs and semantic html, each style is a new stylesheet and set of images. After you've seen about half of them (I have!), you quickly understand that the best designs on the planet don't need tables, and the developers doing those designs don't use tables (for layout).
Hockey wrote:I really like tables...even though I have before encountered limitations...maybe it was a bug in IE...not sure...never checked in FF :)
Tables offer control, easily. They fit the "chop and drop" mentality that comes from pixel-perfect layouts in Photoshop. It is fairly straightfoward, and you can grasp the design easily.

However, they have a number of problems. They assume the content size in certain sections wont change - which generally, it does. They are extremely inflexible, and usually require the developer to use a fixed font size to prevent the table "breaking" at the seams. That results in less usability. Tables render more slowly, generally take more code to accomplish the same task, cant be cached as easily, AND have more layout issues on nextgen devices like cellphones and PDA's.

Thats quite a hit just to get "easy layout" - especially when that layout is so limited.
Hockey wrote:1) WYSIWYG editors understand them
The latest versions of WYSIWYG editors understand css just as well. Dreamweaver, Frontpage, and NVU all handle css-based layout designs just fine in their latest versions.
Hockey wrote:2) The css knowledge I do contain suggests that reading the structure of a table in HTML format makes slightly more sense than CSS equivleant???
Thats accurate, but it also means the *contents* in that table makes *less* sense than the same in a solid semantic html page. Which is better? Search Engines read content in a linear fashion - so tables lose. Worse, tables rob the structure of semantic meaning - you can't do an h1 in the middle of a table. :)
Hockey wrote:I'm thinking HTML just a more human readble pattern...unless I"m missing something about CSS...
You definitely are missing something there. Well done html+css is far more readable than tables - if we are talking about content and structure. If you mean the layout itself, yes, CSS can take a little while to wrap your head around it.

Hockey wrote:As CSS grows in popularity or stops where it is...do you think TABLES and CSS will always coexist???
Its important to make a clean distinction here. Tables themselves are not evil. For displaying *tabular data*, tables are the right choice. Tables for LAYOUT, however, is non-ideal. Most high-end developers left tables for layout behind years ago.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: TABLE vs CSS

Post by alex.barylski »

Roja wrote:Its important to make a clean distinction here. Tables themselves are not evil. For displaying *tabular data*, tables are the right choice. Tables for LAYOUT, however, is non-ideal. Most high-end developers left tables for layout behind years ago.
Alright...you've convinced me with that single statement...

Not saying I'm gonna rush out and buy a book on CSS...personally...I hate doin anything with interface when developing PHP applications...I'd much rather work with a designer...but still it's an essential evil I guess to have an understanding of HTML/CSS as a developer :)

Thanks for the input...or is that output :P

Cheers :)
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

I switched from tables to CSS about six months ago. It's hard, but stick at it, and you'll get there.
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post by foobar »

Gambler wrote:CSS sucks at positioning
http://www.csszengarden.com :roll:
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Re: TABLE vs CSS

Post by Grim... »

Roja wrote:...Take a look around the CSS zen garden...
:roll:
User avatar
Bill H
DevNet Resident
Posts: 1136
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA
Contact:

Post by Bill H »

For example, there is no eay way to do this:
What you illustrated is actually quite easy in CSS by using "float:left" for the picture.

When I started getting into CSS for layout I thought it was a stupid system invented by idiots. But, then I thought the same thing about C when I started using it some 25 years ago and now I can write in that language (well, usually C++ now) faster than I can in English. (I don't recall what I thought about COBOL et al, that was too long ago.)

It just takes some time and patience. I've now gotten to where I vastly prefer CSS, although I admit that once in a while some layout defeats me in CSS and I say to heck with it and use a table.
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

Bill H wrote:It just takes some time and patience. I've now gotten to where I vastly prefer CSS, although I admit that once in a while some layout defeats me in CSS and I say to heck with it and use a table.
Yep, me too.

I'd also rather use a TABLE than a CSS hack in a layout. I just see those CSS hacks as maintenance nightmares waiting to happen.
Gambler
Forum Contributor
Posts: 246
Joined: Thu Dec 08, 2005 7:10 pm

Post by Gambler »

However, they have a number of problems. They assume the content size in certain sections wont change - which generally, it does. They are extremely inflexible, and usually require the developer to use a fixed font size to prevent the table "breaking" at the seams.
...also, they drink human blood and require sacrifices of newborn children.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Re: TABLE vs CSS

Post by Luke »

Roja wrote:Take a look around the CSS zen garden, and witness *hundreds* of incredibly complex interfaces and layouts - all done without a table.
WOW! That completely made me rethink css layouts. Incredible.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: TABLE vs CSS

Post by Roja »

The Ninja Space Goat wrote:
Roja wrote:Take a look around the CSS zen garden, and witness *hundreds* of incredibly complex interfaces and layouts - all done without a table.
WOW! That completely made me rethink css layouts. Incredible.
Yeah, that site (still) really blows me away.. they continue adding new designs, and it really does a fantastic job of showing the incredible range of possibilities. Even though I've been visiting essentially since it was launched, I never stop being amazed by some of the designs.
Post Reply