3 ms·
> Amusingly, tables came back. But they're called "layout tables" now, to avoid embarrassment I'm not sure exactly what you are referring to, but there have be
by goto11 8y ago
> Amusingly, tables came back. But they're called "layout tables" now, to avoid embarrassment
I'm not sure exactly what you are referring to, but there have been some misunderstandings regarding tables. Before CSS, <table>-tags were there only way to control the layout, but since CSS 2, it have been possible to achieve the same kind of layout which display:table in CSS without having to abuse <table>-tags. But there is nothing wrong with using <table> when they are semantically appropriate.
Recently CSS have gotten display:grid which is way more powerful than table layout ever was.
Float and clear was never intended for general layout. They were invented by Netscape back in the day to allow text to float around images. Float/clear-hacks became a necessary evil in the dark age before IE supported display:table.
You cant really blame CSS for IE not supporting critical parts of the spec, since this was part a deliberate strategy by MS to "kill the web". Luckily this strategy failed and MS changed their minds.
- pbhjpbhj 8y ago>Before CSS, <table>-tags were there only way to control the layout // As an historical aside: that's not quite true to my recollection. p-elements had width, height (and possibly other attributes, margin, border?). And empty <p>, hr, br(?), were used for rudimentary layout? Then there was color, bgcolor attributes; and font tags. Not sure when <center> came out? This https://www.w3.org/Style/CSS20/history.html https://www.w3.org/Style/CSS20/history.html is probably much better than my recollection. I started making webpages/email-circulars about 1994-95.
- goto11 8y agoI think you remember wrong regarding P. P never supported width or height or margin before CSS. With FONT-tags and other presentational html you could control colors and typography to some extent, but the only way to control white-space and sizes and margins before CSS was to use tables, typically combined with "spacer gifs". E.g you wanted to indent a paragraph 17 pixels, you created a table with two cells and put a 17 pixel wide transparent gif in the first cell.
- pbhjpbhj 8y agoYou're probably right. However, these (below) suggest that HTML3 spec at least had layout attributes like align, wrap, clear on p; and had width for hr (it was a Netscape extension on HTML2 too, apparently). Also since HTML2 textarea had cols and rows attributes. There was also default styling on blockquote and lists that have indents. \ was used for horizontal "alignment" (tabs); code and pre too. I'm going to say there was some layout "tools" prior to CSS. Quite interesting to read the specs now, at the time I was just groping around in the dark by myself, learning by reading source of live sites. Would have probably been much easier if I'd known a spec existed! https://www.w3.org/People/Raggett/book4/ch02.html https://www.w3.org/People/Raggett/book4/ch02.html -- MSIE promise to include CSS Nov '95. http://marc.merlins.org/htmlearn/html-ref.html#P http://marc.merlins.org/htmlearn/html-ref.html#P -- HTML3 spec, I think?, dated 1995. Go up one level to find HTML2 spec. Further aside: spacer GIFs I never came across until about MSIE4, avoided them myself, too much of a purist. In the Mosaic vs Netscape Navigator days I don't think anyone had started to attempt pixel-matched designs across different UA??