Direction of magnetic field surrounding the current carryin conductor is realized by right hand rule as shown in figure.
(righ hand rule :- By holding the conductor in righ hand so that thumb shows the direction of current,
then curling of fingers shows the direction of magnetic field.)
Direction of magnetic field due to current flowing in a conductor of vertical direction is shown in red color along the lines AB and CD
Direction of magnetic field due to current flowing in a conductor of horizontal direction is shown in blue color along the lines AB and CD
As can be seen from figurel , resultant magnetic field is zero along the line AB