Definitely frustrating, but also showing some need to retire specific pieces of the past away from the top recommendations.
Definitely frustrating, but also showing some need to retire specific pieces of the past away from the top recommendations.
Take for example the 'how do I centre a div' type of question. You will get to find an answer with thousands of up-votes that will be some horrendous margin hack type of thing where you set the width of the content and have some counter intuitive CSS.
In 2019 (or even 2017) the answer isn't the same, you do 'display: grid' and use justify/align: center depending on axis. The code makes sense it is not a hack.
Actually you also get rid of the div as the wrapper is not needed if using CSS grid.
Now, if you try to put that as an updated answer you find there are already 95 wrong answers there for 'how do I center a div' and that the question is 'protected' so you need some decent XP to be able to add an answer anyway.
The out-dated answer meanwhile continues to get more up-votes so anyone new to HTML and wanting to perform the simple task of centering their content just learns how to do it wrongly. And it is then hard for them to unlearn the hack to learn the easy, elegant modern way that works in all browsers.
Note that the top answer will have had many moderated edits and there is nothing to indicate that it is wrong.
SO used to be amazing, the greatest website ever. But the more you learn about a topic the more you realise that there is some cargo cult copying and pasting going on that is stopping people actually thinking.
With 'good enough' search results and 'good enough' content most people are okay - the example I cite will work - but we are sort of stuck.
I liken Google search results to a Blockbuster store of old. Sure there are hundreds of videos to choose from but it is an illusion of choice. There is a universe of stuff out there - including the really good stuff - that isn't on the shelves that month.
Google are not really that good. They might have clever AI projects and many wonderful things but they have lost the ball and are not really the true trustees of an accessible web.
It also doesn’t work on IE latest or Edge.
Just because the kid who can't walk on two feet can't ride a bicycle doesn't mean all bicycles are broken.
It works fine in Edge. Why don't you try?
IE latest - there is no such thing.
The latest steam engines, the latest CRT screens and the latest buggy whips probably don't do CSS Grid either.
IE exists for compatibility with enterprise apps but isn't 'latest'. It is legacy.
And the content will still work even if CSS Grid is not supported, just the layout won't be perfect.
It looks like IE is still the #3 browser, ahead of both Edge and Safari.
The statistics you quote are meaningless. Go to another statistics provider and you will get different stats again. Include mobile and Safari suddenly becomes rather major.
Supporting a depreciated browser is not the way to go. This has to be understood, the methodology of where the stats comes from is also mysterious, given how much of he internet is click fraud bots who knows what is what?
OTOH, and to be fair, 20 years ago HTML was for newspaper / magazine like text layout, and grid based layouts are great for single page apps. The thing that’s happened more recently than 20 years is the web changed from text & media content in a static scrolling page layout to all pages are applications.
I am intrigued as to how you do this simple centering task without using CSS - it is a web page we are talking about here, not some other application that has sensible layout tools.
So please share what you know - it is a simple task - how do I center something - anything - vertically and or horizontally - in HTML without using CSS?
It's one leg from the tripod letter soup (HTML, CSS and JS) on which the Web stands.
That said, I can imagine quite a few scenarios where it would still be the right tool for the job.