3 ms·
It's taken decades for CSS to come up with anything as workable as putting content in a centered table. Yet during that same period, use of tables was shamed fo
by xnx 3y ago
It's taken decades for CSS to come up with anything as workable as putting content in a centered table. Yet during that same period, use of tables was shamed for layout.
- Alifatisk 3y agoI found using tables to be the most robust way at the time
- rad_gruchalski 3y agoNostalgia. I remember those days, 2000+ lines long tables written by hand in notepad on Windows 98 and served with PWS. Those were the days.
- cpach 3y agoTry ‘View Source’ on HN :)
- Alifatisk 3y agoNo way!!!
- mistersquid 3y ago> Yet during that same period, use of tables was shamed for layout. Tables for non-table data are not semantic and break accessibility. There is more to web development than where content lands on a page, which is only part of why good web development is hard.
- chiefalchemist 3y agoAnd good web development is harder because still too often web design is done by designers who don't have enough understanding of web development. My gawd, just earlier today I saw a help wanted that said "...PSD to pixel perfect..." I would have laughed if I wasn't already crying. "This is my life" and then the tears kicked in.
- recursive 3y agoTailwind is not semantic, but no one seems to mind that for some reason.
- matheusmoreira 3y agoTailwind is anti-semantic. It's a less verbose version of the style="..." attribute. It's like people just gave up on the idea of element classes altogether.
- westurner 3y agoHTML Tables don't wrap on mobile displays. If you build your site with tables for layout, it will probably have horizontal scrollbar(s) and you'll need to rewrite it for mobile; so a CSS framework is usually a safer choice for less layout rework, unless it's a data table. HTML Tables need at least `<th scope="row|column">` to be accessible: https://developer.mozilla.org/en-US/docs/Learn/HTML/Tables/Advanced#the_scope_attribute https://developer.mozilla.org/en-US/docs/Learn/HTML/Tables/A... "CSS grid layout": https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_la... lists a few interactive resources for learning flexgrid: - Firefox DevTools > INTRODUCTION TO CSS GRID LAYOUT: https://mozilladevelopers.github.io/playground/css-grid/ https://mozilladevelopers.github.io/playground/css-grid/ - CSS Grid Garden: https://cssgridgarden.com/ https://cssgridgarden.com/ MDN > "Relationship of grid layout to other layout methods": https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Relationship_of_grid_layout_with_other_layout_methods https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_la... MDN: "Box alignment in grid layout": https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_la...
- iamacyborg 3y agoTables absolutely can wrap on smaller displays, that’s how we used to code responsive emails.
- ozaark 3y agoI can't tell if you're serious or not, but tables are an absolute mess to handle layout. Email clients handle the CSS code to varying degree of support when wrapping responsively so even if you think your layout looks good with wrapping it's because CSS influenced the layout in whatever particular client you are using. If client doesn't support CSS or the CSS properties you've used: jank email. Email unfortunately requires you to code like 1999 in this regard. Browsers having CSS as standard and relatively up to date is a very good thing. Tables that aren't representation of tabular data are a mess.
- 3y ago
- rsch 3y agoHaha yes I remember that. Pros and cons of using DIVs and CSS: + hipster cred - DIV soup - CSS back then was wildly, W I L D L Y unsuitable for what people where trying to do (I think it boils down to it being designed to format documents, not web apps or on-screen layouts) Pros of using TABLE: + Actually works
- labster 3y agoI never had to spend time in the old days debugging centering, I just used <center> and tables and it worked! Then I could spend the time saved by adding <font> tags everywhere and making images for my rounded corners.