Suppose I had to lay out a part of a page where I wanted to retain the
horizontal and vertical relationship of the elements. Yes, this is what
tables are for. I was curious if it can be done in CSS, in a way that
works across all browsers. For example:
+------------------------------------------------------+
| +--------------------------------------------+ |
| |+---------------------+ +------------------+| |
| || a block of stuff | | unknown but small|| |
| || | | width data table || |
| || | +------------------+| |
| |+---------------------+ +-------------+ | |
| | (empty space) | some small | | |
| |container is centered | block below | | |
| |horizontally regardless | the table | | |
| |of its width +-------------+ | |
| +--------------------------------------------+ |
|this container has the maximum available width |
+------------------------------------------------------+
Table layout consists of a simple 2-row, 3-cell table (with the left
cell rowspan=2), and the table is centered in the available width.
I tried to implement this using no tables, and couldn't achieve
anything that satisfied me. The lower right-hand block would always
appear in an odd place. And I ended up with a soup of divs.
I don't mind using tables for layout if I have to, but I'm always
curious about ways to avoid it if I can do so.
-A