I have noticed a pattern in the downvotes that I receive. Often times I receive downvotes on answers that I give to very basic and easy-to-answer questions--even when the answer is correct. The most recent example is this question. This is especially true when the question has close votes. Is there a tendency or a propensity to down-vote answers to basic or low-quality questions? Is this poor voting behavior, or is this acceptable practice on the SE network?
It is not uncommon for users to downvote the question and all answers when they vote to close a question. This is theoretically because high rep users should know better than to answer off-topic (etc) questions. However, at 376 rep, I wouldn't consider you to be a high rep user (yet).
It could be because the downvoter thought you shouldn't have answered the question, but it could also be that the downvoter thought it wasn't a good answer. Since they didn't leave a comment, we can't know for sure.
I downvote correct answers to low-quality and off-topic questions in some circumstances.
In general, I try to base my votes on the tooltip explanation: upvotes are for useful answers, downvotes are for answers that are not useful or that are in some way more harmful than helpful.
It’s hard to write a useful answer to a bad question. (In fact, I would say that’s the best way to define bad questions.) But it’s not impossible. A useful answer to a bad question should not be downvoted. Ideally, the question can be edited to improve it or make it on-topic.
I don’t think all correct answers are useful, though. Here are some circumstances where I might downvote a correct but unimpressive answer to a low-quality, off-topic question:
a question that is closed for being clearly general reference gets an answer that is just a block quote from one of the major free online dictionaries. It's not useful to replicate a dictionary on this site. We aren't professional lexicographers: a real dictionary is a more useful resource than this site for answering basic questions about pronunciation, etymology, or meaning, and answers that copy this information piecemeal will just end up distracting or wasting the time of people who comes across them as search results.
a single word request question that is closed for being overly vague and not giving enough information about how the word will be used gets an answer suggesting a word that is technically correct, or correct under one interpretation of the question, but that (in my opinion) doesn’t have the right connotations, is incorrect under another plausible interpretation of the question, or belongs to the wrong register of the language. This is definitely more subjective. I’m more likely to downvote an answer like this if there are many other answers to the question, since I think that in this situation votes of any kind generally help to sort answers by usefulness.
Different people vote in different ways, and that's fine. The Stack Exchange system is set up to work with a certain level of disagreement. This is the way I vote, but I only can vote once per post, so if enough other people disagree with me, the answer may end up with a positive score. I do like to leave a comment so that even if there is a disagreement, people will at least know what it is about.
I hope this answer helped you understand why some people might downvote a correct answer to a question that is basic and off-topic.
Here are some other relevant posts, some pertaining to ELU specifically and others to other network sites:
There have been occasions when I have (not on this site, but on others) downvoted somebody's answer to an obviously bad question. I usually explain why, when I do this. People who ask bad questions should be encouraged to reword them or ask better questions, not rewarded with an upvote and an answer. I see too many examples of people cynically answering bad questions with bland answers just in hope of getting the rep for an answer (not that I'm suggesting you do this, but it may explain other's motives for voting you down).
I have noticed this quite a few times.
In my early days on ELU, I was advised by one member that when the question is voted to close, and patently "close-worthy," you better not answer it. If you do, others may down vote your answer for just that reason.
I believe this is not a rule on ELU. Nor is it a convention that everyone here follows. However, it is true that people do so.