Reputation: 13777
I was wondering how modern browsers render html tables, for example how they figure out the exact size of the cells. After googling a bit, all I found was an RFC from 1996, but nothing new. Since I also read that html 5 specifies the parsing algorithm, so I thought maybe the algorithm for determinating the layout is also specified or at least it is described how a possible algorithm should work. Just looking at the code of open source browsers would probably be very time consuming and therefore rather not an option.
Upvotes: 15
Views: 2672
Reputation: 7370
Not specific to HTML, but the paper The Table Layout Problem (Richard J. Anderson, Sumeet Sobti) analyzes laying out a table, e.g. minimum height for fixed width and other problems.
It concludes that the problem is NP-complete and suggests a number of heuristics.
Upvotes: 13
Reputation: 7307
Specifically regarding tables: http://www.w3.org/TR/CSS2/tables.html#width-layout
The full spec: http://www.w3.org/TR/CSS2/cover.html#minitoc
Upvotes: 11