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.

<div> or table layout?? which one do you prefer??

Discussion in 'CSS' started by webinventa, Mar 28, 2011.

  1. #1
    Please explain which one you prefer and why? Plz mention advantages and disadvantages
    also
     
    webinventa, Mar 28, 2011 IP
  2. arwen54

    arwen54 Active Member

    Messages:
    632
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    60
    #2
    I like divs, because the code is cleaner, and allows the site to load quicker.
    Plus with divs and css, it's so much easier to make visual changes to the site, by editing one file, the style.css

    tables should only be used for tabular data such as calendars, charts, etc.
     
    arwen54, Mar 28, 2011 IP
  3. DhrubaJyotiDeka

    DhrubaJyotiDeka Well-Known Member

    Messages:
    647
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    105
    #3
    You can do CSS for tables also. All you need to asign the class attribute.
     
    DhrubaJyotiDeka, Mar 28, 2011 IP
  4. Eudemon

    Eudemon Greenhorn

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #4
    if just to divide content into half i use table
    else div, and add float attributes
     
    Eudemon, Mar 28, 2011 IP
  5. Bogdanel

    Bogdanel Active Member

    Messages:
    77
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    65
    #5
    I use just divs for layouts.. and tables just for tabular data... As far as I remember HTML is a language... and we must respect the grammar.. :) So... let's write semantic code.
     
    Bogdanel, Apr 4, 2011 IP
    Silver89 likes this.
  6. WebPageMistakes

    WebPageMistakes Active Member

    Messages:
    91
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    60
    #6
    Divs
    Advantages:
    • Can edite styling in one spot if you use external stylesheet instead of internal stylesheet or inline stylesheet.
    • Saves on web page file size if you follow the above
    • Can move the containers where ever you want with CSS where as with tables you basically have to redo everything.
    • A well thought out CSS design will save on coding in the long run
    Disadvantages:
    • Takes practice to learn how to do a more complex design well with minimal coding
    • You have to understand the principles of CSS (Cascading) so you don't waste hours trying to correct something that is related to cascading.
    • You need to understand that each browser (whether standards compliant or not) interprets HTML elements differently. Generally margins and padding are problem areas for the less experienced as they have problems understanding that each browser and operating system interprets measurements differently.
     
    WebPageMistakes, Apr 4, 2011 IP
  7. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #7
    Tables are far people who don't understand css and/or started coding 100 years ago. I'd be embarrassed to code a site in tables. W3C Code is a must.
     
    Silver89, Apr 4, 2011 IP
  8. ApocalypseXL

    ApocalypseXL Notable Member

    Messages:
    6,095
    Likes Received:
    103
    Best Answers:
    5
    Trophy Points:
    240
    #8
    Div OFC :)
     
    ApocalypseXL, Apr 5, 2011 IP
  9. typingmums

    typingmums Well-Known Member

    Messages:
    1,446
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    140
    #9
    I agree with Silver89 - tables are definitely for those starting out - W3C and Accessibility should always be adhered to :)

    Good luck!
     
    typingmums, Apr 11, 2011 IP
  10. ayekaye01

    ayekaye01 Peon

    Messages:
    214
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Hi!

    I use divs for layouts, images...use table for datas, calendars, using div can make your site load quicker.
     
    ayekaye01, Apr 14, 2011 IP
  11. rahulparekh

    rahulparekh Member

    Messages:
    178
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #11
    Always divs.

    Tables are tedious.
     
    rahulparekh, Apr 15, 2011 IP
  12. ketting00

    ketting00 Well-Known Member

    Messages:
    772
    Likes Received:
    27
    Best Answers:
    3
    Trophy Points:
    128
    #12
    I use table for my user signup page. That's all. It's a lot cleaner than using divs.
     
    ketting00, Apr 23, 2011 IP
  13. Leo Ghost

    Leo Ghost Well-Known Member

    Messages:
    385
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    125
    #13
    I've moved past tables myself, simply for the W3C validation (when selling a service, you must adhere to standards).

    Tables are useful on the rare occasion.
     
    Leo Ghost, Apr 23, 2011 IP
  14. demons-halo

    demons-halo Active Member

    Messages:
    243
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #14
    using div for full layouts is a must, tables can get very messy if you want to do a full layout. plus table coding is gathering dust these days, and using divs is not hard at all, just a few lines of code, anyone here using css3, its powerfull stuff.
     
    demons-halo, Apr 24, 2011 IP
  15. hostingfarms

    hostingfarms Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    div tag is cleaner code than table tag but its pretty tough to grasped div tags , table tag can create confusion or mess but its easy for to apply ...
     
    hostingfarms, Apr 25, 2011 IP
  16. sburst

    sburst Peon

    Messages:
    39
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Couldn't agree more with this statement, tables are way too old school and if you think otherwise then you are simply wrong :) move with the times.
     
    sburst, May 12, 2011 IP
  17. PinoyEngine™

    PinoyEngine™ Well-Known Member

    Messages:
    298
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    145
    #17
    div for design, table for data.
     
    PinoyEngine™, May 12, 2011 IP
  18. GasArts.com

    GasArts.com Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    well, based on personal experience, if you would ask this question to 10 people, 9 of them would choose DIVs.

    using divs give you cleaner code (just div tag plus class), while using tables force you to use <table>, <tr>, and <td> tags. And less code means fast loading pages. Also divs give you one more advantage over tables as when you use divs you use CSS. so assume you wanna change the font, or color, of the whole page, you would need to change only one line in CSS, while in tables you would need to do so several times.

    generally, use the newest method.
     
    GasArts.com, May 12, 2011 IP
  19. smashylee

    smashylee Peon

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    I vote for divs. they are easier to deal with for sure
     
    smashylee, May 13, 2011 IP