Unstoppable Domains

CSS: table vs div

Spaceship Spaceship
Watch
Impact
19
Hey
Alot of people have told me to use Tables instead of DIVS..what do you think is better?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
I personally like tables more. Up to you though.

Tory
 
0
•••
Would depend on what they are being used for. If for layout: div's ftw. I hate tabled layouts. A table is for data.
 
0
•••
I use a mixture of both.

Skinny
 
0
•••
unknowngiver said:
Hey
Alot of people have told me to use Tables instead of DIVS..what do you think is better?

If those people are talking about using them for data, they're correct.

If they mean using tables for web layouts, they don't know what they're talking about. Tables are way slower when loading, and really should only be used for data that needs to be displayed in a table.
 
0
•••
I used to be a table man, but I've begun using divs just recently and I don't believe that I'll be going back.
 
0
•••
well i am talking about web layouts. Apparently divs have problems in Firefox..anyway I am going to read up on divs now :)
 
0
•••
Tables tend to slow the loading down...tables were never intended to be used to structure a layout, they are there specifically for data.

Div's and CSS is the more suited method as its how it was intended that people would create sites...its faster, cleaner, less code, etc...I would take the time to learn to use Div's and CSS as in the long run, its much more worth it.

Rick
 
0
•••
SecondVersion said:
Would depend on what they are being used for. If for layout: div's ftw. I hate tabled layouts. A table is for data.

I would love to use just pure divs for layout and tables for data (the way it really should be) but divs just are not ready for it yet.

I don't like writing code for each and every damn browser, hacks here and there etc. I love the fluid-ness you get with a table. Sometimes I may want a 3 column layout with each column dynamically matching the height of the column with the most content. Now cleanly achieving that with tabless css is an absolute nightmare. With tables it would take me one simple table.

So i say it really depends on the design. Use the way which would leave you with the cleanest code. There is no need to bend and twist the CSS rules if a simple table can do it (stupid massive borders to get matching left/right column designs).
 
Last edited:
0
•••
CrazyTech said:
I used to be a table man, but I've begun using divs just recently and I don't believe that I'll be going back.

Same here same here. I think div's has a big advantage on tables. It is so much easier to place things where you want them to be. But I think the biggest advantage is that it is so much easier to change something if you feel like your first work wasn't that great.
 
0
•••
There are situations where there's no choice but to use tables for layout - for example, if you're coding HTML emails, where you can't integrate stylesheets or doctypes and can expect any number of different browser/platform/email client combinations.

Or, if you're building anything but the very simplest of sites, need to support lots of legacy browsers and don't have the time/patience/knowledge for making and testing all the cross-browser tweaks. In that case it may be more expedient for you to use tables. Yes, they load slower, yes it's more difficult to control where in the source code your keyword-rich text falls, but neither of those drawbacks is the end of the world.

That said, divs are the "preferred" choice for layout going forward - if you have tabular data, THAT should still go in a table.
 
0
•••
As most have said, using tables for layout is a clumsy hack that used to be necessary but isn't any more. Cross-browser consistency can be tricky, but is perfectly possible in most cases.
 
0
•••
Divs can be used for any type of layout, load faster in all browsers, and are a lot better SEO wise. Tables should never be used for layout purposes.
 
0
•••
thanks everyone :) i have already started looking into DIVS

one more similar question
when making graphics for website..what extension is better...i have seen .PNG [i was recommended to use it] .GIF [see it most often] and JPEG
 
0
•••
PNG is lossless compression, but IE screws up with PNG transparency, GIF is bigger, and IE supports its transparency, but it has no alpha channels, and I would stay away from JPEG, it gets blocky.

Basically, I would use PNG for everything except things that need to be transparent and/or have animation (use GIF for those)
 
0
•••
Hey
my friend doesn't believe me that divs are better for seo then tables..he wants to see "proof" can anyone provide me some sorta proof?
 
0
•••
0
•••
I like CSS because it is more flexible and easy to change.
Also, a page size becomes smaller if you use css.
 
0
•••
unknowngiver said:
Hey
my friend doesn't believe me that divs are better for seo then tables..he wants to see "proof" can anyone provide me some sorta proof?

Neither are better. Why would google check your code and say "right this site uses divs, they must be more relevant for that keyword. Rank them first". It's crazy talk.

A simple search with any popular keyword will yield top ten results with roughly a 50/50 split of div and table designed layouts.

Just use what is best and quickest for you. Divs are becoming a bit of a standard but the fact of the matter is it will make no difference. If your website has accessible good content then who cares if it has been built with divs, tables, flash or even 10 thousand frames.
 
0
•••
Use the tags that were created for what you need. Use DIV for grouping, use lists such as UL and OL for lists (including navigation; it's a list of links), use ADDRESS for your address, use H# for headings, use P for paragraphs, etc. Use tables for tabular data. You can help yourself a lot by reading the html specs (w3.org). An excellent way of writing code is to first write only the HTML with all the proper tags, with semantics in mind, and THEN style with CSS.
 
0
•••
Dynadot โ€” .com Registration $8.99Dynadot โ€” .com Registration $8.99
Appraise.net
Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back