Alignment in Salah is between the heels and the shoulders, according to what was related by
Al-Bukhari in his Sahih (authentic) Book of Hadith, in the chapter entitled "Standing heel to heel and shoulder to shoulder in Salah", on the authority of
Anas that he said, "Each of us would stand with his shoulder against his neighbor’s shoulder and his foot against his foot."
It was also related by
Abu Dawud in the chapter entitled "Aligning the rows" that the Messenger of Allah (peace be upon him) said,
“Straighten the rows, keep your shoulders in line with one another, close the gaps, be pliable (movable) in the hands of your brethren.”
Ibn Hajar said in "Al-Fath" that
Ibn Khuzaymah and
Al-Hakim ranked it as Sahih. During sitting in Salah, alignment is not made by the knees, as people differ in their heights, but it should be with the shoulders and the heels as previously mentioned.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.