Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

View Poll Results: What is more portable?
Tables 2 20.00%
Divs 8 80.00%
Voters: 10. You may not vote on this poll

Reply
 
Thread Tools Display Modes
Old Dec 19th, 2007, 4:38 PM   #1
MiKuS
Hobbyist Programmer
 
Join Date: Jun 2007
Posts: 133
Rep Power: 2 MiKuS is on a distinguished road
Div vs Table Layouts - Your opinion

When it comes down to positioning, I believe tables are more portable across browsers. Using tables to layout your site (not that i do) generates a lot of extra code but now with faster connections does more code really mean much less performance? taking into consideration how the layout will require minimal browser compatibility patches and most screen readers will still read the content.

My question is why, when you realistically look at tables vs divs, is it more sensible to use tables to layout your site? After all google still uses tables to layout their site.
MiKuS is offline   Reply With Quote
Old Dec 20th, 2007, 7:31 PM   #2
grimpirate
King of Portal
 
grimpirate's Avatar
 
Join Date: Sep 2005
Posts: 431
Rep Power: 4 grimpirate is on a distinguished road
Send a message via Yahoo to grimpirate
Re: Div vs Table Layouts - Your opinion

I've read it elsewhere in the past and all the css gurus seem to agree that divs are what should be used for layouts. Tables should only EVER be used for tabular data. That's what they're for. I used to use tables for everything because they were easy to position without knowledge of css. However, I do realize the benefits of using divs in terms of different style sheets. Just take a look at css Zen Garden. I believe everything is with divs, and therefore, the different styles isn't something you could achieve with tables.
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis
grimpirate is offline   Reply With Quote
Old Dec 20th, 2007, 8:28 PM   #3
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 763
Rep Power: 3 Jimbo is on a distinguished road
Re: Div vs Table Layouts - Your opinion

AFAIK, tables are easier for code generators (i.e. WYSIWYG editors) to get the layout "correct." I use quotes because it may look one way in the editor and possibly another in the browser.
__________________
<insert disclaimer here>
<insert shameless plug for Visual Studio here>
Jimbo is offline   Reply With Quote
Old Dec 26th, 2007, 10:21 AM   #4
Ayyash
Newbie
 
Join Date: Dec 2007
Posts: 3
Rep Power: 0 Ayyash is on a distinguished road
Re: Div vs Table Layouts - Your opinion

in my Blog , I use Div
most of users advised me to use div
it became faster
but as you say
it's suitable for Iexplorer and few - to some extent- browsers
Ayyash is offline   Reply With Quote
Old Dec 26th, 2007, 11:13 AM   #5
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 855
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Re: Div vs Table Layouts - Your opinion

Quote:
Originally Posted by Ayyash View Post
in my Blog , I use Div
most of users advised me to use div
it became faster
Your site is faster because you are using divs rather than tables? I find that doubtful.

Quote:
Originally Posted by Ayyash View Post
but as you say
it's suitable for Iexplorer and few - to some extent- browsers
What the hell does that mean? It is complete nonsense.

Last edited by titaniumdecoy; Dec 26th, 2007 at 11:29 AM.
titaniumdecoy is offline   Reply With Quote
Old Dec 26th, 2007, 12:43 PM   #6
cscgal
Hobbyist Programmer
 
cscgal's Avatar
 
Join Date: Oct 2007
Location: New York
Posts: 163
Rep Power: 10 cscgal is on a distinguished road
Re: Div vs Table Layouts - Your opinion

Most web browsers, most notably Internet Explorer, render div tags MUCH faster than tables. The reason for this is because tables don't render themselves until everything contained within them is loaded, while div tags load their elements subsequently. Therefore, if you have a two column layout set up through a table, when a user loads a page, they're going to see a blank page for a second or two before, suddenly, everything pops into place all at once. If you use div tags to create a layout, each element will pop into place as soon as its loaded, right from the start.
__________________
DaniWeb IT Discussion Community
Everything Information Technology related all in one convenient interactive online publication and community
cscgal is offline   Reply With Quote
Old Dec 26th, 2007, 12:56 PM   #7
LOI Kratong
Professional Programmer
 
Join Date: May 2005
Location: Woo - Boot Sector!
Posts: 294
Rep Power: 4 LOI Kratong is on a distinguished road
Re: Div vs Table Layouts - Your opinion

Quote:
Originally Posted by titaniumdecoy View Post
Your site is faster because you are using divs rather than tables? I find that doubtful.
By using semantic markup (i.e. using tags for what they were designed for) the size of files is much smaller, so the site could be much faster by using divs that tables.

But one better than using divs for layouts is to use proper tags, e.g. paragraphs and stuff. A div is to divide up a page into different segments, not to use as basically a table cell; that defeats the purpose of css, and is just as bad as table layout.
__________________
www.heldtogether.co.uk
LOI Kratong is offline   Reply With Quote
Old Dec 26th, 2007, 1:45 PM   #8
funcravers
Newbie
 
funcravers's Avatar
 
Join Date: Dec 2007
Posts: 5
Rep Power: 0 funcravers is on a distinguished road
Re: Div vs Table Layouts - Your opinion

I like Divs because you can do so much more with them and you can put them really anywhere you want.
funcravers is offline   Reply With Quote
Old Dec 26th, 2007, 4:28 PM   #9
MiKuS
Hobbyist Programmer
 
Join Date: Jun 2007
Posts: 133
Rep Power: 2 MiKuS is on a distinguished road
Re: Div vs Table Layouts - Your opinion

The only reason i use divs is to keep my code tidy, using tables gets confusing once you get past 2-3 levels of nesting..

hopefully soon all browsers can pass the acid 2 test and we can stop discussing how to create cross browser layouts easily.
MiKuS is offline   Reply With Quote
Old Dec 26th, 2007, 11:07 PM   #10
Kuryn
Newbie
 
Join Date: Dec 2007
Posts: 14
Rep Power: 0 Kuryn is on a distinguished road
Re: Div vs Table Layouts - Your opinion

div's are used for layouts, tables are used for data.
Kuryn is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
100% Table Height using Firefox hoffmandirt ASP.NET 2 Jun 23rd, 2006 9:34 AM
mysql table view require()or suggestions. piercy PHP 15 Apr 28th, 2006 6:29 AM
word wrap in a table cell? kerriganm HTML / XHTML / CSS 4 May 6th, 2005 5:38 PM
Table in C language??? Planet_EN C++ 5 Mar 31st, 2005 10:09 AM
Calling a function in a table Navid JavaScript and Client-Side Browser Scripting 2 Mar 11th, 2005 11:09 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:06 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC