Forum Moderators: not2easy

Message Too Old, No Replies

Tables or not for forms layout?

         

fischermx

8:15 pm on Nov 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know why ask here, instead of just make a decision, lol, but it is driving me nuts.
I'm converting an old application that used table to layout label/text-inputs for user data entry.
I know how to do it using the proper tags.
But I still wondering whether to leave them as is, or not... :)
It really bugs me that someone sees my work and consider it inferior due the use of tables here.
But I don't know what the CSS's Gods have to say. :)

jessejump

9:29 pm on Nov 9, 2006 (gmt 0)

10+ Year Member



>>>> It really bugs me that someone sees my work and consider it inferior due the use of tables here.

I'll weigh in. I think it is really up to you - the amount of work involved etc. vs. caring what some er.. person thinks about your page.
I*f things are all accesible etc. I see no problem with keeping the table.

I beleive your question I quoted really is precisely why some people are completely driven to use CSS at all costs even if it drives them crazy. (They wouldn't admit it though.)
In reality, it's a giant WWW out there, nobody really cares about your pages except you.

Geoffrey james

12:09 am on Nov 10, 2006 (gmt 0)

10+ Year Member



I agree,

I've spent hours building pure css forms and although its very satisfying, it can also cause major headaches.

I can code forms from scratch now pretty quick before i even look at what it looks like on screen....BUT i have to admit on doing a site for a client who had ideas she would not budge on (the salmon background with tan inner content and 1 long scrolling page type of client) I decided that I would not waste my time perfecting a form that looks....well rubbish in the colors she WANTS, so therefore I have done what I said i would never and used a table.

so there you have it...i have admitted to being a table user, IM SORRY!

take care guys...Geoff

PS: she LOVES the site, sad! But if the client is happy, they are paying hey.

swa66

12:32 pm on Nov 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think the best argument against using tables is not the purity of CSS and html, not the kick of I can do it, not the need to keep layout and content separated, but that it is the need to keep your site accessible for people not using visual rendering of your page. Tables are hard to grasp for a screen readers as it can't really know what belongs with what, that's why you want your html markup to show it clearly, and then you add css to make it look attractive as a second step.

Doing the layout can be as hard or as easy as you like in css, it all depends on the resulting look you seek.

If you look at html code that nests input fields into the label:

<label>first name<input type="text"></label><label>name<input type="text" /></label>
it becomes much clearer what label belongs with what input as when your put them one next to the other and or start to put them in different cells in a table.

Now you can use constructs like

<label for="user">Name</label> ... <input type="text" id="user">
to link them back together but why make it hard?

For accessibility checks (and a sobering round for many of us I'm afraid, run your page through a validation service for tings like WCAG. While w3.org doesn't offer a validation service, I found one at [hoping it's going to pass the moderators, as it just might not be well established enough]:
[contentquality.com...]
[I'm by no means associated with them, and only found them cause the web master toolbar in firefox uses it.]