HTML <table> tag</table>
-
I was laying out a new control, when my supervisor said that I had better not be using <table> tags to control the layout, since the <table> tag has been deprecated. The data is basically a list of item/value pairs. So, I jiggled around with some CSS and finally got it to look somewhat sensible (except when things in the first column are too wide to fit on one line, and then the layout just goes to Hell). I was always of the opinion that if you're laying out tabular data, that the use of tables is OK. So, should I continue to torture myself with CSS, or do I change it back to table layout? edit: screwed up the HTML formatting options and now my signature is messed up. edit2: Now my signature has completely disappeared. Whatevah...
Welcome to the new 'goto is evil and must be killed' meme. As far as I'm concerned, TABLE is fine for actual tables. TABLE used to be used for page layout which can be now be done with CSS. XHTML 2.0 is probably the most 'out there' of the future directions of HTML - and note that the browser manufacturers aren't working on it at all, they've formed their own group WHAT WG[^] and are developing HTML 5[^]. Nevertheless, XHTML 2.0 will still have a Tables module which will continue to work much the same as HTML 4.0.
DoEvents: Generating unexpected recursion since 1991
-
I was laying out a new control, when my supervisor said that I had better not be using <table> tags to control the layout, since the <table> tag has been deprecated. The data is basically a list of item/value pairs. So, I jiggled around with some CSS and finally got it to look somewhat sensible (except when things in the first column are too wide to fit on one line, and then the layout just goes to Hell). I was always of the opinion that if you're laying out tabular data, that the use of tables is OK. So, should I continue to torture myself with CSS, or do I change it back to table layout? edit: screwed up the HTML formatting options and now my signature is messed up. edit2: Now my signature has completely disappeared. Whatevah...
Most "HTML Programmer" web developers will chant CSS, CSS, CSS, CSS. If you ask me: use tables and move on to the really important stuff. [edit] To clarify: It is possible that CSS is important for your web site. In that case, use it - even if it's harder. I don't know, I am not a web guy, and my designs suck. However, for me, "choosing the right tool" also means "choosing a tool I can use".
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighistmodified on Wednesday, July 30, 2008 4:58 PM
-
I was laying out a new control, when my supervisor said that I had better not be using <table> tags to control the layout, since the <table> tag has been deprecated. The data is basically a list of item/value pairs. So, I jiggled around with some CSS and finally got it to look somewhat sensible (except when things in the first column are too wide to fit on one line, and then the layout just goes to Hell). I was always of the opinion that if you're laying out tabular data, that the use of tables is OK. So, should I continue to torture myself with CSS, or do I change it back to table layout? edit: screwed up the HTML formatting options and now my signature is messed up. edit2: Now my signature has completely disappeared. Whatevah...
Miszou wrote:
since the tag has been deprecated
If you and I keep using it as much as we can, we will revive it in no time.
My .NET Business Application Framework My Home Page My Younger Son & His "PET"
-
I was laying out a new control, when my supervisor said that I had better not be using <table> tags to control the layout, since the <table> tag has been deprecated. The data is basically a list of item/value pairs. So, I jiggled around with some CSS and finally got it to look somewhat sensible (except when things in the first column are too wide to fit on one line, and then the layout just goes to Hell). I was always of the opinion that if you're laying out tabular data, that the use of tables is OK. So, should I continue to torture myself with CSS, or do I change it back to table layout? edit: screwed up the HTML formatting options and now my signature is messed up. edit2: Now my signature has completely disappeared. Whatevah...
"Use the right tool for the right job." -- Scotty et al I use tables for tables all the time. I write very simple HTML, with Notepad or via XSLT. I don't expect to ever get involved with CSS.
-
"Use the right tool for the right job." -- Scotty et al I use tables for tables all the time. I write very simple HTML, with Notepad or via XSLT. I don't expect to ever get involved with CSS.
PIEBALDconsult wrote:
I don't expect to ever get involved with CSS.
3 years from now you're going to own a CSS blog
-
I was laying out a new control, when my supervisor said that I had better not be using <table> tags to control the layout, since the <table> tag has been deprecated. The data is basically a list of item/value pairs. So, I jiggled around with some CSS and finally got it to look somewhat sensible (except when things in the first column are too wide to fit on one line, and then the layout just goes to Hell). I was always of the opinion that if you're laying out tabular data, that the use of tables is OK. So, should I continue to torture myself with CSS, or do I change it back to table layout? edit: screwed up the HTML formatting options and now my signature is messed up. edit2: Now my signature has completely disappeared. Whatevah...
It's a tool like any other in our toolbox, it has some valid uses and some not so valid ones. Its up to you to decided what is best for your given implementation knowing the pros and cons. CSS does offer faster rendering and can be more easily updated to support a variety of environments, however, the table element was created for displaying tabular data.
only two letters away from being an asset
-
I was laying out a new control, when my supervisor said that I had better not be using <table> tags to control the layout, since the <table> tag has been deprecated. The data is basically a list of item/value pairs. So, I jiggled around with some CSS and finally got it to look somewhat sensible (except when things in the first column are too wide to fit on one line, and then the layout just goes to Hell). I was always of the opinion that if you're laying out tabular data, that the use of tables is OK. So, should I continue to torture myself with CSS, or do I change it back to table layout? edit: screwed up the HTML formatting options and now my signature is messed up. edit2: Now my signature has completely disappeared. Whatevah...
Tables are discouraged for layout because at one time they were used for layout very, very frequently. And they caused a lot of problems, because tables were designed for... well, tabular data. They're verbose, they're inflexible, and if you're trying to design a fast page renderer that works well for all sorts of different screen sizes, input methods, etc... then tables-for-layout hamstring you. You can't just ignore a table - the contents may well make no sense if laid out in a non-tabular fashion. You can (and modern renderers do... to some extent at least) allow styles to override the default tabular layout, but you've really just added to the complexity, added to the number of bizarre edge conditions and debugging nightmares - both for you and for page designers. It's a never-ending nightmare. And it's completely unnecessary. One of the most common uses for tables was once the classic three-pane layout: one pane above, one to the side, and one containing the primary content of the page. It's easy to picture this as a table: two rows, one with one column, one with two. It's almost always an inaccurate picture though. There are no rows: the header is logically separate - while a table header might be intended to describe the table body and thus be continually visible above it even when printed, a website header may provide navigation or a logo or boilerplate and be largely unrelated to the actual page content. Same with the side column - like the one on this very site, it may have little or nothing to do with the page contents. A renderer could conceivably reorder these table "cells" without hurting the usability of the site - on a handheld device for instance, you might view them stacked or put navigation following the content to allow full use of the limited display width. Constrained by the tabular markup however, this is difficult. It's worth looking past the dogma and putting some thought into this stuff. :)
Citizen 20.1.01
'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
-
I was laying out a new control, when my supervisor said that I had better not be using <table> tags to control the layout, since the <table> tag has been deprecated. The data is basically a list of item/value pairs. So, I jiggled around with some CSS and finally got it to look somewhat sensible (except when things in the first column are too wide to fit on one line, and then the layout just goes to Hell). I was always of the opinion that if you're laying out tabular data, that the use of tables is OK. So, should I continue to torture myself with CSS, or do I change it back to table layout? edit: screwed up the HTML formatting options and now my signature is messed up. edit2: Now my signature has completely disappeared. Whatevah...
CSS is cool and the way to go, but if your using it, test the pages on every browser you can think of. You'd be suprised at how many display the same code differently. I often use tables to hold the page areas and CSS for everything else as if the main page layout gets screwed by some browser incompatability (normally IE) then it looks VERY amatuer.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) -
I was laying out a new control, when my supervisor said that I had better not be using <table> tags to control the layout, since the <table> tag has been deprecated. The data is basically a list of item/value pairs. So, I jiggled around with some CSS and finally got it to look somewhat sensible (except when things in the first column are too wide to fit on one line, and then the layout just goes to Hell). I was always of the opinion that if you're laying out tabular data, that the use of tables is OK. So, should I continue to torture myself with CSS, or do I change it back to table layout? edit: screwed up the HTML formatting options and now my signature is messed up. edit2: Now my signature has completely disappeared. Whatevah...
Sigh... If it looks like a hammer, then it's a hammer, and can be used as a hammer. Some people might not like you using that particular -type- of hammer for hammering because it's the the wrong color or smells funny, but it'll work fine. Personally, I'll stop using <table> when they pry 'em from my cold dead hands... -- Ian
-
Sigh... If it looks like a hammer, then it's a hammer, and can be used as a hammer. Some people might not like you using that particular -type- of hammer for hammering because it's the the wrong color or smells funny, but it'll work fine. Personally, I'll stop using <table> when they pry 'em from my cold dead hands... -- Ian
ied wrote:
Sigh... If it looks like a hammer, then it's a hammer, and can be used as a hammer.
In this case, it's a rubber mallet. Beats a hammer for situations where you need a rubber mallet, not so great when you really need a hammer.
Citizen 20.1.01
'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
-
Tables are discouraged for layout because at one time they were used for layout very, very frequently. And they caused a lot of problems, because tables were designed for... well, tabular data. They're verbose, they're inflexible, and if you're trying to design a fast page renderer that works well for all sorts of different screen sizes, input methods, etc... then tables-for-layout hamstring you. You can't just ignore a table - the contents may well make no sense if laid out in a non-tabular fashion. You can (and modern renderers do... to some extent at least) allow styles to override the default tabular layout, but you've really just added to the complexity, added to the number of bizarre edge conditions and debugging nightmares - both for you and for page designers. It's a never-ending nightmare. And it's completely unnecessary. One of the most common uses for tables was once the classic three-pane layout: one pane above, one to the side, and one containing the primary content of the page. It's easy to picture this as a table: two rows, one with one column, one with two. It's almost always an inaccurate picture though. There are no rows: the header is logically separate - while a table header might be intended to describe the table body and thus be continually visible above it even when printed, a website header may provide navigation or a logo or boilerplate and be largely unrelated to the actual page content. Same with the side column - like the one on this very site, it may have little or nothing to do with the page contents. A renderer could conceivably reorder these table "cells" without hurting the usability of the site - on a handheld device for instance, you might view them stacked or put navigation following the content to allow full use of the limited display width. Constrained by the tabular markup however, this is difficult. It's worth looking past the dogma and putting some thought into this stuff. :)
Citizen 20.1.01
'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
I am a database guy trying to wear another hat. I've had to maintain and modify web pages that used tables embedded in tables embedded in tables for layout, and it was difficult. Building an intranet app for ASP.NET and IE6, I tried the techniques in this article to create a three-pane layout using only CSS. I'm sure it was my lack of expertise in interpreting the article, but I couldn't get it to work. I gave it up and went back to table tags. Can anyone suggest a good article that might give a different slant on how to do this?
Someone's gotta be the last to know, but why is it always me?
-
I was laying out a new control, when my supervisor said that I had better not be using <table> tags to control the layout, since the <table> tag has been deprecated. The data is basically a list of item/value pairs. So, I jiggled around with some CSS and finally got it to look somewhat sensible (except when things in the first column are too wide to fit on one line, and then the layout just goes to Hell). I was always of the opinion that if you're laying out tabular data, that the use of tables is OK. So, should I continue to torture myself with CSS, or do I change it back to table layout? edit: screwed up the HTML formatting options and now my signature is messed up. edit2: Now my signature has completely disappeared. Whatevah...
Miszou wrote:
since the table tag has been deprecated.
That's news to me. I am a big fan of css based layouts but when data fits a tabular layout it does not make sense to use cryptic CSS just to display it as a table. In your case with teh information you have given I think a table is the ideal solution.
Proud to be a CPHog user
-
I was laying out a new control, when my supervisor said that I had better not be using <table> tags to control the layout, since the <table> tag has been deprecated. The data is basically a list of item/value pairs. So, I jiggled around with some CSS and finally got it to look somewhat sensible (except when things in the first column are too wide to fit on one line, and then the layout just goes to Hell). I was always of the opinion that if you're laying out tabular data, that the use of tables is OK. So, should I continue to torture myself with CSS, or do I change it back to table layout? edit: screwed up the HTML formatting options and now my signature is messed up. edit2: Now my signature has completely disappeared. Whatevah...
I've tried to go table free many times, but haven't had much (er, any) success with dynamic (i.e. stretchy) multiple column layouts in different browsers. Tables rock for that! I try to do the right thing, but if it causes migraines, I quickly revert back to what I know works, and damn the hype!
- S 50 cups of coffee and you know it's on!
-
I was laying out a new control, when my supervisor said that I had better not be using <table> tags to control the layout, since the <table> tag has been deprecated. The data is basically a list of item/value pairs. So, I jiggled around with some CSS and finally got it to look somewhat sensible (except when things in the first column are too wide to fit on one line, and then the layout just goes to Hell). I was always of the opinion that if you're laying out tabular data, that the use of tables is OK. So, should I continue to torture myself with CSS, or do I change it back to table layout? edit: screwed up the HTML formatting options and now my signature is messed up. edit2: Now my signature has completely disappeared. Whatevah...
use tables for tables of data and don't forget to use the thead and th tags so your tables will still work nice with css
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway -
I was laying out a new control, when my supervisor said that I had better not be using <table> tags to control the layout, since the <table> tag has been deprecated. The data is basically a list of item/value pairs. So, I jiggled around with some CSS and finally got it to look somewhat sensible (except when things in the first column are too wide to fit on one line, and then the layout just goes to Hell). I was always of the opinion that if you're laying out tabular data, that the use of tables is OK. So, should I continue to torture myself with CSS, or do I change it back to table layout? edit: screwed up the HTML formatting options and now my signature is messed up. edit2: Now my signature has completely disappeared. Whatevah...
At the risk of being redundant, there's nothing wrong with using tables for tables, nor is it deprecated. The use of tables for page formatting is deprecated, as well it should be, but back when CSS didn't work it was all we had. We've learned a bit since the days when there were 4200 computers on the Internet, and all 4200 were run by CP members. <TABLE>s are dead; long live <TABLE>s!
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
-
I was laying out a new control, when my supervisor said that I had better not be using <table> tags to control the layout, since the <table> tag has been deprecated. The data is basically a list of item/value pairs. So, I jiggled around with some CSS and finally got it to look somewhat sensible (except when things in the first column are too wide to fit on one line, and then the layout just goes to Hell). I was always of the opinion that if you're laying out tabular data, that the use of tables is OK. So, should I continue to torture myself with CSS, or do I change it back to table layout? edit: screwed up the HTML formatting options and now my signature is messed up. edit2: Now my signature has completely disappeared. Whatevah...
For me, I use CSS as much as possible, but if a task is either way over the top in complexity (which can happen with CSS and cross-browser), then yes, I will use a table and move on. At this point and time, they have not build a full replacement for the table element with CSS that is cross-browser compatible. Many proclaim that you can easily do it all with css, but they are zelots and make much more work for the developers just to proclaim their tabeless purity. That said though, I try to use CSS as much as possible as it can be faster in some browsers, cleaner in code and easy to style. The biggest problem with browsers and web technologies is it takes five to ten years for them to set a standard and then have that standard implement across the browser. Way to slow of cycle to be effective! I think Silverlight will throw a big stick into a lot of those gears :)
Rocky <>< Recent Blog Post: Only answer to fuel problems
-
Most "HTML Programmer" web developers will chant CSS, CSS, CSS, CSS. If you ask me: use tables and move on to the really important stuff. [edit] To clarify: It is possible that CSS is important for your web site. In that case, use it - even if it's harder. I don't know, I am not a web guy, and my designs suck. However, for me, "choosing the right tool" also means "choosing a tool I can use".
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighistmodified on Wednesday, July 30, 2008 4:58 PM
Tables FTW! ;P When resources on using CSS for fixed layout of labels and inputs on forms are common, I'll gladly learn something new and relegate the table to nothing more than what is rendered by a Repeater or GridView control.
-
I've tried to go table free many times, but haven't had much (er, any) success with dynamic (i.e. stretchy) multiple column layouts in different browsers. Tables rock for that! I try to do the right thing, but if it causes migraines, I quickly revert back to what I know works, and damn the hype!
- S 50 cups of coffee and you know it's on!
Steve Echols wrote:
but haven't had much (er, any) success with dynamic (i.e. stretchy) multiple column layouts in different browsers
Hell, I battle with that even with tables. :doh: Stretching elements to content is just done, but stretching elements to available space is always a gamble.
-
Most "HTML Programmer" web developers will chant CSS, CSS, CSS, CSS. If you ask me: use tables and move on to the really important stuff. [edit] To clarify: It is possible that CSS is important for your web site. In that case, use it - even if it's harder. I don't know, I am not a web guy, and my designs suck. However, for me, "choosing the right tool" also means "choosing a tool I can use".
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighistmodified on Wednesday, July 30, 2008 4:58 PM
peterchen wrote:
In that case, use it - even if it's harder.
Reminds me of DCOM. :laugh:
My .NET Business Application Framework My Home Page My Younger Son & His "PET"
-
I am a database guy trying to wear another hat. I've had to maintain and modify web pages that used tables embedded in tables embedded in tables for layout, and it was difficult. Building an intranet app for ASP.NET and IE6, I tried the techniques in this article to create a three-pane layout using only CSS. I'm sure it was my lack of expertise in interpreting the article, but I couldn't get it to work. I gave it up and went back to table tags. Can anyone suggest a good article that might give a different slant on how to do this?
Someone's gotta be the last to know, but why is it always me?
goodideadave wrote:
I'm sure it was my lack of expertise in interpreting the article, but I couldn't get it to work.
Well, to be fair, the article is a bit old now. You might want to have a look at these: http://www.gerd-riesselmann.net/development/the-holy-grail-css-layout-fix-for-ie7[^] http://www.satzansatz.de/cssd/hgjump.html[^] Sadly, IE's bizarre layout rules (and to some extent, other bugs in other browsers) have made this sort of thing much harder to do in a general sense than it should have been. If you hit a wall, post a question in the WebDev forum & we'll dig into it.
Citizen 20.1.01
'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'