[thelist] arguments pro css & xhtml / con tables

Christian Heilmann codepo8 at gmail.com
Tue Jun 20 10:51:20 CDT 2006


> If one column is a graphic and the other column is a description and
> graphics can be various sizes and the amount of text in the description can
> be varying lengths, then CSS is not aware of sizes of the graphical or text
> content.
>
> For example, tables will auto adjust if most of the graphic widths are 100px
> but one graphic is 250px wide.  They will also adjust if the text is usually
> 50 characters but one is 700 characters.  A table will adjust the columns
> for the best mix of the graphic and text column sizes and increase row size.

All of this is also possible with CSS. I suggest you don't get wound
up on CSSZenGarden (I do, frequently, as IMHO it has proved its point
but by now is not helpful to the cause but actually gives clients
false hope that CSS should be used for fixed pixel desktops like
these) but take a look at a wonderful book called "Bulletproof CSS" by
Dan Cederholm instead. It explains in detail how you can create CSS
that scales and fixes itself when there are unknown amounts of
contents or sizes.

A table that has 100px images in some rows and 250px in others will
resize the column with the images to the largest image. That can
result in rather unsightly and confusing/scattered layouts. There is
no fix for that other than defining a width of the images and resizing
them if needed on the server.

Your examples are VERY easy to achieve with CSS. Simply float the
container to the left, float the text and float the image and the
image will always take up as much space as needed.



More information about the thelist mailing list