Results 1 to 16 of 16
  1. #1
    Join Date
    Dec 2001
    Location
    Arizona
    Posts
    550

    Tables or CSS for forms?

    I've been working on converting my site from a table based layout to using CSS. I am still using tables for tabular data but was curious if it's generally acceptable to use tables for my forms? It just seems easier to line everything up.

  2. #2
    Use lists and labels if you're worried about alignment. If you want multiple columns, set them up with divides. You can define how they should look in your CSS. Tables would be 'incorrect' for this. HTH
    ServeYourSite
    Web hosting done right
    ██ Shared, Reseller and Dedicated web hosting
    An Easy Web Presence Company

  3. #3
    Join Date
    Jun 2006
    Posts
    1,027
    Tables! eeek!
    Dont even go there!

  4. #4
    Join Date
    Aug 2005
    Location
    Barcelona, Spain
    Posts
    3,397
    Quote Originally Posted by djorgensen View Post
    Tables! eeek!
    Dont even go there!
    PLEASE explain to me, backed up by statements found on the net through official ways, that tables for forms are bad. You should really stop parroting your mates. Forms are tabular data and therefore they SHOULD BE in a table.

    you honestly have no clue.


    Quote Originally Posted by Equentity - Pauly View Post
    Use lists and labels if you're worried about alignment. If you want multiple columns, set them up with divides. You can define how they should look in your CSS. Tables would be 'incorrect' for this. HTH
    Tables would be 'correct' for this, since you can 'Tab' through forms, its tabular data.
    hi there!

  5. #5
    Join Date
    Jun 2006
    Posts
    1,027
    You dont need tables, to make a layout. as Equentity - Pauly said you can use a list.

    If you're going to use tables all it demonstrates is you cannot use real XHTML. Most of the attributes people use with tables were long ago Deprecated.


    Heres a list of why not a table:


    Tables are usually more bytes of markup.
    (Longer to download, and more bytes of traffic for the host.)

    Tables are usually slower to layout for the browser.
    (Takes longer for the user to see anything on the page.)

    Tables usually prevent incremental rendering.
    (Takes longer for the user to see anything on the page.)

    Tables may require you to chop single, logical images into multiple ones.
    (This makes redesigns total hell, and also increases page load time [more http requests and more total bytes].)

    Tables break text copying on some browsers.
    (That's annoying to the user.)

    Tables prevent certain layouts from working within them (like height:100% for child elements of <td>).
    (They limit what you can actually do in terms of layout.)

    Once you know CSS, table-based layouts usually take more time to implement.
    (A little effort up-front learning CSS pays off heavily in the end.)

    Tables are semantically incorrect markup for layout.
    (They describe the presentation, not the content.)

    Tables make life hell for those using screen readers.
    (Not only do you get the other benefits of CSS, you're also helping out the blind/partially-sighted. This is a Good Thing.)

    Tables lock you into the current design and make redesigns MUCH harder than semantic HTML+CSS.
    (Have you seen CSS Zen Garden?)


    you honestly have no clue.
    Sound like a flame but to be frank im not the one suggesting using something amateurs use!

  6. #6
    Join Date
    Feb 2006
    Location
    top: 50px; left: 200px;
    Posts
    213
    Wow people get so irrate about tables in mark-up, personally I think that tables do still have their place in html mark-up and can easily work hand in hand with css and strict mark-up if used correctly. If I have a page dedicated to say hosting plan data then I am going to use a table to lay that data out. As for forms I do understand what the OP is saying about its easier to layout a form with tables because of the uniformity but you can achieve that in other ways albeit a little more involved. Not sure if forms fall under the description 'Tabular' .?
    Filefeed.net - Image Hosting -

  7. #7
    Join Date
    Jul 2004
    Posts
    337
    Quote Originally Posted by amygdela View Post
    Tables would be 'correct' for this, since you can 'Tab' through forms, its tabular data.
    I don't think that tabular data means you can "tab" through it. It's more like data on spreadsheets..
    W3C recommends to "Use FIELDSET to group form controls into semantic units and describe the group with the LEGEND element." and to "Use tables for tabular data and describe the table with CAPTION." in html 4.01.
    As you can see, they make a difference between form elements and tabular data.

    And there's help on how to better align form elements.
    My woman left me..
    I've got no website..
    I've got no money..

  8. #8
    And there's help on how to better align form elements.
    That link is OK, but I don't understand why on earth they use <span class="label"> when they could simply use <label> and style the tag.

    Also for clarification, the misconception that tables make it hell for those using assistive technologies is amusing, but make no mistake, a properly formed, semantic table will not inconvenience. Only tables for layout. Also, using CSS doesn't mean you're helping those with disabilities either, you can still make obtrusive websites with the implementation of CSS. Following Accessibility guidelines is what helps disabled users.

    @djorgensen - I think you probably knew this, but a lot of others who don't read these posts too, so it's for their benefit
    ServeYourSite
    Web hosting done right
    ██ Shared, Reseller and Dedicated web hosting
    An Easy Web Presence Company

  9. #9
    Join Date
    May 2004
    Location
    Pflugerville, TX
    Posts
    11,222
    Indeed, tables are not "bad" or "good." They are just an element. They are either "used properly" or "misused." When tables are used to structure a page or site, they are being musused. When they are used to present information that could only make sense when presented using a tabular relationship, that's when tables are being used properly.

    Hosting plan data is a perfect example of content (not layout) that should be in a table.
    Studio1337___̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡ ̡͌l̡̡̡̡.__Web Design

  10. #10
    Well, I find its the balence of what you have in the site.

    For forms, I always use a small table which lets me align everything well (and less code awkard code which IE will have a fit over), also when i'm spitting stuff out of a database.

    However, as people have said, other elements are faster for the user to load etc, so I agree with the_pm.

    Thats my two cents

  11. #11
    Join Date
    Sep 2005
    Location
    Middle England
    Posts
    918

  12. #12
    Join Date
    Mar 2008
    Posts
    45
    i have seen many persons advocating the quality and reliability of CSS. I myself use Tables and would prefer to use it in future, but will definitely use css/div whenever i will need to position something on the page. No doubt css/div provides some excellent features but i think Table should the first preference in page design because it gives you a solid page layout.

  13. #13
    Quote Originally Posted by hamdusa View Post
    i have seen many persons advocating the quality and reliability of CSS. I myself use Tables and would prefer to use it in future, but will definitely use css/div whenever i will need to position something on the page. No doubt css/div provides some excellent features but i think Table should the first preference in page design because it gives you a solid page layout.
    I disagree, and it also inconveniences a lot of people who use assistive technologies, and based on 'you never know which of those visitors will be your best customer', I think it's wise to follow Accessibility guidelines and do your best to exclude as few people as possible.

    The spec is quite solid, as is laying out pages with DIV's controlled by CSS. There's nothing I can think of, that you can do with tables for layout than cannot be replicated accessibly.

    There's many more advantages for using the technology 'properly', check this link out http://www.hotdesign.com/seybold/
    ServeYourSite
    Web hosting done right
    ██ Shared, Reseller and Dedicated web hosting
    An Easy Web Presence Company

  14. #14
    Join Date
    Sep 2000
    Location
    Alberta, Canada
    Posts
    3,109
    Forms - Tables or CSS

    Everyone will have to agree that to each their own.

    Personally, I see nothing wrong with using Table code for Forms. What I don't agree on is not using Accessibility coding within any Form code. This site (http://realworldstyle.com/forms.html) is a good example of bad form code for accessibility.
    PotentProducts.com - for all your Hosting needs
    Helping people Host, Create and Maintain their Web Site
    ServerAdmin Services also available

  15. #15
    Join Date
    Sep 2004
    Location
    Chennai , India
    Posts
    4,608
    CSS gives your more control to your design and page. The only problem is maintaining it to fit different browser versions.

  16. #16
    Join Date
    Dec 2001
    Location
    Arizona
    Posts
    550
    Quote Originally Posted by Equentity - Pauly View Post
    There's many more advantages for using the technology 'properly', check this link out http://www.hotdesign.com/seybold/
    Thanks very much for that link, it was very informative.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •