 |
|

05-12-2011, 05:42 AM
|
|
Banned
|
|
Join Date: 03-10-11
Posts: 8
|
|
|
Div Tags or Tables?
What according to you is more better and easy, code using div layouts or tables layouts for designing. Please share your opinion...
|

05-12-2011, 06:00 AM
|
 |
Member
Latest Blog: None
|
|
Join Date: 10-28-09
Location: Paris (France)
Posts: 45
|
|
|
Html tables should be used for displaying structured data.
Div tags are much more powerful to format an HTML page!
|

05-12-2011, 07:26 AM
|
|
The Controversial Coder
Latest Blog: None
|
|
Join Date: 05-01-06
Location: Manchester; UK
Posts: 2,374
|
|
|
If you use tables for things other than tabular data which they're meant to handle, then you're using them wrong. Tables are not there to lay-out your website if it's not a tabular-data website. Also this discussion has been had literally a hefty-amount of times on V7N, try using the search function before posting the same question's again, and again.
|

05-12-2011, 07:28 AM
|
 |
Contributing Member
|
|
Join Date: 03-01-11
Posts: 83
|
|
|
Many times what is easy is not better.
With table it's easier, but with DIV tags is better.
|

05-12-2011, 07:38 AM
|
|
The Controversial Coder
Latest Blog: None
|
|
Join Date: 05-01-06
Location: Manchester; UK
Posts: 2,374
|
|
|
Do you have any conclusive proof that 'table-layouts' are easier than 'div-layouts'? I would find doing a 'table-layout' more difficult because it's using tables for something which they aren't used for by me, and it's illogical to use them for what they're not supposed to be used for (to me).
|

05-12-2011, 10:31 AM
|
 |
Super Moderator
|
|
Join Date: 10-29-07
Location: British Columbia, Canada
Posts: 18,104
|
|
|
I prefer CSS layouts because you can move blocks whereever you want by changing the CSS.
With table layouts
-you have to redo the pages if you want to make a major layout change.
-people tend to nest tables within tables too much
If you must use tables,
-They were meant for data not layouts
-Just do the basic layout (header, nav column cell, content cell and footer) then format the content in the cells with CSS to reduce coding bloat
Don't know why so many like tables. I personally find them a pain to work with.
|

05-12-2011, 11:29 AM
|
|
Junior Member
|
|
Join Date: 04-23-11
Posts: 18
|
|
|
Isn't page speed with tables slower than with divs?
Also, divs are more flexible and powerful than tables.
|

05-12-2011, 12:25 PM
|
|
The Controversial Coder
Latest Blog: None
|
|
Join Date: 05-01-06
Location: Manchester; UK
Posts: 2,374
|
|
Quote:
Originally Posted by rahulparekh
Also, divs are more flexible and powerful than tables.
|
Proof? Tables are extremely powerful for what they are made for... Tabular data. It's like asking a bloke to do ironing, they can do it, but it's not what they're there for.
|

05-14-2011, 03:28 AM
|
|
Junior Member
|
|
Join Date: 05-14-11
Location: Mumbai
Posts: 5
|
|
|
div increases speed of page loads and also they are easy to maintain than tables.
|

05-16-2011, 12:45 AM
|
 |
Contributing Member
|
|
Join Date: 05-13-11
Location: Surakarta, Indonesia
Posts: 486
|
|
|
Hi, according my experience, div layout is more easily. But tables layouts also not too confused.
|

05-17-2011, 12:53 AM
|
|
The Controversial Coder
Latest Blog: None
|
|
Join Date: 05-01-06
Location: Manchester; UK
Posts: 2,374
|
|
Quote:
Originally Posted by anil.singh
I think HTML Table are easy in use while in div tag we have to call css sheet thru id or class..so using div is bit hectic...
|
HTML Code:
<div class="example"></div>
So we have our DIV set up, with a class name of example. Now lets style it.
HTML Code:
.example {
/* basic properties go here */
}
Whereas, with tables... Which are used to tabular data you would have to have something like this:
HTML Code:
<table>
<tr>
<td></td>
<td></td>
</tr>
</table>
Then, we would style it.
HTML Code:
table {
border: 1px solid #000000;
}
tr {
padding: 0 0 0 0;
}
td {
margin: 0 0 0 0;
}
I know which style I would prefer to write when doing layouts. The examples in my post are extremely basic examples before anybody starts picking them apart.
|

05-18-2011, 10:35 AM
|
|
Junior Member
|
|
Join Date: 04-23-11
Posts: 18
|
|
Quote:
Originally Posted by Dan Williamson
Proof? Tables are extremely powerful for what they are made for... Tabular data. It's like asking a bloke to do ironing, they can do it, but it's not what they're there for.
|
My comment was for people who use tables for layouts. Divs are obviously more powerful than tables. Tables are for tabular data, obviously. So will be extremely powerful.
|

05-21-2011, 01:42 AM
|
|
Member
|
|
Join Date: 05-11-11
Posts: 35
|
|
|
div tag is much better. It allows you to change your website layout better through CSS.
Table is better for displaying tabular data.
|

05-21-2011, 05:49 PM
|
 |
Junior Member
|
|
Join Date: 04-17-11
Posts: 20
|
|
|
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.
|

05-24-2011, 01:03 AM
|
|
The Controversial Coder
Latest Blog: None
|
|
Join Date: 05-01-06
Location: Manchester; UK
Posts: 2,374
|
|
Quote:
Originally Posted by GasArts.com
when you use divs you use CSS.
|
I'm not too sure about you, but when I need to use a bunch of data that fits into a table, I don't just use the standard ugly tables, I format my tables with CSS. So really, this point is actually not the best. CSS Tables and Tips for Good Looking Tables.
|

05-25-2011, 06:59 AM
|
|
Junior Member
|
|
Join Date: 05-24-11
Posts: 5
|
|
|
For me, I go for divs, tables are only for tabular data,but div is more professional to use when coding your site.Especially to navigation panels,most of the time,they use tables but it unprofessional and it ruins the page then resizing pages.
|

05-27-2011, 03:46 AM
|
|
Junior Member
|
|
Join Date: 05-26-11
Location: Singapore
Posts: 12
|
|
|
Advantages of div:
Lesser code, flexibility--able to move elements around, future-proof?
Advantages of table:
Easier for graphic designers to grasp when switching over from print design
|

05-27-2011, 08:20 AM
|
 |
Super Moderator
|
|
Join Date: 10-29-07
Location: British Columbia, Canada
Posts: 18,104
|
|
Quote:
Originally Posted by themightypurpleknigh
Advantages of table:
Easier for graphic designers to grasp when switching over from print design
|
Why do you think tables are easier for graphic designers to grasp when switching from print design to web design?
|

05-30-2011, 05:10 AM
|
|
Member
Latest Blog: None
|
|
Join Date: 05-25-11
Posts: 31
|
|
|
Today´s web standard are div-tables, so go for it!
|

05-30-2011, 02:10 PM
|
|
Contributing Member
Latest Blog: None
|
|
Join Date: 03-25-06
Location: Galax, Virginia, USA
Posts: 300
|
|
Tutor said: "Don't know why so many like tables. I personally find them a pain to work with." and "Why do you think tables are easier for graphic designers to grasp when switching from print design to web design?"
Tutor, I'm your test subject. I've been dabbling with website design since before gifs could be animated in all browsers, but I only started seriously using CSS this year. I think it boils down to this: - CSS is more powerful. More powerful things are harder to learn because there are more options and more ways to mess up.
- People learn tables before Divs. I learned HTML from a free online primer. I just checked Google's #1 online primer, and it still teaches tables before Divs. I think that outside a formal teaching environment, people will recognize when they know enough to pull off a project and dive in. People don't want to go through the whole primer when they can basically make a good looking website by chapter 2.
In addition, for me, I learned tables more easily because their functionality is very similar to making tables in Microsoft Word and Publisher. Style sheet functionality was much less visible in office software. Did CSS even exist when I learned HTML? The other part of the under-utilization problem may be that people learned to do it a certain way in the early 90's, and we're still out there. CSS advocates usually don't do a good job of explaining to under-utilizers what's in it for them to update and expand their CSS skills.
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 02:01 AM.
Powered by vBulletin Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP
|
|