![]() | |
#1
| |||
| |||
|
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#2
| |||
| |||
|
|
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? |
|
I bet someone has already written "Tables considered harmful". But is it really justified? |
|
weblog | http://www.pretletters.net/weblog/weblog.html | webontwerp | http://www.pretletters.net/html/webontwerp.html | zweefvliegen | http://www.pretletters.net/html/vliegen.html | |
#3
| ||||||
| ||||||
|
|
On Sun, 30 Apr 2006 08:41:16 +0200, <phil-news-nospam (AT) ipal (DOT) net> wrote: Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? [ snip ] I bet someone has already written "Tables considered harmful". But is it really justified? This discussion has been done over and over again, in this group and other www.authoring groups. Go through the archives first and then make up your mind. URL:http://www.google.com/search?q=tableless+design ULR:http://groups.google.com/groups/sear...oup:alt.html.* In short: - Try to understand what markup is for: it 'tells' browsers and bots and the like what your content is. So a div is only needed if no other appropriate element is available (likewise with <span>). |
|
- Tables are for tabular data. Using them for layout purposes is just the same thing as using blockquote for the left margin, <br> for whitespace between paragraphs, for padding on inline elements, <h4> for creating a block of text with a slightly larger, bold font. Just a few examples. It shows the author doesn't understand markup. It is all about abusing elements because of there appearance in graphical browsers. |
|
If done properly, in a html page the content is structured and marked up using meaningful elements. This should give the author already a lot of 'handles' to create the appearance of the page, for every element s/he uses in the body of the page, including the body element itself, can be used as a selector in a style sheet. |
|
If some content needs to be treated differently than the standard looks the author created for the element, it gets a class or maybe an id. If some content is to be 'physically separated' from the rest of the page, the author can put it in a containing div and asign a class or id to that div. |
|
Once an author understands the concept of markup, why it came about in the first place, how to use it properly, s/he will no longer feel the need for tables for layout any longer. |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#4
| |||
| |||
|
|
But just STOP ... NOW ... with all the "once authors understand ..." BS. Get your OWN understanding that CSS just isn't at the 100% level, yet. |
|
weblog | http://www.pretletters.net/weblog/weblog.html | webontwerp | http://www.pretletters.net/html/webontwerp.html | zweefvliegen | http://www.pretletters.net/html/vliegen.html | |
#5
| |||
| |||
|
|
On Sun, 30 Apr 2006 18:01:46 +0200, <phil-news-nospam (AT) ipal (DOT) net> wrote: But just STOP ... NOW ... with all the "once authors understand ..." BS. Get your OWN understanding that CSS just isn't at the 100% level, yet. If you know all the answers to your own questions, why the heck do you ask. |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#6
| ||||
| ||||
|
|
rule. In some cases background colors are _content_. One example is the red and black colors of a Chess board. Sure, someone could decide to make a Chess board of another color and such things exist. But these are the traditional colors people recognize as such. So |
|
if I am going to lay out a grid structure as a Chess board, you can bet I'm going to set the colors in the HTML tags. |
|
And I'm not going to use "float:left" to layout a Chess board, either. |
|
There are other cases where TABLE/TR/TD still beats DIV (and float) to make a grid structure as desired. I'd rather do it with DIV, but it just isn't capable, yet, for all that needs to be done. TABLE/TR/TD still works better for certain things. It seems most everyone agrees tabular data is to be done that way. But a lot of other things that wouldn't really be called tabular data still need the same grid structure semantics/effects, which is not possible with DIV and float (again I say "yet" because I see the potential to fix this). |
#7
| |||||
| |||||
|
|
phil-news-nospam (AT) ipal (DOT) net writes: rule. In some cases background colors are _content_. One example is the red and black colors of a Chess board. Sure, someone could decide to make a Chess board of another color and such things exist. But these are the traditional colors people recognize as such. So Odd, most of the (real) chessboards I've seen are yellow and black. Maybe it varies from place to place. |
|
if I am going to lay out a grid structure as a Chess board, you can bet I'm going to set the colors in the HTML tags. I can't imagine a situation where HTML-based colour setting would be more reliable than CSS-based colour setting in such a situation, with modern browsers at least - every graphical browser I know with an "ignore CSS" option also has some form of "ignore colours" option. If the colour is truly part of the content then perhaps an image (with suitable text alternative) is the better way to provide the information? |
|
And I'm not going to use "float:left" to layout a Chess board, either. I'd have thought a chess board was certainly tabular data. |
|
There are other cases where TABLE/TR/TD still beats DIV (and float) to make a grid structure as desired. I'd rather do it with DIV, but it just isn't capable, yet, for all that needs to be done. TABLE/TR/TD still works better for certain things. It seems most everyone agrees tabular data is to be done that way. But a lot of other things that wouldn't really be called tabular data still need the same grid structure semantics/effects, which is not possible with DIV and float (again I say "yet" because I see the potential to fix this). Does IE7 support 'position: table-*'? That gives much the same layout options but doesn't interfere with table-reading mode so much. (Of course, even if it does, it'll be a couple of years before it's generally usable) |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#8
| |||
| |||
|
|
phil-news-nospam (AT) ipal (DOT) net wrote: While CSS can do quite a lot, and can even do a lot of things that cannot be done in just HTML, there remains a few things CSS cannot do. So it is NOT yet time to say that HTML must be pure content. Just accept the fact that, as good as it is, CSS still needs work! Are you sure, you mean "CSS still needs work"? Not "CSS implementations need work"? WRT presentation of HTML tables (what I suspect you call grid), there is really a little stuff (rowspan/colspan) which cannot be done with CSS. |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#9
| |||
| |||
|
|
For another issue with CSS, take a block of text in a _single_ DIV element and using CSS only, style that block so it appears with a drop shadow effect without changing the HTML at all. |
#10
| |||
| |||
|
|
phil-news-nospam (AT) ipal (DOT) net> kirjoitti viestiss?:e33or8111ca (AT) news1 (DOT) newsguy.com... snip For another issue with CSS, take a block of text in a _single_ DIV element and using CSS only, style that block so it appears with a drop shadow effect without changing the HTML at all. http://www.kolumbus.fi/ace/ng/box.html Div with heading and paragraph of text inside. If you add more paragraphs it needs tweaking though. |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
![]() |
| Thread Tools | |
| Display Modes | |
| |