3

I came across a question the other day (how to put two divs side by side in css?) so I googled "two divs side by side" and picked the top link (How to align two divs side by side using the float, clear, and overflow elements with a fixed position div/) and copy/pasted the code from the answer there. Later I thought perhaps I shouldn't have done that as someone else wrote it. Is that right?

Edit

The answer isn't exactly the same, but the code is.

14
  • 3
    Why are the questions not duplicates if the same answer can answer both of them? Commented May 3, 2017 at 11:41
  • I have absolutely no idea; There appear to be a lot of side by side div positioning questions Commented May 3, 2017 at 11:42
  • 2
    Seems dangerous to post an answer if you don't understand the questions. Commented May 3, 2017 at 11:49
  • I do understand the questions, I just don't understand why they are different Commented May 3, 2017 at 11:51
  • 3
    If you don't think they are different flag one as a duplicate of the other. That's far better than posting duplicate answers. Commented May 3, 2017 at 11:52
  • I guess because the latter question wants to use specific css to go about it... Commented May 3, 2017 at 11:52
  • Ok, thanks, I will do that. That doesn't answer my question though. Commented May 3, 2017 at 11:58
  • 5
    "so I googled "two divs side by side" and picked the top link" - and that's why JavaScript, CSS and PHP tags are the lauging stock for the rest of the site. The amount of reputation you can earn by that process to answer questions of people who don't know how to Google is astonishing. But no, you definitely shouldn't be doing that.
    – CodeCaster
    Commented May 3, 2017 at 12:04
  • 2
    Did you attribute the code that you copy and pasted? If not you should know that all content you copy from somewhere into your answer needs to be attributed otherwise that is called plagiarism. Commented May 3, 2017 at 12:09
  • I did add a comment on my answer saying "I got the code from here" Commented May 3, 2017 at 12:37
  • @CodeCaster ok, I won't do that in the future then. Commented May 3, 2017 at 12:38
  • More on attribution - meta.stackoverflow.com/questions/302295/… and even more meta.stackoverflow.com/search?q=copy+answer+attribution Commented May 3, 2017 at 15:52
  • For what it's worth, you shouldn't do this with your own answers either.
    – BSMP
    Commented May 3, 2017 at 17:05
  • Just found this: stackoverflow.com/help/referencing Commented May 22, 2017 at 12:37

1 Answer 1

10

If the question has an answer in another question (even if the question is different), that's generally a duplicate. If you click the flag button under the question, you can request it be closed as a duplicate and people will review it in the queue.

If, however, you're merely referencing it to make a new answer specific to the question then that's fine. Be sure to link to the original source and specify what you did to change it for that question.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .