5 ms·
Like what? I buy the use case of using a table for data, but are you implying there's other scenarios where using table elements are the best choice?
by proexploit 13y ago
Like what? I buy the use case of using a table for data, but are you implying there's other scenarios where using table elements are the best choice?
- jlawer 13y agoEmail for one.
- proexploit 13y agoI get it but I feel that's more of an imposed limitation by email clients and not a fair choice.
- dandelany 13y agoHere's an example, for one: http://css-tricks.com/centering-in-the-unknown/ http://css-tricks.com/centering-in-the-unknown/ (talks about a CSS/divs solution, but as it mentions there are differences between the two). In general if you're dealing with a design that involves centering something with a dynamic size vertically, or one which involves having the height or width of two dynamic elements add up to the width of a third adjacent element (ie. "rowspan" and "colspan" in table-speak), there's a decent possibility that using a table might just be the least-hacky way to implement something. Bearing in mind that hackiness is a bit subjective :)
- proexploit 13y agoYeah certainly, thanks for the examples. I think the first item you mentioned, vertical centering of a single dynamic object actually can be handled better than tables currently (see some techniques here: http://html5hub.com/centering-all-the-directions/ http://html5hub.com/centering-all-the-directions/) but when you add more elements into the mix I can see how rowspan / colspan equivalents are not easily implemented without JS.
- statictype 13y agoA main content area and a sidebar with each having different colors and both maintaining the same height such that they expand vertically with the content (without having to hard-code pixel values). I saw a page showing how it could be achieved using only divs, but really, it was a complete rube goldberg machine, the sole purpose of which, seems to be to adhere to the religion of not using tables. I get that table layouts have their own issues but I think its silly to be dogmatic about refusing to use them where it's clearly the best hammer to drive in that nail.
- skeletonjelly 13y agoVertically centering floating content is a PITA without this dirty, dirty hack :)