This doesn't include my "favourite," putting a heading for accessibility at a -10000 position, so screen readers would read it, but it didn't render on the screen.
Does it still work? Or do you have to use ARIA?
HTML hacks that shaped the Internet
141–150 of 233 posts
Re: HTML hacks that shaped the Internet
#142Earlier quoted context omitted.
This is firmly cemented in my mind as completely impossible. I won't listen to reason.
It because of this exact technical challenge that ads nowadays appear between paragraphs in the middle content column, instead of in the right column where they belong.
Re: HTML hacks that shaped the Internet
#143My favourite was using iFrames as a type of ersatz AJAX. Click a link, make the target the iframe, an voila! No page refresh, and the iFrame gives visual feedback.
https://log.schemescape.com/posts/web-development/interactiv...
Re: HTML hacks that shaped the Internet
#144Earlier quoted context omitted.
This is firmly cemented in my mind as completely impossible. I won't listen to reason.
It because of this exact technical challenge that ads nowadays appear between paragraphs in the middle content column, instead of in the right column where they belong.
Re: HTML hacks that shaped the Internet
#145Earlier quoted context omitted.
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.
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…
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.
Re: HTML hacks that shaped the Internet
#146Using 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…
I made an SVG interface for displaying/editing diagrams using nw.js (essentially Electron). It would adapt the SVG viewport height and width based on the amount of space that's actively being used so that scrollbars will appear only when needed.
The interface would work perfectly in Chromium and Firefox. But in nw.js I was using their menu api to display a window menu. That menu wasn't part of the DOM-- not sure how nw.js displays that menu but you can't introspect it in devTools. Anyhow, this was somehow creating an off-by-one problem where scrollbars would one pixel too early.
The only way I stumbled upon to fix the issue was to set the SVG style to add "float: left;"
Any ideas on what magic spell this casts? Technically the svg was the only DOM element in the page. I never did figure it out.
Re: HTML hacks that shaped the Internet
#147Some 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…
Re: HTML hacks that shaped the Internet
#148Earlier quoted context omitted.
Sounds like they avoided paying licensing fees by not paying licensing fees and then acting surprised when called on it. https://archive.ph/20120919002551/http://www.windowsitpro.co...
Wasn't it that the Spyglass deal was MS paying a percentage of revenue, and MS releasing IE for free, so that Spyglass got to keep a percentage of $0?
Re: HTML hacks that shaped the Internet
#149Earlier 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.
What would be the point of that exercise though? It's true they might produce something faster, but if those sources are meant to be an educational resource then they'll learn more reading through actual documentation than copy-pasting questionable code to get something done.
Some programming languages ship a good tutorial as part of their documentation (e.g. Python), but not all.
Re: HTML hacks that shaped the Internet
#150Earlier quoted context omitted.
I've looked up some JSSS code examples, and it seems like it's pretty much the only type of code where the "with" keyword makes sense: tags.H1.color = "red"; tags.p.fontSize = "20pt"; with (tags.H3) { color = "green"; } with (tags.H2) { color = "red"; fontSize = "16pt"; marginTop = "4cm"; }
I think it also makes sense in Python, where it can be used to automatically close a file, or with open(filename) as my_file: data = my_file.read() Or with acquiring and releasing a lock: lock = threading.Lock() with lock: pass # do stuff That being said, I prefer the C++ approach of using constructors and destructors to automatically acquire resources (like locks and files) by declaring variables within some block s…
Javascript with comes from Pascal with (which was perhaps copied from somewhere else) and is used to modify variable scope.
with (my.long.variable.reference) {
a = 1;
b = 2;
}
is equivalent to: my.long.variable.reference.a = 1;
my.long.variable.reference.b = 2;
or at least, it might be ... due to Javascript's dynamic and typeless nature you might not know for sure what will happen until runtime. Which is one reason it's now deprecated and not allowed in strict mode. In pascal, variables have a type, records have fields, and these are known at compile time so that's not an issue.https://wiki.freepascal.org/With
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...