Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET
why divs are more preffered than table for designing?
Posted 17-Jan-13 20:38pm
yogika262

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Actually, nobody prevents you from using tables for designing.
 
But common argument is: tables were introduced to provide structure to data. By "providing structure to data", I mean presenting some tabular data, like Excel sheet, for example.
 
Short Answer: current HTML5 standard, it's support across major browsers - allows mastering layout of different complexity without use of tables. Divs - are bricks of the layout - thus it's most reasonable to use them.
 

Long Historic Answer
 
Long time ago, in HTML 3.2 spec
http://www.w3.org/TR/REC-html32.html#body[^] it was mentioned, that [tables] ... can be "used to markup tabular material or for layout purposes". But again, it was recommendation "The wisdom of past experience encourages us to separate the structural information in documents from rendering information. Mixing them together ends up causing increased cost of ownership for maintaining documents, and reduced portability between applications and media"
  Permalink  
Comments
yogika at 18-Jan-13 1:58am
   
actually i want ask that which one solve resolution issues.which is more usefull
Vyacheslav Voronenko at 18-Jan-13 2:00am
   
Definitely Divs are easier to adjust and restyle, but in order to deal with different resolutions - nowadays we use CSS media queries, and keeping font sizes in 'EM's.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 DamithSL 375
1 Sergey Alexandrovich Kryukov 217
2 OriginalGriff 210
3 Peter Leow 135
4 Uma Shankar Patel 80
0 OriginalGriff 7,380
1 DamithSL 5,359
2 Sergey Alexandrovich Kryukov 4,944
3 Maciej Los 4,906
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web01 | 2.8.141223.1 | Last Updated 18 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100