Praise be to Allah.
It is obligatory for the Muslims to make their rows straight and compact and to close the gaps between them. That is done by standing shoulder-to-shoulder and foot-to-foot.
It was narrated from Anas ibn Maalik that the Prophet (peace and blessings of Allaah be upon him) said: “Make your rows straight for I can see you behind my back.”
Narrated by al-Bukhaari, 686; Muslim, 425.
It was narrated from ‘Abd-Allaah ibn ‘Umar that the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Make your rows straight, stand shoulder to shoulder and close the gaps, and do not resist your brothers’ hands. Do not leave any gaps for the Shaytaan. Whoever complete a row, Allaah will reward him, and whoever breaksa row, Allaah will forsake him.
Abu Dawood said: What is meant by “Do not resist your brothers’ hands” is that a man should be easy-going if his brother pushes him forwards or backwards to make the row straight. (‘Awn al-Ma’bood).
Narrated by Abu Dawood, 666; al-Nasaa’i, 819. Classed as saheeh by al-Albaani in Saheeh Abi Dawood, 620.
It was narrated that al-Nu’maan ibn Basheer said:
“The Messenger of Allaah (peace and blessings of Allaah be upon him) turned to face the people and said, ‘Straighten your rows,’ three times, ‘for by Allaah either you straighten your rows or Allaah will create division among your hearts.’ And I saw men standing shoulder to shoulder, knee to knee, ankle to ankle.”
Narrated by Abu Dawood, 662; classed as saheeh by al-Albaani in Saheeh Abi Dawood, 616.
Should a man look to his right or his left so that he can make the row straight?
The Sunnah is for the imam to stand in the front, in line with in the middle of the row, then the rows should start from behind the imam, not from the right hand side of the mosque or the left, as some people do. Rather they should start from behind the imam, then the row should be completed to both the right and the left, so as to follow the Sunnah of having the imam in the middle.
Based on this, then whoever is in the right half of the row should look to his left and align himself with whoever is on his left and whoever is in the left half should look to his right and align himself with whoever is on his right.
With regard to the gaps between the feet, the worshipper should stand in a moderate fashion, neither standing with his feet together nor making them too far apart, because the further apart he makes them, the further his shoulders will be from his neighbour’s shoulders. Making the rows straight and compact is achieved by standing foot-to-foot and shoulder-to-shoulder.
Shaykh Bakr Abu Zayd said:
One of the new things that we see some people doing, with no evidence in sharee’ah, is that in prayer they try to align themselves with a person on the right if they are on the right hand side of the row, or to align themselves with a person on their left if they are on the left hand side of the row, and they turn their feet inward so that their ankles are touching the ankles of the people next to them.
This is something for which there is no basis in sharee’ah and it is going to the extreme in implementing the Sunnah. This is wrong on two counts.
The alignment of the row should begin from where the imam is standing. Whoever is on the right of the row should align himself by looking at those who are to his left (i.e., closer to the imam). Thus the line will be straightened and the gaps will be filled. Alignment is done by lining up necks, shoulders and ankles, and by completing the front rows.
But to try to spread the legs wide and turn the feet inward so that one's ankles touch one’s neighbours’ ankles is an obvious mistake and an exaggeration, and a new interpretation which is indicative of going to extremes in trying to apply the Sunnah. It causes annoyance and is not prescribed in sharee’ah, and it widens the gaps between people standing in prayer.
That becomes apparent when the people prostrate, and when they stand up again they become distracted in trying to fill the gaps and turning their feet to make their ankles touch their neighbours’ ankles, which makes them miss out on what they should be doing, which is to make the toes point in the direction of the qiblah.
Doing that is like competing with one’s neighbour and trying to take his place. All of that is not prescribed in sharee’ah.
Laa jadeed fi Ahkaam al-Salaah, 12. 13.