Praise be to Allah.
The Sunnah in the funeral prayer, if it is for a man, is for the imam to stand in line with his head. If he is offering the funeral prayer for a woman, he should stand in line with her middle. That is because of the report narrated by Samurah ibn Jundub who said: I offered the funeral prayer behind the Prophet (blessings and peace of Allah be upon him) for a woman who died in childbirth, and he stood in line with her middle.
Narrated by al-Bukhaari, 1331; Muslim, 964
And Imam Ahmad (12701) and Abu Dawood (3141) narrated that Naafi‘ Abu Ghaalib al-Khayyaat said: I saw Anas ibn Maalik offer the funeral prayer for a man, and he stood in line with his head. When that bier was taken away, the bier of a woman of Quraysh or of the Ansaar was brought, and it was said to him: O Abu Hamzah, this is the bier of So and so, the daughter of So and so; please offer the funeral prayer for her. So he offered the funeral prayer for her, standing in line with her middle. Al-‘Alaa’ ibn Ziyaad al-‘Adawi was among us, and when he saw that he stood in a different place with relation to the man and the woman, he said: O Abu Hamzah, is this how the Messenger of Allah (blessings and peace of Allah be upon him) used to stand in relation to a man and in relation to a woman, as you did? He said: Yes. He said: al-‘Alaa’ turned to us and said: Remember this.
Classed as saheeh by Shaykh al-Albaani (may Allah have mercy on him).
An-Nawawi (may Allah have mercy on him) said: The Sunnah is for the imam to stand in line with the woman’s buttocks, and there was no difference of opinion concerning the hadeeth, and it is more effective in screening her from the rest of the congregation. With regard to a man, there are two views; the correct view, according to the consensus of the scholars, and many of them stated it categorically, as it is the view of the majority of our earlier companions, is that he should stand in line with his head. The second view was stated by Abu ‘Ali at-Tabari, who said that he should stand in line with his chest. But the correct view is the former, which was narrated from the majority, and that is that he should stand in line with his head. This was also narrated by al-Qaadi Husayn from his companions.
End quote from Sharh al-Muhadhdhab, 5/183
Ash-Shawkaani (may Allah have mercy on him) said: What is implied by these two hadeeths – the hadeeths of Samurah and Anas (may Allah be pleased with them) – thatthe imam should stand in line with the head of a man and in line with a woman’s middle, is the view of ash-Shaafa‘i and it is correct.
End quote from Nayl al-Awtaar, 4/80
Shaykh Ibn Baaz (may Allah have mercy on him) said: It is Sunnah for the imam to stand in line with a man’s head and in line with a woman’s middle, because that is proven from the Prophet (blessings and peace of Allah be upon him) in the hadeeth of Anas and Samurah ibn Jundub (may Allah be pleased with him). As for the view of some scholars, that the Sunnah is to stand in line with a man’s chest, this is a weak (da‘eef) view for which there is no evidence as far as we know.
End quote from Majmoo‘ al-Fataawa, 13/142
And Allah knows best.