Tables?! Don't be a div.

MattEvans MattEvans is offline Offline | Sep 9th, 2006, 12:19 am |
0
For some reason, it's fasionable to abort tables even if a good situation exists for their usage. When did this happen? I like tables, and I don't think they should be overlooked.

Most of the time, I create my pages with a huge table holding everything together. Sure, I could fight with DIVs and the annoying difference in their representation on different browsers, but I'd rather not. I'd rather use a big table, and I know my table will appear (almost) the same everywhere, when I do (almost) anything to it.

The reason I say this, is the number of sites I find in my google bounces, advocating DIVs as the way to lay out a site. Sure. If you want to make static pages containing information, they provide a way of some interesting effects, but it's certainly amusing that most of the biggest advocates of whom I've read code have nested their DIVs in a way that would be frankly un-interperatable if they ever want to make a change in something. At least with tables you don't need to practically print out your CSS to be able to read your HTML.

I use DIVs, where it's appropriate, and I use TABLEs, when I know I need tabular layout; and I don't mean restricted row-cell datasheets, but whole pages where I know the top banner should be this big, the sidebanner should be this big, and the middle should be this big. Sometimes, I nest my tables.

Each to his own I suppose, but I don't like this ganging-up on an element, based on the way it is supposed to be used. This is exactly what happened to FRAMEs, and look where they ended up. FRAMEs worked for a purpose, and nothing actually does what a frame does, except rewriting the entire concept, and calling it something else. Fair enough, it's a limited purpose, but now, those who regard themselves as "web-savvy and modern" would (apparently rightfully) scream if they saw one.

I like the idea of the diversity of the Web. I don't like the idea of (widely spoken) rules about how things should or shouldn't be done. I appreciate accessibility standards, but not style standards, or even the idea of "the standard usage of a website".

In conclusion.. whatever. :lol:
Quick reply to this message  
0
cscgal cscgal is online now Online | Sep 9th, 2006
I'm afraid I have to disagree with you. I am one of those ultra CSS advocates. The freedom of keeping style and content entirely separate entities! To be able to change the whole look and design by just changing the CSS. Plus it makes for better crawlability by search engines, and you can't fight that
 
0
kub365 kub365 is offline Offline | Sep 9th, 2006
I think table's have a use. Ifyou want to quickly put up data and have it displayed properly in the least amout of time, i would go with a table.

Creating a table format in CSS is no easy task.

As dani said CSS has it's benefits. Ease of design changes and better for crawlability.

+ / -
 
0
cscgal cscgal is online now Online | Sep 9th, 2006
Oh c'mon, CSS is easy The two column layout here on DaniWeb is pure CSS, and never had a browser compatibility problem.
 
0
kub365 kub365 is offline Offline | Sep 9th, 2006
Change your username from CSCGal to CSSGal
 
0
cscgal cscgal is online now Online | Sep 9th, 2006
haha
 
0
MattEvans MattEvans is offline Offline | Sep 9th, 2006
You can't keep style and content separate with JUST CSS. The order of elements is always important to a degree. If you have to change just ONE tag in HTML, you fail to keep the two separate

I find editing HTML/script to edit layout and CSS to edit the style of the layout more intuitive. Infact, I generate my HTML from XML, and there needs to be a defined way of things appearing in the right place. DIVs -but- only if their in table cells for me

Because of that (XML source), my new site won't even be interperable by search engines O_o

Check out the beta though; I'll admit, the style is lacking:

http://www.fusiongroupuk.com/fuse/data/index.xml

(username: guest/matt, password: password/password)

XSLT forever!
 
0
cscgal cscgal is online now Online | Sep 9th, 2006
Ah, but that's the point of absolute positioning with CSS You can reposition elements on the page, change their order, etc, without touching the XHTML. Hence the power of CSS
 
0
MattEvans MattEvans is offline Offline | Sep 9th, 2006
Aah but with that, things stick all over the place (how do you measure relativity to text?), and it doesn't pertain to consistency on every screen at every size (think handheld devices), and it leaves CSS files as huge lists of where's thats, which is surely what HTML is (or maybe was) for. I'm optimising my site's underlying structure to be easily editable by people other than me, (don't know how well that's gonna work) but I'd still rather keep my tables, and I'd still rather keep my CSS to a list of colors and (maybe) some floats.

Maybe, I'll change my mind by the time I've finished, but it hasn't happened yet, and I maintain, tables do what they should, and shouldn't be automatically dismissed.

Still, good design Dani. Did you build everything we see here? I like the style or I probably wouldn't be here.

Matt
 
0
Phaelax Phaelax is offline Offline | Sep 9th, 2006
I'm gonna have to agree with the author and say tables is generally the way to go. DIVs cause more problems than its worth. With tables, I have a nice layout that views the same across every browser. With DIVs, I could spend an hour and have a different effect in every browser. Not necessarily a problem with the DIV tag, I know its all the browser incompatibilities, but until all the companys can agree on standards (and actually adhear to them) I'll stick with tables.
 
 

Message:


Thread Tools Search this Thread



Tag cloud for Upcoming News Stories
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC