Archives

a question for css wizards

I have been told, repeatedly, that I should layout my pages using CSS rather than tables. There are lots of good reasons for this.

However, there's one thing that that I can do with tables, that I can't figure out how to do with CSS. With tables, I can specify a cell has width 1px, and the actual width of the box will be just large enough to contain the element in the cell. With div's, the width of the box expands to the size of the enclosing element.

So, for all of you CSS wizards out there, is there a way to tell CSS, "make this div just large enough to contain the element"?

Share

17 comments to a question for css wizards

Leave a Reply