All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
Straightening the lines in prayer is by putting shoulder to shoulder and ankle to ankle. Imaam Al-Bukhari wrote a chapter titled 'Putting shoulder to shoulder and foot to foot in prayer'. An-Nu'maan Ibn Basheer said: 'We used to put our ankle against the ankle of the person standing next to us.' Al-Haafith Ibn Hajar said: 'The narration by An-Nu'maan Ibn Basheer is used to prove that the word "ankle" in the verse addressing ablution refers to the bones that stick out in the part that joins the foot to the leg, which could be put in close contact with the person standing next to you.' However, others scholars are of the view that the ankle meant the heel, but this is not the correct opinion. This opinion is attributed to some Hanafi scholars but the scholars who are the reference of this school rejected attributing this view to their school. Therefore, standing in prayer should be by putting shoulder to shoulder and ankle to ankle, and not the toes or the heels against each other.
Allaah knows best.