1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

CSS vs. Tables: What's the Benefit?

Discussion in 'CSS' started by sjaguar13, Nov 5, 2005.

  1. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #61
    I'm surprised you thought I was critisizing you. I was neither critisizing nor arguing, actually - merely sharing experience (read my last reply to you, really).
     
    J.D., Nov 24, 2005 IP
  2. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #62
    Layout dictates the tools and table-less designs may be better suited for some layouts and table-based for others. It makes no sense to talk about the same page designed using both approaches and comparing the results.
     
    J.D., Nov 24, 2005 IP
  3. submitter999

    submitter999 Well-Known Member

    Messages:
    261
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #63
    css processing time much faster, no need to edit main pages (outside control).control over complete page at a single space. tables can't give all these features.
     
    submitter999, Nov 27, 2005 IP
  4. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #64
    Ok, I'm going to summarize it for everybody, so people wouldn't post comments like the one above.

    1. There is no such thing as CSS vs. tables. Tables are perfectly stylable with CSS. What people mean when they say CSS vs. tables is table-less layout (a.k.a CSS) vs. table-based layout.

    2. Table-less layouts offer, just as Feel described earlier in this thread, complete independence of some layout elements from others (mostly absolutely-positioned elements, though). Because of this independence, absolutely-positioned div's may be moved around the page using CSS styles. Example of such layouts: www.csszengarden.com, www.live.com

    3. Table-based layouts offer a grid-like structure when adjacent cells must be aligned as rows and columns. Example of such layouts are forum pages, just like this one.

    4. A lot of people do not realize that unless absolutely-positioned div's are used, table-less layouts are often less flexible than table-based layouts. For example, it is trivial to make N-column table-based layout that fits any page width because tables, by design (according to both, HTML and CSS specs), can be stretched easily, even if their width/height are set. Layouts based on floats are usually fixed in width because this is the easiest (and often the only) way to make the middle column fill nicely the space between the left and the right columns.

    5. Both table-based and table-less layouts may be styled using CSS in an external stylesheet file, so perfromance-wise both types will take similar time to process.

    The bottom line is - do not commit to a no-tables-under-any-circumstances approach, but do not abuse tables. If all you need is a bunch of menu items on a vertical menu, a bunch of div's will stack up nicely for you. On the other hand, if you need a horizontal menu with a few left/right floats and the outer div is too short and you have to come up with tricks to stretch the outer div and it just clutters your layout, look into using a table - you will save yourself a lot of time.

    J.D.
     
    J.D., Nov 27, 2005 IP
  5. FeelLikeANut

    FeelLikeANut Peon

    Messages:
    330
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #65
    Let's all thank J.D. for his biased and inaccurate summary. Now we've got to start this crap up all over again so people are not misled by his "summary".

    1) It doesn't actually have anything to do with your second point. 2) If this were true, so? 3) It's actually wrong. Float is the primary mechanism for manipulating how elements are laid out. Absolute positioning is used on occasion where it is necessary/useful to do so, but is certainly not how most elements are laid out. Many sites are able to avoid absolute positioning entirely.

    Because of this independence, CSS layouts (not just absolutely positioned DIVs) allow for an entire site consisting of hundreds or thousands or more pages to be entirely altered without ever having to edit those thousands of pages. Tables lock you in to a layout. You can't change a table-based layout (which requires altering the order of rows and cells) without going back to modify those thousands of pages one at a time. In addition to completely breaking the semantics that HTML is meant to describe.

    Also http://www.hewlett-packard.com for another example.

    And cars offer an opportunity to move at 100+ MPH. Just because you can do something doesn't mean you should or that it is even a good idea at all. Using a table purely for aesthetic purposes, such as layout, is incorrect. They makes your pages less adaptable to future change and less readable to a wider audience. Tables were never meant to be abused for layout and doing so is explicitly discouraged by the inventors of HTML.

    The opposite is true. J.D., if you have trouble using CSS for layout then you need to learn and practice more. Do not pass your failed attempts off as fact.

    Like your absolute positioning statement, this is also wrong. You noted the csszengarden earlier. Notice there is no fixed width. The layout flows with the browser size. Having a fixed width column is the result of a design choice, not coding difficulties. There are a great many table-based sites that use fixed width columns, and a great many CSS-based sites that flow with the browser size, and vice versa.

    We (I) have never asked for the former, only the later. In the rare circumstances that we have plainly said "do not use tables" it is because we have already established that the discussion is about layout.

    You just said not to abuse tables, now you recommend that people do just that.

    BTW, horizontal menus are actually very easy. By your description of them it sounds as though you have had troubles getting them to work nicely for you. As I said earlier, just because you have troubles does not mean the language is at fault. Practice a little more, ask for help when you need it, and you'll see just how simple this can really be.
     
    FeelLikeANut, Nov 28, 2005 IP
  6. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #66
    J.D., Nov 28, 2005 IP
  7. stuw

    stuw Peon

    Messages:
    702
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #67
    Seperate your design from your content, and your pages can become super seo friendly. Use a cms system based round css and new sites become very quick to make.

    Also if your concerned about accessability issues css is the way to go.

    It may be more complicated and time consuming at first. But now I try and make all my sites in css, and check to see how they work with out the style sheet - the aim for me is to make visually appealing websites that don't rely on design / visual cues for navigation - that way if I do need to upgrade them to be (UK dda compliant for example) it's not a huge job.
     
    stuw, Nov 28, 2005 IP
  8. FeelLikeANut

    FeelLikeANut Peon

    Messages:
    330
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #68
    Firstly, very nice job at avoiding any and all facts that relate to the current debate and instead resorting to a smear campaign. Secondly, simple? I can only assume you have continued your tradition of not reading. The whole situation was caused by rendering bugs in various browsers. So, naturally I asked around to see if the bug had already been discovered and a workaround already thought up. In the first case I found the bug and the workaround myself. In the second case someone else clued me in to the workaround. The only thing this tells you is that I am not above asking questions when I don't have all the answers.

    Now, what does this tell you about all the information in this thread? That's right; absolutely nothing. Are any of the points I made invalidated? No. Are any of the points you made validated? No. Your post is just a meaningless waste of time.
     
    FeelLikeANut, Nov 28, 2005 IP
  9. Dreamshop

    Dreamshop Peon

    Messages:
    1,026
    Likes Received:
    84
    Best Answers:
    0
    Trophy Points:
    0
    #69
    >> Tables lock you in to a layout. You can't change a table-based layout (which requires altering the order of rows and cells) without going back to modify those thousands of pages one at a time. <<


    There are a lot of design and/or cms programs available that make it quite easy to change designs based on tables. If you're creating a site that requires editing every single page by hand then that's just plain silly. I think you both have made very valid points (in some cases multiple times) Maybe it's time to 'agree to disagree'? Discussions with varying viewpoints is what makes the world interesting. :rolleyes:

    While I'm happy to chant CSS with y'all I do have clients whose main customer base use older browsers. Even if it's a small percentage, it's damn important to take into account if those 10% are your top purchasers.
     
    Dreamshop, Nov 28, 2005 IP
  10. blackwind

    blackwind Peon

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #70
    CSS is absolute heaven to update. You can change the entire design of a site without touching the html. CSS eve sounds cool. Say it with me C...S...S !
     
    blackwind, Nov 28, 2005 IP
  11. smashingjay

    smashingjay Peon

    Messages:
    27
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #71
    I thought the J.D. post was out of line and unrelated to the thread. If you want to try to discredit people, I think Equifax is hiring -- otherwise why not be respectful?

    I know a hell of a lot about web development. There is even more I don't. When you have nothing left to learn you are either dead or lazy. Ask stupid simple questions. Make mistakes and guesses -- it puts you closer to success.
    If you waste time ranting against someone no one benefits. In fact on many threads moderators will kick people off or suspend accounts for OT flames and attacks.

    I came to this forum, as I do all forums, to learn and contribute -- be part of a community.

    To everyone on this thread -- all the best,

    Jay
     
    smashingjay, Nov 28, 2005 IP
  12. stuw

    stuw Peon

    Messages:
    702
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #72
    C S S - Mmmmmmm :D

    Oh, and you other two - handbags at dawn!! Ooooooooo
     
    stuw, Nov 29, 2005 IP
  13. Shodan5

    Shodan5 Guest

    Messages:
    53
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #73
    CSS great design!!!

    Tables good for database data!!!!!
     
    Shodan5, Dec 5, 2005 IP