I saw add a hover effect over an image (better practices) CSS just now and thought to myself "This seems familiar, I'm fairly sure I answered something like this in the past". Sure enough, a couple months ago, I answered Display an image while hover on a text.
I would use the same method detailed in my old answer to answer the new one (obviously changing the example a bit to be more relevant), but the questions are not truly duplicate and I can see how someone new to CSS/HTML would be confused if we just presented the old answer with no explanation.
Hence my question. Basically, should duplicates be determined by sameness of question or answer?
Postscript: To prevent an XY problem, is there a different, better, way of handling this then the binary options my question implies?