Since DNA has a negative charge it moves to the anode. I might be wrong, but in the picture it seems that you were wrong positioning the gel in the horizontal electrophoresis chamber. Therefore, the DNA moved in the oposite direction. You need to have the longest part of the gel in the anode direction of the electrophoresis chamber and DNA will move in the correct direction, which allows you to determine the molecular weight of the band (bp).
If you have any questions I am glad to answer them.