2006-03-12 · in Ideas · 145 words

Designers of books and GUIs are used to thinking in terms of nested boxes when doing layout. The CSS box model flies in the face of this -- much of the pain when writing stylesheets at the moment stems from working out how to do things that used to be trivial with tables, often by using floating or relative placement, both of which are hard to get right and result in layouts that do not resize gracefully.

I would suggest extending CSS so that page layout can be specified in terms of nested containers, as modern GUI toolkits do. Element IDs can be used to assign content to the correct cells of the layout. Doing automatic layout for nested containers is a problem that has been solved many times already, and should be far simpler for browser authors to implement than the existing CSS box model.