4 ms·
The paradox is that CSS was not meant for precise layout. It was meant to only vaguely suggest a layout. That's why it deliberately excludes the ability to forc
by Lucent 18y ago
The paradox is that CSS was not meant for precise layout. It was meant to only vaguely suggest a layout. That's why it deliberately excludes the ability to force elements next to each other the way tables can and spread them out evenly. It's not for generating pixel-perfect PDFs. It's for saying, "Hey, put some content here, make it kinda look like this, and if it doesn't fit, let it flow to the next line. No big deal."
Yet the people who are so gung-ho about how it's superior to tables are...get ready: the people who think CSS is for controlling every pixel of a layout. Those people should really be using tables not because they're easier for what they want to do, but instead on principle!
Instead we end up with some horrible, disgusting hybrid. Pixel counters for whom tables work perfectly instead abusing CSS to force a precise layout all the while gloating about how they're doing something noble and difficult and looking down their nose at those who do it the "easy way."
- olavk 18y agoI thing you got that backwards. CSS supports pixel-precise sizing and positioning. However, CSS also supports sizing and positioning based on the properties of the viewport, which adapt better to different screen sizes. Both approaches have advantages and drawbacks. HTML-tables OTOH does not support pixel-precize positioning, although you can get some of the way if you combine it with transparent gifs, as people used to do before CSS support became widespread.