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.

Why I don't like tables

Discussion in 'HTML & Website Design' started by J.D., Jan 5, 2005.

  1. phrozen_ra

    phrozen_ra Peon

    Messages:
    147
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #41
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head><title>DIV Test</title><style type="text/css">
    div {line-height: 1.5em; height: 2em;}
    div.c1 {border: 1px solid green; height: 200px; width: 400px; margin: 0; }
    div.d1 {border: 1px solid red; width: 40%; height: 100%; float: left;}
    div.d2 {border: 1px solid blue; width: 40%; height: 100%; float: right;}
    </style></head><body>
    <div class="c1">
    <div class="d1">d1</div><div class="d2">d2</div>
    </div>
    </body></html>
    
    Code (markup):
    That should work fine... and about the amount of work.... some would say they don't understand tables and say they are able to do it faster with CSS

    I can do it faster with tables... (using notepad)

    But I guess in the end.... the standard will go as a combo with tables and divs... each serving it's best purpose
     
    phrozen_ra, Jan 13, 2005 IP
  2. daamsie

    daamsie Peon

    Messages:
    237
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #42
    sorry, I was away for a few days, so haven't had a chance to answer; I never claimed my site was compliant. It's a rather large site to maintain and i"ve only recently started validating pages, so it's no great surprise that a page doesn't validate yet ;) Still, I don't blame the browser if it screws up due to my mistake - I'm happy to blame myself!

    I don't bother with Opera. I have played around with what you describe, but I think it's only on PC's they offer this functionality and as I usually use my mac for developing / testing, it has little point.
     
    daamsie, Jan 14, 2005 IP
  3. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #43
    Somehow I didn't see your post. Sorry.

    Floats are rather a neat workaround if you use div's as menus or sidebars. Say, if there are three floats, one left-aligned and two right-aligned, closing the gap between them will require a bit more work (as well as managing margins, paddings and border widths).

    Precisely. BTW, the standard is already a combo :)

    J.D.
     
    J.D., Jan 14, 2005 IP
  4. pinkpanther

    pinkpanther Peon

    Messages:
    72
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #44
    How interesting I found this post.

    First of all, I'd like to address the original question. "Why I dont like tables?" My answer is, I love using tables, tables rule even though you have a lot of nested tables. I never had any problem nesting tables. They are easy to work with and pretty much output as expected most of the times. Like J.D, I have always used the combination of tables with css. And I agree with J.D. in that, css makes my life much easier.

    Now, I must say when I first saw the thread, I also thought it was a topic to discuss table layout vs div layout. Sorry people do assume.... and I am a programmer so I always make assumptions... ;) I guess another reason why I made that assumption was because I have been working on converting my table-layout pages to div-layout pages for the whole week this week.

    In my case, I WAS trying to replace my tables with divs. The reason why I even had that idea was flexibility. With absolutely positioned divs I can order my content any way I want within my html, which I dont think can be achieved with tables. Also it takes less characters to make a div than it is to make a table so it is cleaner and your html can be rendered faster. I also am not a css expert. It took me a while but finally I came up with a header-footer-2 column layout using divs only where the two columns' length will always match. The left column is my nav menu, the height pretty much stays the same. It is the right column(main content) that will vary from page to page.

    So for a moment I thought hey its not all that hard, got 3 of my pages converted and they all looked good in IE6 and NN7. Just to test some more, I tried out my test pages in NN6. Darn, what happened?? My layout is all messed up.

    Considering the number of browsers out there, new browsers in the future, and different versions of each of these browsers, I am not sure if the benefits of using div-layout can justify the efforts to make them work across browsers. I understand you can detect user's browser and use style accordingly, but that is just too much work vs using tables.

    At this point, I am staying with tables. I do wanna hear from those who prefer divs over tables, how do you do it? I would love to be convinced, seriously... :)

    I know this is kinda long, thanks for reading, look forward to hear from others.
     
    pinkpanther, Jan 21, 2005 IP
  5. Solicitors Mortgages

    Solicitors Mortgages Well-Known Member

    Messages:
    2,217
    Likes Received:
    139
    Best Answers:
    0
    Trophy Points:
    103
    #45
    QUOTE
    <With absolutely positioned divs I can order my content any way I want>

    if you use absolute position and someone selects 'text size larger' for easy viewing,
    doesn't the absolute position bit explode all over your content?

    not sure about this as i have never used absolute positioning on anything,ever.
     
    Solicitors Mortgages, Jan 21, 2005 IP
  6. pinkpanther

    pinkpanther Peon

    Messages:
    72
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #46
    Very good observation ;)

    From my tests, it actually will just make the column longer, and since, as i have mentioned, the two columns length always match, so it is not really a problem. What COULD be a problem though, is when you have a string of characters that are too long ie an url that has no space and hence cannot be wrapped, that will definitely mess up the layout. But I am pretty sure the same will happen with tables.

    Again, I am not a css expert. I have tested my pages many times but I did not say I have fully tested the pages. As soon as I see how my pages look like in NN6, I have not touched them since... As I said in my previous post, I am not sure if it is worth the effort. I spent almost 2 days just to come up with a div layout that finally worked(at least in IE6 and NN7 hehehe), I dont even need 2 minutes to create the same effect with tables.
     
    pinkpanther, Jan 21, 2005 IP
  7. pctraffic

    pctraffic Peon

    Messages:
    18
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #47
    Tables go hand-in-hand with CSS. Here's the CSS chapter on tables:
    http://www.w3.org/TR/REC-CSS2/tables.html
    In HTML4 all HTML formatting is depreciated in favor of CSS.

    To me css just complicates tables

    I like tables :) :)
     
    pctraffic, Jan 21, 2005 IP
  8. da22in

    da22in Peon

    Messages:
    42
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #48
    I agree...CSS and Tables are complimentary. CSS cannot do everything yet, but the 3.0 standard will move it closer. I do page layout and structure with tables, handle formatting of text with external CSS.

    I consider myself a CSS newb...it's still foreign to me, I hit reference material constantly when working with it. The "class" attribute is a wonderful thing. :)
     
    da22in, Jan 23, 2005 IP
  9. maverick

    maverick Peon

    Messages:
    1,191
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #49
    I try to use combination of tables & CSS mostly, which helps with gr8 extent.
     
    maverick, Jan 23, 2005 IP
  10. Briank

    Briank Peon

    Messages:
    109
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #50
    I prefer to use a mixture of CSS and tables. I cannot stand frames :)
     
    Briank, Jan 24, 2005 IP
  11. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #51
    I agree (I do use iframe sometimes, though). The only thing that bothers me about no-frames HTML is that the target attribute in <a>'s is valid only in the frameset DOCTYPE and not in strict. So, the following is not valid HTML strict:

    <a href="..." target="_blank">...</a>

    J.D.
     
    J.D., Jan 24, 2005 IP
  12. patidarvijay

    patidarvijay Peon

    Messages:
    96
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #52
    most of the search engines don't like table structure.
     
    patidarvijay, Apr 19, 2011 IP
  13. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #53
    1. So what you use to show large amount of tabular data?
    2. How did you get to conclusion that Search Engines doesn't like table structure?
     
    radiant_luv, Apr 19, 2011 IP
  14. c4cyber

    c4cyber Well-Known Member

    Messages:
    1,025
    Likes Received:
    24
    Best Answers:
    1
    Trophy Points:
    140
    #54
    why u dont' like tables? i use tables in admin panels or newsletters. its easy way to do things
     
    c4cyber, Apr 19, 2011 IP
  15. chanhtong1

    chanhtong1 Guest

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #55
    using the table make time load a page is slower than using div, i think it
     
    chanhtong1, Apr 20, 2011 IP
  16. sugandp

    sugandp Guest

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #56
    I use layers. i think nested tables creat confusion. so pls avoid it.
     
    sugandp, Apr 20, 2011 IP