I notice the question was closed as a duplicate. That gives me an idea of why your answer might have been downvoted.
Some members of the community tend to downvote answers to duplicate questions. I believe that's as an attempt to discourage the practice.
Joel Spolsky, the co-founder and CEO of the SE network, gave a pretty good explanation of why:
Yeah, you might earn a couple of points of reputation, but, because you are duplicating content, you are actually making the internet worse. Why? Because that answer might be true today, but as technology changes, it might not be true tomorrow. There are almost certainly thousands of wrong facts on Stack Overflow already, which may have been true when they were written but are no longer true. These facts will pollute the Internet for years. This problem is not tractable if we allow Stack Overflow to become just an endless river of questions and answers. It has to be more like a Wikipedia of Questions and Answers, with canonical answers that can be edited in one place, if we are ever going to stand a chance of keeping all the information that we expose to the Internet at least reasonably correct.¹
So avoid answering duplicate questions – questions that have already been asked. The fact that you wrote a long and detailed answer clearly says you want to contribute something of lasting value to this site. A better way is to search and see if the question already exists, and if it does, link the new question to the existing question as a duplicate.
In fact, the question you have asked here on Meta is also a duplicate, because you're nowhere near the first person to run into this.
My challenge to you is this: research here on Meta, find a duplicate, and get this question closed as a duplicate.
:-)