Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorimsam67
    • CommentTimeApr 6th 2009
     permalink
    Hi,

    We're designing an ASP.NET web application and will have some complex forms. I really want this site to be as perfectly designed as possible so I want to maximize CSS usage. I'm working with an overseas company who's helping me with the CSS design. They just told me that when the form's layout gets complex, it's better to use tables. Here are a few examples of what I call complexity:

    - I want two TextBox'es/Input for phone number, in other words, I want a separete box for area code.
    - There will be cases where there will be a DropDownList next to a TextBox or two. Depending on user's selection, we will display different options, etc.

    My main goal was to handle all forms without using tables and use some very pretty CSS styling on forms. They're telling me that it gets very difficult to keep those input boxes, buttons, DropDownList's lined up nicely as the form layout becomes more complicated.

    Is it advisable to use tables for forms if I want that level of layout complexity?

    Thanks,

    Sam
  1.  permalink
    I'm thinking that the complexity of your form wouldn't require the use of tables. However, doing the form layout inside a table will save you from a lot of testing and trouble in general, if indeed the people you're working with find a CSS-only form difficult to achieve. It might take a day to position all the elements properly with CSS in all browsers, whereas it'll take a couple of minutes using tables.

    But that's just me thinking out loud.
    • CommentAuthorimsam67
    • CommentTimeApr 7th 2009
     permalink
    Kari,

    Thanks for your response. Unfortunately, many times, things seem to get more complex if one tries to handle the layout in CSS. So, I'm beginning to think that CSS is better for styling not necessarily layout.
    • CommentAuthorjusten
    • CommentTimeApr 23rd 2009
     permalink

    This may be too late but I don’t see why css layouts in forms are any more or less complex than other forms of layout. If you go to tables for layout you are trading complexity in stylesheets for complexity in markup, which is never a good proposition. In other words you are solving an easily solved problem in an obtuse way that will lead to many more problems later. Perhaps if you described in a little more detail what makes your forms so complex that you are hesitant to use a css layout people could present some specific solutions for you.

    Personally I’ve designed several forms with multiple columns, different spatial relationships between labels and fields, with and without help text, with help text that appears dynamically based on validation service, using client-side and server-side (via ajax) validation, with UI enhancements such as javascript-powered date picker calendars, etc. I have never thought to myself, “Gee I wish I had just used a table here.” In updates and redesigns I’ve wasted countless hours cleaning out old table markup, work that would have been saved if the layout had been handled by a stylesheet that I could simply discard while preserving the vast majority of the markup. Remember even if you are not doing this cleanup work down the road it’s a hidden cost you’re passing on to your client, and a savvy client should be aware of that. All other things aside, paying me 10 or more hours to clean out all your tables in two years while preserving the content is sure to be more expensive to your client than the extra hour or two that you will charge to deal with a css layout issue.

  2.  permalink
    This is the $64,000 question...tables vs. css.

    The question is...what are you most comfortable with? Also, do you want to learn something new? If you are good at tables, then use tables. Generally speaking though, if you are nesting tables upon tables, you probably would be better served, from a maintainablity standpoint, to use CSS. Also, a CSS designed site can be a beautiful thing to look at when viewing source. Tables get ugly quick.

    I use CSS, but when lining things up JUST right on all the browsers sometimes some not so nice words come out, so I understand why people are hesitant to jump into the CSS waters if they aren't used to them.

    David
    • CommentAuthorjusten
    • CommentTimeMay 8th 2009
     permalink
    I don't think it's a $64,000 dollar question. Unless you stick with tables, in which case yeah you might lose $64k or so in business in the forseeable future :) The industry is changing. It looks like we're sitting on the threshold right now, and that there are significant disadvantages to adapting, but you can ask any of the old film making companies how sticking to what they know worked out for them when digital cameras started hitting the market.
  3.  permalink
    When it comes to designers, we all think it is best to use CSS...but the truth of the matter is, clients don't really care. They just want a site that looks good. If the site looked good but it was built with kumquats and twine, they would be happy.

    Some designers take their preference to the extreme...if you are building a grid, then use a table...that is what they are there for, but some would even advise against that.

    If the OP is more comfortable using tables and he is on a deadline (he didn't say one way or the other), then there is no harm in staying with his preference. When he has time, then he should learn CSS because it really will open up a whole different world.

    David

    P.S. As for using film in movies...Steven Spielberg said they could pry the film out of his cold dead hands...I haven't seen his career hurting. :)
    • CommentAuthorjusten
    • CommentTimeMay 8th 2009 edited
     permalink
    I don't want to turn this into a big argument, but I think you are not seeing the bigger picture. When I talk to prospective clients, especially those who are actively comparing several designers, I spend at least a little time describing the way my work differs from the competition and why, and that includes technology. They don't care much about what HTML tables are or why they're different from CSS layouts until you explain to them succinctly how it will impact their bottom line in terms of cost to maintain, extend, and change. On large, high-traffic sites it also has a substantial impact on bandwidth use and server performance; a stylesheet is downloaded once and can be cached indefinitely, whereas a table structure on a dynamic site will not only take up more bandwidth per layout for most layouts but will be downloaded every visit for every page. These costs add up and a savvy client will understand this, putting a designer/developer who uses archaic methods at a competitive disadvantage both in cost and aesthetics. There is also the issue of accessibility, both for the disabled (which sadly clients rarely care about) and for people who are browsing on mobile devices. A logically ordered page using css layout is always going to be more usable in these sorts of conditions, and there is no way to replicate that ease of access using a convoluted nested table structure short of providing multiple sites based on the client browser.

    There is much more to the equation than just the ease of use for the designer, or which set of quirks and annoyances you find less onerous.
  4.  permalink
    I take your point...most of my clients never ask for those sorts of details so I rarely get into it. I agree with your points (which is why I use CSS). I guess it just depends on your clients whether that matters to them or not.

    At some point you will run into one that knows enough to realize the difference...if they are asking whether you use tables or CSS, there is definitely a right answer to that question. Most just never ask.

    David
Add your comments
    Username Password
  • Format comments as (Help)