Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   HTML / XHTML / CSS (http://www.programmingforums.org/forum27.html)
-   -   Div vs Table Layouts - Your opinion (http://www.programmingforums.org/showthread.php?t=14773)

MiKuS Dec 19th, 2007 4:38 PM

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.

grimpirate Dec 20th, 2007 7:31 PM

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.

Jimbo Dec 20th, 2007 8:28 PM

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.

Ayyash Dec 26th, 2007 10:21 AM

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

titaniumdecoy Dec 26th, 2007 11:13 AM

Re: Div vs Table Layouts - Your opinion
 
Quote:

Originally Posted by Ayyash (Post 138733)
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 (Post 138733)
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.

cscgal Dec 26th, 2007 12:43 PM

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.

LOI Kratong Dec 26th, 2007 12:56 PM

Re: Div vs Table Layouts - Your opinion
 
Quote:

Originally Posted by titaniumdecoy (Post 138735)
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.

funcravers Dec 26th, 2007 1:45 PM

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.

MiKuS Dec 26th, 2007 4:28 PM

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.

Kuryn Dec 26th, 2007 11:07 PM

Re: Div vs Table Layouts - Your opinion
 
div's are used for layouts, tables are used for data.


All times are GMT -5. The time now is 12:38 AM.

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