Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Feb 2003
    Location
    Miami. Fl.
    Posts
    47
    Thanks
    1
    Thanked 0 Times in 0 Posts

    DIVs are the word?

    I know that TABLES are outdated but why?

    What made DIVs overcome TABLE layouts?

    Somebody please explain why...

  • #2
    Banned
    Join Date
    Feb 2011
    Posts
    2,699
    Thanks
    13
    Thanked 395 Times in 395 Posts
    Using semantically correct elements (whether they are <div>, <ul>, <dl> or whatever) for layout and css for styling should result in much leaner, flexible and easier to maintain layouts than if using tables, especially nested tables.

    Code with tables and/or nested tables can very quickly become very bloated and so consequently more error prone and it can be difficult to make subtle or even large adjustments to the layout.

  • #3
    New Coder
    Join Date
    Feb 2003
    Location
    Miami. Fl.
    Posts
    47
    Thanks
    1
    Thanked 0 Times in 0 Posts

    DIVs are the word?'

    Ok. But what are "NESTED TABLES" ?

    Please advise...

  • #4
    Banned
    Join Date
    Feb 2011
    Posts
    2,699
    Thanks
    13
    Thanked 395 Times in 395 Posts
    tables within tables.

    Code:
    <table>
         <tr>
               <td>
                       <table>
                              <tr>
                                    <td>This cell is in a nested table</td>
                              </tr>
                        </table>
               </td>
         </tr>
    </table>

  • #5
    Regular Coder
    Join Date
    Jul 2011
    Location
    India
    Posts
    496
    Thanks
    3
    Thanked 57 Times in 56 Posts
    Following are some links for Why we should use DIVs with CSS for layout instead of using tables for layout:

    http://www.hotdesign.com/seybold/

    http://www.inspiredbuddy.com/xhtml/w...leless-layout/

    http://en.wikipedia.org/wiki/Tableless_web_design

  • #6
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Quote Originally Posted by andilcho View Post
    I know that TABLES are outdated but why?

    What made DIVs overcome TABLE layouts?

    Somebody please explain why...
    As has been mentioned, there are significant improvements to page size (and bandwidth usage and page load times) as well as making content and structure changes MUCH easier to carry out. SEO results are supposed to be better with divs than with tables, also.

    But beyond performance and maintenance improvements by moving to div-based layouts, there is also significant improvement in accessibility of websites for people who are visually impaired and need to use screen readers.

    The most popular link to pass around for asking why table-based layouts are a bad thing is this one right here:

    http://www.hotdesign.com/seybold/
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting


  •  

    Posting Permissions

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