Tech Off Thread

9 posts

TABLE design to CSS?

Back to Forum: Tech Off
  • dstoltz

    Hi All,


    I've been doing web design for years, and finally taking the plunge into CSS for layout, as well as style. I've always used tables for layout because I was frustrated with all the CSS issues with different versions of IE, Netscape, etc....

    So, I'm now using DIVS for my layouts with CSS styling, and I have one question:

    ---- is it still ok to use TABLES within my DIV tags for more complicated structures? For instance, if within one of my DIV tags I need to put a registration based form, with several rows and columns....I would still use a table for this, no?

    It seems too complicated to use CSS DIVS for all those rows and columns....again, this is new to me so be gentle....

    My assumptions are: use CSS DIV's for the major layout structures (heading, content, left column, right column, footer), and the styling of course...but I'm assuming it's still OK to use tables within - since after all, that's what tables were meant for.....?

    Any advice appreciated.

    Thanks!

  • figuerres

    well the general thing i have read and agree with is that a "Table" is for tabular data...

    I recently did a form style thing that I may use for data entry forms to not use tables for that.

    it's styling the html tags 
     <fieldset> ... </fieldset> and             <legend>... </legend>
    it can make a very nice clean form, no tables but laid out well.

    i say work at it, set a goal of no tables unless it's for data rows and just figure you might need to do several layouts to get the skills.
    css and html layout are good for some things but i wish they did a few things better...
    but then html was not built for applications, nor was css
    I am thinking of seeing if I could do more of an app in silverlight, ditch 80% or 90% of the html
    and do most of the app in xaml / silverlight....


  • stevo_

    No its not really ok, table element is for tables of data, not tables of layout. It's certainly doable using the right elements and style.

  • foreachdev

    stevo_ said:
    No its not really ok, table element is for tables of data, not tables of layout. It's certainly doable using the right elements and style.
    Take a look at what this sites spits out as a starting point:
    http://layouts.ironmyers.com/

  • dstoltz

    foreachdev said:
    stevo_ said:
    *snip*
    Take a look at what this sites spits out as a starting point:
    http://layouts.ironmyers.com/
    Awesome site - thanks!

    Stevo - I think it's debatable....I understand your point - but it comes down to how far down the rabbit hole one wants to go Wink

  • W3bbo

    figuerres said:
    well the general thing i have read and agree with is that a "Table" is for tabular data...

    I recently did a form style thing that I may use for data entry forms to not use tables for that.

    it's styling the html tags 
     <fieldset> ... </fieldset> and             <legend>... </legend>
    it can make a very nice clean form, no tables but laid out well.

    i say work at it, set a goal of no tables unless it's for data rows and just figure you might need to do several layouts to get the skills.
    css and html layout are good for some things but i wish they did a few things better...
    but then html was not built for applications, nor was css
    I am thinking of seeing if I could do more of an app in silverlight, ditch 80% or 90% of the html
    and do most of the app in xaml / silverlight....


    figurres: CSS can be used for applications. Firefox and Thunderbird's chrome UI is all done in XUL which uses CSS for laying out elements.

  • Cupiditas

    CSS is amazingly powerful, moreso in its as yet unpublished third iteration.

  • figuerres

    W3bbo said:
    figuerres said:
    *snip*
    figurres: CSS can be used for applications. Firefox and Thunderbird's chrome UI is all done in XUL which uses CSS for laying out elements.
    Personal Point of View, may not be valid, may not appeal to others but my POV is this:

    HTML and HTTP are ok for what they were designed to do,  show documents / content and link documents / content.
    but they are far from perfect for good LINE OF BUSINESS apps.

    things like session, cookies, viewstate, client script, server code and many of the kinds of visual UI that business foklks want together with the html and css model make it at times a very ugly beast to tame.

    there is a point where I wish I could give all my clients something more like a windows forms app but with the ability to run on many kinds of machines and with minimal install.

    Silverlight just might work, seems to have a layout and skinning model I can work with and seems to have a decent framework.
    I have not yet done a "real world" app so I might be way off on this train of thought...
    but it looks like it might be a winner.

    note also that I seperate "Web Sites" as general use for the public at large
    and "App" as a body of work that has a set of clients who pay for it and demand specific features be built.
    often it is secured to only be used by a limited userbase and is critical for the business.

    WebSItes == 95% html and css
    Apps == what makes it work, whatever that is.....


  • joechung

    Don't use tables if you can help it.  That being said, CSS isn't perfect, not by any stretch of the imagination, especially given IE 6 and IE 7's out of date implementations of CSS.  IE 8 is better in that regard, though also not perfect.  Unfortunately, there are bugs that afflict all versions of IE and not other browsers.  Tip to the IE team:  do more rigorous testing of right-to-left layouts.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.