Live data from Hacker News

HTML hacks that shaped the Internet

tedium.co

171–180 of 233 posts

Re: HTML hacks that shaped the Internet

#171
post #73

Earlier quoted context omitted.

Speaking of floats being used for layout, you could probably add the clearfix hack to this list too. That was an essential part of my CSS toolbox for years, and something that ended up being one of the first things added in every new project. https://css-tricks.com/snippets/css/clear-fix/

The linked article includes an example of the "commented backslash hack," a variation on point #3 in this article Fell out of use because "nobody uses IE for Mac" :)

It amazes me to this day that IE for Mac wasn't even the Trident rendering engine.

Re: HTML hacks that shaped the Internet

#172
post #124

Earlier quoted context omitted.

Well perhaps W3C's official site would rank higher if it actually offered any tutorials, i.e. the thing people are searching for, as opposed to a list of specifications and draft specifications that won't be finalized for 10 years. In any case, "W3" is just another representation of 'www', which the W3C doesn't have any kind of claim over. OpenAI isn't open. W3Schools is unaffiliated with the W3C. The world keeps spi…

> won't be finalized for 10 years That's optimistic, optimistically. It's a group of ivory tower academics with no stake in any browser implementation acting like they have any right to tell actual browser implementors how to behave.

> acting like they have any right to tell actual browser implementors how to behave

Well, I totally prefer that, than letting Google decide by themselves

Re: HTML hacks that shaped the Internet

#173
post #100

Earlier quoted context omitted.

A lot of people on HN seem to have this opinion. A lot of the content on that site has been re-written, and it's now a pretty fantastic resource for beginners. If you tell 2 beginners to build something with PHP/jQuery/JS, and send one person to W3Schools and the other to PHP.net/jquery.org/MDN, I have no doubt that the W3schools person will get something done in workable state faster.

i'm mostly upset that they use "w3" in their name to masquerade as an "official" source of documentation. i know their about page clears this up, but it's pretty buried.

I agree with you.

The name is so confusing that if you search for "w3c" on DuckDuckGo, the first result is W3Schools, and then the official W3C website.

Re: HTML hacks that shaped the Internet

#174
post #96

Earlier quoted context omitted.

W3Schools is a horrible resource. I'd like Google to hide all of their results.

Amongst many other sites, I have w3schools blocked in my Kagi search results, along with MDN being raised/prioritized. From the looks of it, it seems like blocking w3schools is quite popular among Kagi users [1]. [1]: https://kagi.com/stats

Kagi, what an unfortunate name. It means "you take a shit" in Italian :(

Re: HTML hacks that shaped the Internet

#175
post #119

No mention about HTC? .fancy { behavior: url("path/to/pie_files/PIE.htc"); } (It is still online [1]! And even on GitHub [2]!!) [1] http://css3pie.com/ [2] https://github.com/lojjic/PIE

I have a stupid fondness for the level of hacks that we all collectively developed for IE6-9. One of my favorites was tricking IE6/7 into supporting Base64-encoded images in CSS by essentially triggering Outlook rules.

They're 100% things that shouldn't exist, mind you.

Re: HTML hacks that shaped the Internet

#176
I developed extensively for IE6 back in the day and never actually used that underscore hack - found it too confusing in codebases. We'd use the asterisk html selector path instead. IE7 had a similar hack for marking off CSS using some first-child trickery, e.g:

    * html #myDiv { /* IE6 stuff */ }
    *:first-child + html #myDiv { /* IE7 stuff */ }
One could also trick IE6/7 into loading base64-encoded images in CSS by shoving in an mhtml boundary in CSS files.

Also love that the article called out sIFR - cannot believe I'd actually forgotten about that one.

Re: HTML hacks that shaped the Internet

#177

Using tables for layout is pretty understandable. But when tables went out of fashion it was all about using floats for layout for a few years. That was wild, I am surprised it was left out from that list. https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layou... "Originally for floating images inside blocks of text, the float property became one of the most commonly used tools for creating multiple column layo…

When floats first came out (or around that time) I wrote my computer repair site using them, all developed in FF. Then, as I was finishing, I opened it in IE and watched the entire design fall apart. Unfortunately the people I would be targeting with my website would almost certainly be using IE so I had to go back to the drawing board and rewrite it using tables. It was a sad day.

Unfortunately, the opposite could also happen. You just needed to test every commit (or check in... ugh writing that word brought back painful memories) in different browsers

Re: HTML hacks that shaped the Internet

#178
post #20

Some of my favorites: - Faux columns, to get a visual stretch and make it appear that the sidebar was as long as the content https://alistapart.com/article/fauxcolumns/ - Or take that even further, with a nine-patch and 9 div's or a 3x3 table you could hack your own borders by repeating backgrounds in some axis. With CSS3 we got border-image that could help this a bit. These border styles aren't that much in favor an…

Golly. It’s a bit of a slap in the face to click through to A List Apart and see the header broken on mobile. It’s still so clean though after all these years.

you mean the title cut off? it happens on desktop too. i wonder if it's intentional

Re: HTML hacks that shaped the Internet

#179

Earlier quoted context omitted.

I was going to comment that I took offense to calling table-based layout a hack in the first place. When tables went out of favor, and I saw many, many front end dev teams waste cumulative months of time creating a much less understandable web page fiddling with float nonsense all over the place, solely so "purists" could keep their religion in tact, I learned a valuable lesson. Joel Spolsky calls them "Architecture…

IIRC non-table based layouts are rendered progressively, while table-based layouts have to be loaded fully first, and only then rendered. At the point when this was relevant, the Web was slow (slow connections, slow rendering engines), so one of the primary motivations for ditching tables for layouts was an increase in the perceived page rendering speed, not just a purist quirk.

I don't think that's accurate. It was old Internet Explorer that wouldn't render tables progressively.

See here, where it includes a demo: https://www.vbulletin.org/forum/showthread.php?t=161099

Non-table layouts also came into fashion when screen resolutions started to vary more, and some degree of fluidity and responsiveness could've been implemented with non-table layouts while IE was still a target. However, IE was lacking so badly even with IE8 that a lot of CSS that had been a W3C recommendation for years at that point just either didn't work, it was quirky because IE handled the box model a little differently. Ít was one of the reasons why Javascript shims and IE-specific CSS had to help out fairly often.

Re: HTML hacks that shaped the Internet

#180

Earlier quoted context omitted.

> won't be finalized for 10 years That's optimistic, optimistically. It's a group of ivory tower academics with no stake in any browser implementation acting like they have any right to tell actual browser implementors how to behave.

> acting like they have any right to tell actual browser implementors how to behave Well, I totally prefer that, than letting Google decide by themselves

Have you ever had academics that have nothing to do with you, your company, or your product, tell you how to do your job?

And besides, what makes you think Google listens to them?

Post reply on HN