Page 1 of 2

Are you still using tables?

PostPosted: Mon Oct 08, 2007 10:47 pm
by Karlis
I know, this is the age of CSS layouts and DIV layers, but I find myself very often in a situations when:

Case 1: using a tables is much faster and the code is much easier to understand

Case 2: css and div just can not do (in all browsers) what the table can

Am I the only one?

PostPosted: Tue Oct 09, 2007 6:52 am
by syrupcore
yes. ;) kidding, of course.

Table code is only easier to understand because you already know it, I promise. Clean semantic HTML is much much easier to read. So much less code! Once you get used to it, it's a breeze. Your content is in one spot and it's display is separated. Same basic principle as MVC in 'real' programming.

I've been tableless for about 4 years now. I can't think of anything I could do in tables that can't be done with plain HTML and css. Sometimes, the css has to get tricky to get it to work across browsers but then your hacks are confined to a single place instead across your whole site. Is there something in particular I can help with?

IE6 will make you go grey but you learn it's quirks. I'm gonna get a Microsoft tatoo in my bald spot. I fully blame them for it. :)

Will

PostPosted: Tue Oct 09, 2007 10:58 am
by MikeyB
Yes still use tables, I know I really shouldn't but it's just quicker as it's what I know best.

I am (very slowly now due to the arrival of our baby!) redesigning one of my websites with CSS and trying not to use any tables, and so far so good.

And as will says, you can get the CSS looking good in browsers like Firefox & Opera, then open it in IE and it all goes wrong, nice!!!

PostPosted: Tue Oct 09, 2007 4:13 pm
by notuo
I am with syrupcore

I started about 2 years without tables (unless is tabular data) and works not only better, but the code really is more clean.

Regards

PostPosted: Tue Oct 09, 2007 10:34 pm
by chrisjlocke
Tables? Yuk!
Lazy bad way to design a webpage. It may be quicker and easier to knock up a table to position text, etc, but there is just so much more bloat in the HTML code. Much neater with CSS, and easier to maintain at a later date.

PostPosted: Tue Oct 09, 2007 11:31 pm
by syrupcore
chrisjlocke wrote:...and easier to maintain at a later date.


+10.

In all honesty, the reason I investigated web standards in the first place was trying to keep a massive massive website I'd built updated. It was all tables and jesus, editing/updating/changing just sucked.

When I read feature requests here from folks that want to be able to click on something in the preview screen so they can find it in the code, I'm willing to bet 9 of 10 are using TD soup to layout their webpages. With clean html (eg, no stinking display code), it's just not that hard to find code bits in your document.

PostPosted: Tue Oct 23, 2007 7:29 pm
by MaxD
IE7 is a much better browser, and you don't get the same problems as IE6. I only used tables when I used a WYSIWG editor, and moved to CSS when I started using a HTML editor. There are some excellent articles on CSS and tables, to make them easier to update though.

CSS is great. Just create a 'wrapper' and put all your content within. Be even better when rounded corners for content boxes and transparency becomes better supported.

PostPosted: Wed Oct 31, 2007 4:28 pm
by Mot
The issues of corners and transparency have kept me building the framework of some of my sties out of tables, but I have a sense that even this is not a valid reason.

Admittedly, I'm new to constructing sites using CSS. It's frustrating at times. I've literally ended up scrapping everything for a site I was working on and starting over because I could not unravel the CSS puzzle.

Among a myriad of increasingly messed up positioning problems, a menu I was designing actually turned backwards on me and I could not for the life of me explain it.

Home | About | Services | Contact

actually became

Contact | Services | About | Home

It was at that point I realized I wasn't in Kansas anymore.

Still, I'm doing what I can to fight through the pain of the learning curve with the anticipation that I will be a better web developer for it.

I'm going to start a new thread about favorite CSS Tutorials. I hope you will all go there and submit your favorite CSS learning aid.

:)

PostPosted: Wed Oct 31, 2007 6:18 pm
by notuo
Mot.

For your menu problem, please check if you have floats within floats or something like that.

I ran into that sometime and the issue was the float (and maybe combined with text-align)

hope this helps.

PostPosted: Thu Nov 01, 2007 1:10 am
by syrupcore
your menu problem was, almost certainly, that you had the menu items floated right. float right is a funny beast. :) instead, float the containing element right and leave the children elements alone. in fact, they can be floated safely left within a right floated container.

PostPosted: Thu Nov 01, 2007 4:17 pm
by notuo
That's correct syrupcore,

I didnt't recall the situation but was related with floats.

PostPosted: Sat Nov 10, 2007 8:43 pm
by syrupcore
came across an older presentation on why to switch from tables to css based layouts.

http://www.hotdesign.com/seybold/

PostPosted: Wed Nov 21, 2007 2:58 pm
by daredare
i think that sometimes tables can be much more consistent than div style layout. not to replace all the layout with tables but using them in certain cases

PostPosted: Wed Nov 21, 2007 3:56 pm
by chrisjlocke
I think you need to back that up. Apart from displaying tabular data, I can't think of one instance where it is better to use tables, rather than CSS.

PostPosted: Wed Nov 21, 2007 11:14 pm
by syrupcore
chrisjlocke wrote:I think you need to back that up. Apart from displaying tabular data, I can't think of one instance where it is better to use tables, rather than CSS.


+1