Is it sometimes ok to use tables for non tabular data?

Status
Not open for further replies.
So for one (or a minority of) reason(s), you stop using css and divs and resort to tables.

It's all easy enough
use css's display:table; and it's relative stuff to make it work

and use position relatives/absolutes/percentages for ie6/7

Much much more maintainable, much more dynamic, much greater control, more semantic, better for accessibility, better for those who disable css, better for 99% of things.

Full code for centring vertical text: How to vertically and horizontally center text in an unordered list or div
 
Like ignoring the fact that your layout only works under the very specific circumstances of being viewed in your browser(s) on your computer.
I tell you what dude if you want to code for 100% and turn a decent profit for your efforts good for you. But in the real world coding for 98% of your users and turning exactly the same profit as you is far better. Those 2% are use to those normal examples you gave, but using CSS rather than tables is far better for people with disabilities and I would rather code for them than the other 2% who use crappy browsers and none of the other main stream alternatives. For people with bad eyesight, that's included in peeps with disabilities look into zoom style sheets. Far easier and far better and guarantees a good experience, unlike yours.

Also I am waiting on the other 9 ways that I am breaking and your not?
 
Renniks said:
So for one (or a minority of) reason(s), you stop using css and divs and resort to tables.

It's all easy enough
use css's display:table; and it's relative stuff to make it work

and use position relatives/absolutes/percentages for ie6/7

Much much more maintainable, much more dynamic, much greater control, more semantic, better for accessibility, better for those who disable css, better for 99% of things.

Full code for centring vertical text: How to vertically and horizontally center text in an unordered list or div

See I can accept that some solutions work.

I disagree about it being more elegant, but I'll finish this other argument first.


Jazajay said:
I tell you what dude if you want to code for 100% and turn a decent profit for your efforts good for you. But in the real world coding for 98% of your users and turning exactly the same profit as you is far better. Those 2% are use to those normal examples you gave, but using CSS rather than tables is far better for people with disabilities and I would rather code for them than the other 2% who use crappy browsers and none of the other main stream alternatives. For people with bad eyesight, that's included in peeps with disabilities look into zoom style sheets. Far easier and far better and guarantees a good experience, unlike yours.

What? As soon as someone resizes their browser your method breaks. As soon as someone uses a different screen resolution it breaks. As soon as someone uses a different font size it breaks. That's not 2%.
 
Less elegant?
Less elegant would be using a method of displaying styles with something that isn't meant for that purpose.
Less elegant would be using something that has been proven to be worse for accessibility, page loading times, maintainability and the like.

So I know which method I would use, or look for, or try my best to find a "hack" <--- note that most hacks aren't hacks, they are just using the css as intended, just layered up...
 
Your first point I think Renniks has covered quite well, but tables for layout is far from elegant.
What? As soon as someone resizes their browser your method breaks. As soon as someone uses a different screen resolution it breaks. As soon as someone uses a different font size it breaks. That's not 2%.
You really need to read my thread on accessible web coding and here's why. What kind of people use a higher font-size? People with a disability. That's because they have bad eyesight, now for them best practise says either to create a zoom CSS sheet or a high readability version now where does it say use tables. However using tables for mark up makes it nigh on impossible for screen readers, people who use a straw sip and suck machines, brail machines to read the page properly to them as it changes the layout and best practise to them says not to use tables for layout for those reasons. In the UK 1 in 10 people are either disabled or care for someone disabled, 1 in 7 has bad eye sight.

So there for following tables for layout will be a night mare for those uses and is not the best practise in any means for people with disabilities as you suggest.

Tables has been proven to effect your sites performance in the search engines, make the code anything but elegant and harder to maintain.

So therefore you are left with the last 2 groups of people in your example.
As soon as someone resizes their browser your method breaks. As soon as someone uses a different screen resolution it breaks.
Lets see:
As soon as someone uses a different screen resolution it breaks.
Well as most new phones are smart phones they show the page as it is in main stream browser versions, Safari for the Iphone, Opera for all the others, Levi will come and tell me know that pocket IE uses IE and Andriod Chrome downloadable for the apps store, but I use Opera I can tell you it doesn't do that but shows the page how it does in Opera.

So that leaves you with 2 groups one people who resize their browsers, now I test my design by resizing the browser to make sure it looks good enough up to a sensible size, and I have to say I've never seen what you are on about.

