|
|
Post a Project »
Find a Professional HTML Freelancer!
Find a Freelancer to help you with your HTML projects
| |
|
|
View Poll Results: Which one is better?
|
|
CSS (div)
|
  
|
14 |
87.50% |
|
Tables (table|tr|td|th)
|
  
|
2 |
12.50% |
Which do you like better?
04-27-2007, 06:37 PM
|
Which do you like better?
|
Posts: 83
Name: Colin
Location: USA
|
Ok, heres my question.
Which do you like to use better?
CSS (divs) or Tables (table|tr|td|th)
Why am I asking? Im still not sure which one I prefer. Tables are what Im very used to, and they are easier crossbrowser, but divs are so much more powerfull and customizable. Currently I just use both. Whats your take?
__________________
Please login or register to view this content. Registration is FREE | Freelance PHP solutions for small to midsized projects | Please login or register to view this content. Registration is FREE
|
|
|
|
04-27-2007, 07:05 PM
|
Re: Which do you like better?
|
Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
Why should it all be white or black !?
Man, sometimes this "get ride off all the tables" is really bothering me...
Use table to present datas who have a meaning in tables.
Like a feature matrix.
And leave all the rest in the proper (x)html tags.
div, span, ul/li etc, etc, etc...
I can understand why a form is in a table, if the use of the table is only to structurate the datas.
So, neither your 2 options are ok for me.
I'd choose either both or none.
Go baby, hit me !!
I'm ready for the hell's flames to come for not wanting the tables to die....

__________________
Only a biker knows why a dog sticks his head out the window.
|
|
|
|
04-27-2007, 07:49 PM
|
Re: Which do you like better?
|
Posts: 10,017
Location: Tennessee
|
Tables don't have to die, they are proper for tabular DATA. What must die is tables for LAYOUT. They are not meant for layout, they never were.
My sig says it all .. I don't need to vote in any poll.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
|
|
|
|
04-27-2007, 07:52 PM
|
Re: Which do you like better?
|
Posts: 554
Name: Danny Angelosanto
|
Always followed the Lady's example on this one - divs are the future!
HATE table layouts!

__________________
"Those who believe in telekinetics, raise my hand."
-Kurt Vonnegut
_____________________________________
|
|
|
|
04-27-2007, 11:12 PM
|
Re: Which do you like better?
|
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
|
tripy those of us who want to be rid of tables mean just what LadynRed said. No tables for a page layout. Tables should be used for tabular data.
It's not about getting rid of tables. It's about using them the right way.
Danny I'd say css and divs are the present. I know I haven't coded a site with a table layout in about 4 or 5 years.
|
|
|
|
04-28-2007, 04:45 AM
|
Re: Which do you like better?
|
Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
|
I learned on tables, and this forum weaned me of a bad habit. The latest site I'm putting together doesn't use a single one of them. The content is all text and photo, so there's really no need for all that messy table/tr/td code.
The present is about tables and CSS coexisting, but divs give you a lot more flexibility. If used well, you can make a site that's as close as possible to resolution independent. It's getting more and more common to find resolutions from around 320x200 on a cell phone up to several million pixels on a photo-editing display. The way people are using the internet is going to keep diversifying, and most of the newest users access the net via cell phones.
So if we're going to ask the magic 8 ball, I'd say converting a CSS/div site to the new standard in 10 years will be faster/easier than converting a table site.
Last edited by ForrestCroce; 04-28-2007 at 04:51 AM..
Reason: clarify
|
|
|
|
04-28-2007, 04:55 AM
|
Re: Which do you like better?
|
Posts: 56
|
css here. I never did like tables from the very start.
Here's good articles about tables and css -> here.
|
|
|
|
04-28-2007, 08:30 AM
|
Re: Which do you like better?
|
Posts: 554
Name: Danny Angelosanto
|
Quote:
Originally Posted by vangogh
Danny I'd say css and divs are the present. I know I haven't coded a site with a table layout in about 4 or 5 years.
|
Yeah, good point. The last time I created a website using tables it was a school project 
__________________
"Those who believe in telekinetics, raise my hand."
-Kurt Vonnegut
_____________________________________
|
|
|
|
04-28-2007, 07:48 PM
|
Re: Which do you like better?
|
Posts: 3
|
Quote:
Originally Posted by Angelosanto
Yeah, good point. The last time I created a website using tables it was a school project 
|
I like the tables.
More reliable, like sort of a hand made things
:::::::::::::::::::::::::::::::::::::::::::.
< removed>
Last edited by chrishirst; 04-29-2007 at 06:26 AM..
Reason: link drop removed. Create a signature
|
|
|
|
04-29-2007, 02:56 PM
|
Re: Which do you like better?
|
Posts: 2
Name: Atnon
|
Whoa! Noob here. Just started learning all this stuff and tables seem easy... Guess I should google for CSS-based layout tutorials, huh.
Thanx a bunch!
</slightly off topic>
|
|
|
|
04-29-2007, 03:31 PM
|
Re: Which do you like better?
|
Posts: 83
Name: Colin
Location: USA
|
Quote:
Originally Posted by LadynRed
Tables don't have to die, they are proper for tabular DATA. What must die is tables for LAYOUT. They are not meant for layout, they never were.
|
I definitly agree with this position. I use tables for content display, and divs for layout. There are, however, times when I find myself just using tables in the layout to have better cross browser display. Most browsers are better with displaying tables the same way. Often times padding, margin, and border properties are displayed differently in different browsers. I found a great site for this:
http://browsershots.org/
__________________
Please login or register to view this content. Registration is FREE | Freelance PHP solutions for small to midsized projects | Please login or register to view this content. Registration is FREE
Last edited by phpknowhow; 04-29-2007 at 03:35 PM..
|
|
|
|
04-29-2007, 09:11 PM
|
Re: Which do you like better?
|
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
|
CSS is a lot more consistent across browsers than most people think. Yes there are some differences, but as you code with it more you'll understand what they are and it becomes trivial to have a page look the same.
CJ it's more that different browsers have different defaults for things. Maybe Firefox decides a certain element should have 10px of padding while IE decided that default should be 20px. If you explicitly set the padding the 15px then both will respond.
When it comes to lists FF and IE disagree by default what creates the indentation. One uses margin and the other padding. I always forget which is which, though I I know LadynRed will know. But when I create a list I set both margin and padding to 0 and then add back one or the other or both to get the spacing I want.
Easiest isn't always best. The easiest way to make a web page would be to start with the basic html shell and then simply type your text somewhere inside the body and not even worry about any html elements. The page will look pretty bad, but it's easy.
CSS does have a learning curve, but I've yet to see anyone who's put in the time (which is less than you think) to learn it ever saying tables are better. The only people I've ever seen saying to use tables are the ones who haven't bothered to learn how to do things with CSS.
|
|
|
|
04-30-2007, 03:23 AM
|
Re: Which do you like better?
|
Posts: 121
Name: Ared
|
CSS much better to me but i do use also table it depends on the needs of the site.
|
|
|
|
04-30-2007, 03:26 AM
|
Re: Which do you like better?
|
Posts: 274
|
CSS ftw!
|
|
|
|
04-30-2007, 03:28 AM
|
Re: Which do you like better?
|
Posts: 84
Location: Brussels, Belgium
|
Like I posted in the other topic:
I've been looking at lots of sites and I still have seen much pretty sites in tables, frames etc... All my sites were made in tables, because I learned making sites in tables and frames from the beginning, years ago. And because I don't change the layout afterwards, only content, I don't have to learn new stuff like DIV's... I guessed.
But everybody on this board is telling me: "learn div's" ... so maybe I'm going to try learning it too. (the only problem is my lack of time, lots of other stuff to do, I spend 2 hours a week on my computer lately)
Actually, it's all for the visitors and users that we make websites.
Visitors DON'T see that it's made in tables or div's. It's only usefull for the maker of the site.
I'm going to make the website first in tables (cause it's almost finished) and than in div's. Just to learn how those things work.
But, there are a little few things about div's. Most div sites put their navigation and content in one page. All content pages with the navigationlinks in the same .html file.
So if they have to change one single link in the navigation, all the content pages have to change! It's NOT well done, isn't it. If you have frames for your navigation, you just have to change it for one page.
So maybe it's better to use frames for you navigation + div's in the content. Or PHP, most flexible for content.
Those div's are good for changing easily your style/design... but NOT better for content. And if you make one design and you keep it like that, than there is no need for div's. Only when you change your style frequently it's usefull.
|
|
|
|
04-30-2007, 05:41 AM
|
Re: Which do you like better?
|
Posts: 169
|
Bulevardi, I only have one file for my navigation. PHP include all the way.
Obviously I prefer my XHTML+CSS combo to table based layouts. And again, the user can notice if it is a table based design or CSS. How you may ask now. Speed. That simple. The user downloads the CSS file once, and since there are no bulky elements inside of the XHTML file, that size is smaller than a comparable table based one. So users who have data transfer limits save money. The web hosting also becomes cheaper and less real bandwidth traffic is generated.
That was the first reason I switched to my XHTML+CSS love, the money saving.
__________________
George Bush would never take me alive.
|
|
|
|
04-30-2007, 06:04 AM
|
Re: Which do you like better?
|
Posts: 84
Location: Brussels, Belgium
|
Quote:
Originally Posted by MJM_RDS
And again, the user can notice if it is a table based design or CSS. How you may ask now. Speed. That simple. The user downloads the CSS file once, and since there are no bulky elements inside of the XHTML file, that size is smaller than a comparable table based one. So users who have data transfer limits save money. The web hosting also becomes cheaper and less real bandwidth traffic is generated.
That was the first reason I switched to my XHTML+CSS love, the money saving.
|
Well, i'm not so sure about that.
In the article that jo_cstd posted, i read:
Quote:
|
Another odd point that Andy Budd raises is that a CSS designed page can be just as heavy, if not heavier than a page with tables. His reasoning is that because you have all of the site styles in one file and that needs to be downloaded first (which will usually be when the user visits the home page), this CSS file could actually be quite big (containing much more than the styles needed for the homepage) and so the design is top-heavy. But if it were the case that the CSS file became so large that it impeded download time in this manner, why are all of those styles in one file? You aren't limited to one CSS file and you shouldn't use one CSS file if there are substantial parts of it suitable only for particular sections.
|
besides... I use CSS for my tables.
Each table can have a css class. It's the same as each div has a css id.
If I want to change colour/background-image of each table of the website, I do that once in one css file.
I'm not against div's. I just haven't worked with it, yet.
I'm just looking for pro's and contra's. Both method's have p&c's I noticed. Mostly with browser compatibility.
It just depends what site you're making. If you have to change style lots of times or content lots of times or both.
I'm just learning what techniques are possible and most handy to use. We all want the most easy way, but I'm just not often busy with making websites.
Anyway, there're lots of topics here about that. Maybe we have to make a sticky of this one?
Last edited by Bulevardi; 04-30-2007 at 06:09 AM..
|
|
|
|
04-30-2007, 08:45 AM
|
Re: Which do you like better?
|
Posts: 169
|
You seem to not understand what you posted. The quote from the article, it proves my point. Just looked at the article, why are you ignoring the very important example right after? It further proves my point
Code:
In my experience, from developing pages for small brochure type sites through to vast database driven, multi-section systems I have never come across a single case where the entire homepage (that's including the necessary CSS file) is heavier than a table-based equivalent. Those table, tr, td tags take up a LOT of space and in practice a CSS layout slashes file sizes.
Now I didn't need to google all to long for this, but I found the article again. Read part one and two.
You should use CSS for your tables, but nonetheless, all the tags that tables need add a lot of weight. As written in the article. And I believe you could make a CSS-driven site heavier than a table-driven one, but only if your an idiot and ignore the fact that properties are sometimes inherited...
CSS+XHTML is very compatible, maybe not with the really old browsers, say Netscape 4, but with everything new. With CSS you can create a page that works on mobile phones with ease, whereas tables just **** up. Always. Changing style lots, easily done with CSS (assuming you have the files split up and commented properly) and as far as editing contents, just as easy because have the tags that are the mess that table-based designs leave behind are gone.
I don't want the easiest way. I want the best way. The ebst way by far is CSS+XHTML, it just happens to be easy as well.
__________________
George Bush would never take me alive.
|
|
|
|
05-01-2007, 06:11 AM
|
Re: Which do you like better?
|
Posts: 84
Location: Brussels, Belgium
|
Ok, i'm trying to learn some div stuff, but it's not looking that easy, my pages are always going the wrong direction!!
So... how do I make one page with 4 div columns aligned like this:
Code:
<center>
<table width="100%" height="100%">
<tr>
<td width="*"></td>
<td width="100"></td>
<td width="300"></td>
<td width="*"></td>
</tr>
</center>
so the 2 centered columns always have to stay in the middle with people who have higher screen resolutions etc...
I don't want the 2 middle div's to start from a specific point with a marge-left or something like that.
Last edited by Bulevardi; 05-01-2007 at 06:15 AM..
|
|
|
|
05-01-2007, 09:07 AM
|
Re: Which do you like better?
|
Posts: 58
Name: Bryan
Location: Wisconsin
|
By far it is CSS. Tables are so difficult to work with. Tables are for tabulated data, thus the name.
|
|
|
|
|
« Reply to Which do you like better?
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
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
|
|
|
|