SitePoint Sponsor |
|
User Tag List
Results 51 to 72 of 72
Thread: Tables vs CSS design
-
Jan 11, 2009, 19:10 #51
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
-
Jan 11, 2009, 19:17 #52
- Join Date
- Nov 2008
- Posts
- 138
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Could you explain why not use css for tabular data?
Will tables actually render faster? The difference in code size should be negligible as well.
(Not defending myself, just curious for the future)
-
Jan 11, 2009, 20:32 #53
-
Jan 11, 2009, 23:31 #54
- Join Date
- May 2006
- Location
- Aurora, Illinois
- Posts
- 15,476
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Save the Internet - Use Opera | May my mother rest in peace: 1943-2009
Dan Schulz - Design Team Advisor | Follow me on Twitter
SitePoint References: HTML CSS JavaScript | Become A Guru
WordPress SEO Checklist | What WordPress Plugins Do You Use?
Web Standards Curriculum | Image Free Equal Height Columns
-
Jan 12, 2009, 00:40 #55
-
Jan 12, 2009, 01:34 #56
- Join Date
- Jan 2009
- Posts
- 29
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
CSS for sure. They contain less code, easy to maintain and improves loading time.
top 10, top ten, top 10 lists, top ten
Top 10 about everything (Under construction, in beta phase)
I WOULD LOVE YOUR THOUGHTS ON IT
-
Jan 12, 2009, 01:37 #57
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
I agree with you. You shouldn't be thinking about how the content should look/sound until you have created the content. After all the content needs to work for any media and as soon as you start thinking appearance you will be thinking of a particular media. If you absolutely can't let go of the appearance while producing the content then think web reader and write the content the way you want it read out when the device the person is using to 'view' your site is a set of speakers.
Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
-
Jan 15, 2009, 19:38 #58
- Join Date
- Jan 2009
- Posts
- 1
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
This one of the better discussions I've seen on this topic, so I decided to jump into the mix. Also, I apologize for not reading every single post if I repeat something that already been said.
I've seen quite a few arguments for css-based design that focus on ease of site maintenance and layout changes. Basically stating that if you change the stylesheet, those updates are seen in all pages that use the stylesheet. But what about the curious case of MVC (Model View Controller) site programming? When you build a site using MVC, a change to a single View will be seen in all pages that load this view. In this case it doesn't matter if you've designed the view using tables or css. You change one file to effect many pages on the site.
Thoughts? I welcome your opinions on this. I've really been going back and forth with tables versus css. The accessibility deal is really the only pure win I see for css. Table-based layout is much more cross-platform and cross-browser consistent. I spend quite a bit of time tweaking my css to ensure that it loads properly on the various flavors of IE (6, 7, and 8 are all out there in large numbers) as well as Safari, Firefox, Opera, and Chrome. I can lay it out once with tables, and I know its going to look the same in all browsers on all operating systems.
Then there are the long pages with lots and lots of content. I think that's a bad design, I try to avoid forcing the user to scroll at all if I can. But long pages happen. This is a win for css too. You've got to load the entire table before any of it is drawn on the scree, where css can draw as it loads. So perceived load time for a page can be much faster with css layout on long pages.
Again, thoughts please!
Aloha,
Colin
-
Jan 15, 2009, 22:30 #59
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
There is also the case of usability. With CSS you can have separate designs for handheld, screen, print, web reader, braille etc. If you were to use tables then the same page layout is used for all of those even though it really only works for one or two of them leaving the people using the other devices with a jumbled mess.
Another aspect not affected by your suggestion is that using tables will mean that your HTML is not as descriptive of what it contains as it would be if you wrote semantic HTML around your content. It will therefore rank lower in the search results than it might if it used more appropriate HTML.
While it may not make a great difference depending on internet connection speed, using tables usually means larger HTML files than you'd have without the table and the common CSS file only needs downloading once whereas the table needs to be downloaded in each page. Pages using table therefore would download slower than pages using semantic HTML.
There are lots of reasons for using semantic HTML and CSS rather than tables and not just the one that your suggestion overcomes.
The other consideration is that once people stop using IE6 and IE7 the CSS table commands will be able to be used to do table layouts for web pages (all commonly used browsers except those two support CSS tables). That would have all the benefits of using semantic HTML and using tables since your layout table is defined once in the CSS.Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
-
Jan 29, 2009, 03:19 #60
- Join Date
- Jan 2009
- Location
- Scotland
- Posts
- 11
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Tables where designed in html to hold data. CSS is a freeer (dont know if i should have put in 3 E's there but there in) design tool/language what ever you need to call it and is designed to be used for layouts. Tables are good for beginners who need to get used to how a site should look and to quickly grab the concept of website design but the end result will be limited in comparison to CSS.
-
Jan 29, 2009, 16:59 #61
The bottom line is that until IE renders the same as the other browsers then tables will be used for layout. css with tables is a good compromise unless you want to live on forums asking dumb questions about why your div is floating over something else in IE.
Example today, I was tweaking a script on my site and whoever wrote it cobbled together a huge mesh of divs that linked to over 30 style values. I tried to do it right for half an hour, and then screamed "why am I bothering!" bunged it in a couple of nested tables an bang! It was layed out fine....and I went on to have a productive day.
-
Jan 29, 2009, 17:00 #62
-
Jan 29, 2009, 19:48 #63
- Join Date
- Jul 2006
- Location
- Augusta, Georgia, United States
- Posts
- 4,194
- Mentioned
- 17 Post(s)
- Tagged
- 5 Thread(s)
Originally Posted by felgall
-
Jan 29, 2009, 19:56 #64
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
A version of IE was released in 2001 that does that. The only reason for retaining tables at that time was that Netscape 4 doesn't render the same. Once Netscape 4 and IE5 ceased to have significant numbers of users any excuse for using tables incorrectly disappeared. IE6 is as capable of rendering pages correctly using CSS as any other browser. Admittedly there are a few commands that it doesn't support but then tables don't support those things either.
As long as your page starts with a valid and complete doctype the corrections for IE6 are minimal and they'd still be there if a table were used.
In fact using a table for layout is the easiest way to break the page layout for the most browsers. It is ompossible to get the page looking the same across more than a small fraction of browsers by using tables.
Some people just don't want to learn how to use a hammer (CSS) for knocikng in nails (layout) when some other tool such as a plane (tables) can be used to bash it in instead.Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
-
Jan 29, 2009, 20:00 #65
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
You mean IE5, not IE6 since IE6 supports the standards quite well enough to make tables for layout completely unnecessary. It actually took about 4 years after IE6 was released for Netscape 4 and IE5 use to fall to the point where that utopia you mention was reached - back in 2005.
Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
-
Jan 29, 2009, 20:56 #66
- Join Date
- Jan 2009
- Location
- Portugal and Czech Republic
- Posts
- 35
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Good morning. I do prefer work with tables. Reasons? Probably none that you (guru's and etc) will recognize as valid:
1) My first approach to CSS regarding layout design was traumatic, a few years ago, with the browsers rendering in diferent ways and positions.
2) Tables do the work. What I want is a website done. I recognize value in some (or most) of the reasons mentioned for using CSS. Although I don't recognize they are so important that I can afford to learn CSS now. Some other, like the SEO, I don't accept at all. I saw CSS pages with hundreds of lines of preparatory non-content CSS. What was that about, of pulling relevant content to the top?
3) My dear tables are not so mean as most of you describe. They take a few tens of second extra to load (render)? Most probably. Nothing that a common (or most of uncommon) web user will notice. They take some extra Kb? Oh yes. Again, nothing that a common (or most of uncommon) web user will notice. Or for most situations, not noticeable in the bill regarding bandwidth.
4) Still, excluding a few top-notch cases, CSS based websites are of arguable visual quality. Ah yes... hundreds of thousands of table based are like that too. But I'm thinking about professional work, hoping that none of you have the idea of saying that who works with tables is not professional. And anyway, this is my opinion, it's personal, don't have pretensions to be of any value so I don't really feel the need to provide a solid support to these impressions.
Well... I could write a little more, but it's late, I'm sleep, already in bed, and I'm going to the land of dreams right now :-)
"Tables where designed in html to hold data."
Oh and the World Wide Web was designed to hold text, or little more.
-
Jan 29, 2009, 22:45 #67
- Join Date
- Nov 2008
- Posts
- 172
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
3) My dear tables are not so mean as most of you describe. They take a few tens of second extra to load (render)? Most probably. Nothing that a common (or most of uncommon) web user will notice. They take some extra Kb? Oh yes. Again, nothing that a common (or most of uncommon) web user will notice. Or for most situations, not noticeable in the bill regarding bandwidth.
Oh, but this is not even really why CSS is better. Not even the 'ol "Tables where designed in html to hold data.". No my friend. It comes down to the work involved. Original design and re-design is cut way way way down, once of course you know it's ins and outs. But also among a few other small reasons, that escape me right now, because I am also tired. Tired as in I need to sleep, and also tired as in I wish threads... oh so many threads like this would just finally die. Someone please make a 'sticky' with pros and cons and lets move on with our lives. Its 2009, how long have these been popping up in forums, and how much longer must it go on?
-
Jan 29, 2009, 23:53 #68
- Join Date
- Jul 2006
- Location
- Augusta, Georgia, United States
- Posts
- 4,194
- Mentioned
- 17 Post(s)
- Tagged
- 5 Thread(s)
The only people who support non-semantic mark-up are those stuck in the past and those to lazy to keep up with the industry. A key indicator of credibility that you truly understand the difference is that you talk about semantic vs. non-semantic mark-up rather then tables vs. CSS. Its not about tables or CSS its about creating semantic mark-up - period.
-
Jan 30, 2009, 00:22 #69
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
Even worse are those who talk about tables vs divs - those are the people who generally catch divitis.
Let's hope that IE8 comes out soon and all IE users upgrade because the we can tell people that if they want a table layout then they should be using CSS tables and not HTML tables.Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
-
Jan 31, 2009, 20:04 #70
- Join Date
- Sep 2008
- Posts
- 40
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It is my understanding that CSS is preferred to tables because of two main factors:
1. Speed, a CSS page is processed faster.
2. Ease of changeability, when you need to change a design feature it only needs to be changed in the .css page rather than every table on every page.
-
Feb 1, 2009, 02:11 #71
- Join Date
- Sep 2005
- Location
- Sydney, NSW, Australia
- Posts
- 16,875
- Mentioned
- 25 Post(s)
- Tagged
- 1 Thread(s)
The main reason is that HTML is supposed to semantically define what your content is and CSS is supposed to define how your page looks when displayed using one of a whole range of different devices. Using HTML tables for layout creates a jumbled mess in web readers and braille printers for example.
Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
-
Feb 1, 2009, 03:09 #72
- Join Date
- Feb 2005
- Location
- from Madrid to Heaven
- Posts
- 8,271
- Mentioned
- 252 Post(s)
- Tagged
- 1 Thread(s)
I am everything but a guru, and yet I find your reasons non valid
That's why we all need to learn and learn well. Trying once is not enough
Semantic markup and CSS do the work, and it is easier and quicker to maintain.
Maybe you need to learn how search engines work and read pages to understand why it is better to put your CSS in a external file.
In a more than competitive web world, every milisecond counts and it is necessary. It doesn't only help the user, but yourself. You need to pay your hosting for bandwith or speed... if you save a few kbs here and there will help you to keep your cash in your pocket and to serve more users which at the end of the day is cash in your pocket too. Let's say that you only save 1 kb using CSS. Still, if you have 1000 visits, that's 1000 kbs saved... Almost 1 MB. If that MB was in excess of your bandwith, you'd be paying quite a bit of money to go over your bandwith. How silly is that?
Of course that someone that uses tables for layout is a non-professional, no matter how much he earns or how many years he's been doing the same. Why? Because even if his desings are of the best quality, he got stuck and didn't evolve. In this business like in any other business, if you don't evolve, you are left behind. He's only saved because most customers don't have a clue about web and they don't care. If customers were a bit more educated, he'd probably would have changed his mind long ago and ditched tables in his layouts.
Also, there are great designs in CSS too. I agree that because you use CSS, your design shouldn't be rubbish.
People that get stuck and doesn't want to improve because what they use works don't impress me much.
Bookmarks