And people who don't use smart phones, well I know which I would prefer to code for, for that minority of minority's? Or for people with disabilities and to help improve my search engine rank so more people can find my site.

If that one factor means so much for you go for it, but you not doing your self any favours in any of the others. There is a reason things move on and I think you've missed the point. :)
 
Jaz and Mark A are both wrong.

Using tables for layout is just as bad practice as is using -moz-any-link or whatever it is that you champion the use of.

As for the 'tables are quicker/easier' argument: it's easier to put down a cat with a gun than with an injection, but that doesn't make it right.

If you find tables quicker than 'proper' markup then you're doing it wrong.
If you constrain the heights of elements, you're doing it wrong. Jaz's method of p{ margin-top45%; } assumes that you know that p is going to be one line of text high. This is wrong.
 
Jazajay said:
Well as most new phones are smart phones they show the page as it is in main stream browser versions, Safari for the Iphone, Opera for all the others, Levi will come and tell me know that pocket IE uses IE and Andriod Chrome downloadable for the apps store, but I use Opera I can tell you it doesn't do that but shows the page how it does in Opera.

Jaz, I'm pretty sure that most of the mobile browsers show up as 'mobile' browsers unless set to do otherwise hence why you can be automatically diverted to 'mobile' friendly sites.

Don't forget opera is 2 types too, they can access opera's servers and use the 'turbo' mode of the desktop to get a 'mobile' optimised version, opera mini only does this.
My experience of opera on win mobile (6) wasn't that good in terms of arrangement but it was a damn site better than pocket ie which was so basic most pages turned out as a list view of what was on the page :mad:

Not sure on the windows phone/zune browser (not used them), it is still pocket ie based but it's been improved supposedly.

As much as it pains me to say this, mobile safari is one of the best mobile browsers, I still prefer android 2.2's as you have the option of flash but compared with windows mobile (not including windows phone 7) they're in a different league.

Nokia has symbian, maemo and soon meego (intel os), sybmian used opera usually, maemo had it's own webkit browser iirc and meego is webkit I think (bit rusty on this os) so would be similar to opera and android above.

I'd also say that it's worth taking mobile browsers into account, they don't really like tables either so working in css would be better and allow easier adjustment via stylesheets etc :)
 
Harry said:
Jaz and Mark A are both wrong.

Using tables for layout is just as bad practice as is using -moz-any-link or whatever it is that you champion the use of.

As for the 'tables are quicker/easier' argument: it's easier to put down a cat with a gun than with an injection, but that doesn't make it right.

If you find tables quicker than 'proper' markup then you're doing it wrong.
If you constrain the heights of elements, you're doing it wrong. Jaz's method of p{ margin-top45%; } assumes that you know that p is going to be one line of text high. This is wrong.

I don't understand.

You say I'm wrong, then agree with what I'm saying.

Which is that his method is useless because he doesn't know the height of the thing he wants to centre.

Other than that, a table and single CSS statement (vertical-align) is less code and simpler and faster to implement over all browsers than what Renniks posted.

Do you want to argue about database denormalization too, so we can act all pretentious and principled while ignoring what's actually pragmatic.



Jazajay said:
What kind of people use a higher font-size? People with a disability. That's because they have bad eyesight, now for them best practise says either to create a zoom CSS sheet or a high readability version now where does it say use tables.

Wrong argument. This isn't for tables, it's against your terrible centring method. There are better options, Renniks posted one.

Also what kind of people use a larger font size? People who want more readable text?
 
Say what?
You said you thought it's okay to use tables sometimes; it isn't.
Jaz says using margin-top:45%; is the best way to vertically align something; it isn't.

And I'll say again, just because something is simpler and quicker doesn't make it right, does it?
 
(Just to clarify, if he doesn't add it in, Harry knows full well that tables for tabular data is correct, but no-one is talking about that)
 
Harry said:
Say what?
You said you thought it's okay to use tables sometimes; it isn't.
Jaz says using margin-top:45%; is the best way to vertically align something; it isn't.

And I'll say again, just because something is simpler and quicker doesn't make it right, does it?

Well it's evolved into separate arguments now. The original was me arguing for tables.

This long one about his centring method is a separate thing, I don't need to like tables to think it's silly.

Also web standards says it's not OK; therefore it is not OK isn't really a convincing argument. If in my situation I find tables to have more pros than cons then it's up to me to use them. The main pro for me being simplicity. I'm not aware of any negatives that come from this that would outweigh that for me, personally.

I never said that using tables conformed to whatever standards, so you can't categorically say it's wrong.
 
Mark Alexander said:
Well it's evolved into separate arguments now. The original was me arguing for tables.

This long one about his centring method is a separate thing, I don't need to like tables to think it's silly.

Also web standards says it's not OK; therefore it is not OK isn't really a convincing argument. If in my situation I find tables to have more pros than cons then it's up to me to use them. The main pro for me being simplicity. I'm not aware of any negatives that come from this that would outweigh that for me, personally.

Are you a member of the Flat Earth Society?
 
Haha, well come on, you're exhibiting equally close-minded views.

Web standards is a community driven initiative to make development more sensible, accessible, buzzword, buzzword, buzzword. The work of thousands of individuals and organisations goes into making a more sensible web. So by your 'argument for authority' token, why did we ought to think that you, the minority, are correct?
 
Well majority opinion is also irrelevant, both because it has no basis in determining objective fact, and because there are no objective facts to determine - I'm suggesting a subjective evaluation of the situation at hand, and whether or not using tables would be more helpful than detrimental. If I personally find tables beneficial (profitable, whatever) in a given situation, then 10 million frothing web standards advocates can't change that. -I- still find them helpful, or useful, or profitable.

Much the same as the many people who love the latest X-Factor winner's album aren't going to change the fact that I find it unlistenable.
 
Argument against using any form of table for non tabular data - from a non form of authority - eg Me

Tables are announced in a number of screen readers, so the user can browse through the table, for the results to then not be tabular data is bad accessibility, I for one believe good accessibility is a good thing, users are who I design for, all users need accessible websites.

The code is no easier, I can apply vertical alignment css to any object, not just tables, and this works in ie6/7 as long as I put a container div around it. So I can re-use this code, without putting in large amounts of bloat into the html, after all, caching dynamic content is a bitch, isn't it, while caching css is much more understandable.

Ignoring users, and concentrating on money, I know I'd prefer to hire someone who sticks to an industry standard than someone who doesn't, semantics are great, no matter what you say about them being set by some anonymous authority, it's a committee, this usually makes it alright, oh and they are constantly being revised.

Any other issues you want me to go over?

Granted you won't change your ways, granted they aren't "wrong" as you don't care for semantics, but it's bad practice and I urge anyone reading this to learn other methods because it's better than using bad technique - (just because it's 'easier')!
 
It's not that I hate standards and don't want to use them. It's just the issue I described before. How often do I vertically centre something? Not that often. So when I return to a rare project where I've done it, I'm not going to intuitively understand and remember how the solution you posted works without reading (about) it again. For me it's just not feasible to do when I don't have a lot of time. Much faster for me to just see a table with vertical-align set.

If I have the time I do it right, yes, but mostly because of the nature of what I do right now I can't justify it.
 
But web standards isn't about you, that's the whole point. It's about what's best for the community.
You and Jaz have the same problem, you sit in your own misguided and close-minded bubbles, producing code fit for only yourselves. This is the opposite of what web standards (which can only ever be a good thing) promotes.
Sure it works for you, but what about the next person?

I don't know how many times I need to say this: always build like you're working in a team, even when you're not.
 
Harry said:
But web standards isn't about you, that's the whole point. It's about what's best for the community.
You and Jaz have the same problem, you sit in your own misguided and close-minded bubbles, producing code fit for only yourselves.

I produce standards compliant code when I can.

It would be nice to act like some kind of artist who is coding for the sake of coding, but that's not the case in many situations for many clients. They want fast turnaround times and etc, which is much easier to give if you break a few rules. In this case, for the client and for me providing the client, tables (and other such things) make the goal more achievable.

If the client values that more than screenreader users (for instance), it's their business.
 
Hay just so you don't think I'm running from an argument, I mean please easy responses, but I've had one hell of a stressfully day at work, 30mins talking to a women about her CMS not working when it was, one of the sites went down, client changing his mind after its been coded, one of the devs computers getting a painful virus and taking it totally out of action, first day in charge of the office while both bosses on hol so it's of coarse going to go down the toilet typical!!! and that was before my packed out days work load so not in the mood for a debate right now, but thought I would check in none the less. :mad:

@Levi
The full version of Opera doesn't default to mobile versions of sites.

Anyhoo I'll check back in a day or two, like the way it's going, allways, well not tonight, lol, up for a good debate. :)
 
Status
Not open for further replies.
Back
Top