Toby said:
Barry said:
Toby said:
Barry Pearson wrote:
And that is what a layout table is! A higher level of abstraction.
Of course with a full implementation of CSS2, there are things like
"display: table-cell;" at our disposal, so this higher-level of
abstraction *is* available.
No. That is not a higher level of abstraction. [...] Now think of
a notation that could be useful for that. Perhaps: "start a new row;
here is the first thing in the row; here is the second thing in the
row; ...". Gosh! Tables.
And as I was saying, *exactly* this can *already* be done with CSS2
assuming you don't care about IE. [snip]
Gosh! CSS2! Works in Opera! Works in Gecko!
I re-iterate: it is only IE that keeps us using complicated
combinations of float and positioning.
I agree with your proposition, that by making a non-table mark-up behave like
tables, some of the advantages of tables can be achieved. It is a lower level
of abstraction, because you first have to understand the table level of
abstraction, then emulate it. (You have emulated <td> with something more
complicated). So it has not achieved the intent of higher levels of
abstraction, which is to focus more on the solution space and hide the
implementation details.
The converse also applies. You can start with table mark-up and disable
tables. What we have is various mark-up, such as <div>, <span>, <table>, with
default layout recommendations. Then we can change them to act like
one-another using CSS. (Again, IE is a problem).
I'm not sure what to make of your statement about IE. It is true, and will
continue to be true for several years. But we have to solve problems with the
tools that work. How would it change the advice we give to anyone about what
techniques to use to layout their pages?
I agree with what appears to be your view on floats and positioning. I have
become disillusioned about absolute positioning, because it is tricky to make
absolutely-positioned elements behave well with their intended neighbours. (At
least, I don't know how to make them act neighbourly). And I was interested to
read Eric Meyer say (in "Containing Floats") that "floats were not originally
intended to be used for layout"! Does that mean that all the people who don't
use tables because tables were (supposedly) not intended for layout should
avoid using floats for layout for the same reason? In fact, floats are my
*main* CSS-P technique, because of the problems I have with absolute
positioning!
I have just uploaded the following page. It covers some of this ground. I
suspect that there was a blind-spot a decade ago that relegated page-layout in
importance. We are now suffering the consequences. I don't think we will ever
recover, because the use of layout tables over the last 8 years has created a
legacy that will be with us for decades, and it changed the tools we use so
that the original concerns don't matter much now. The web has grown up (well,
it is behaving like a child of the same age behaves!) and is making its own
way, not really under the control of its parents (or anyone else!) We wanted
it to be a doctor or lawyer or academic, and it has become an artist or actor
or something dreadful like that!
"Reflections on CSS Positioning"
http://www.barry.pearson.name/articles/layout_tables/css_positioning.htm