It is obligatory to offer Namaz-e-Mayyit for every Muslim, as well as for a Muslim child if it has completed 6 years of its age. If a child had not completed 6 years of its age, but it was a discerning child who knew what Namaz was, then as an obligatory precaution, Namaz-e-Mayyit for it should be offered. If it did not know of Namaz, then the prayers may be offered with the Niyyat of 'Raja'. However, to offer Namaz-e-Mayyit for a still born child is not Mustahab. Namaz-e-Mayyit should be offered after the dead body has been given Ghusl, Hunnut and Kafan and if it is offered before or during the performance of these acts, it does not suffice, even if it is due to forgetfulness or on account of not knowing the rule. It is not necessary for a person who offers Namaz-e-Mayyit to be in Wudhu or Ghusl or tayammum nor is it necessary that his body and dress be Pak. Rather there is no harm even if his dress is a usurped one. However, it is better that while offering this Namaz one should observe all the formal rules which are normally observed in other prayers. One who offers Namaz-e-Mayyit should face the Qibla, and it is also obligatory that at the time of Namaz-e-Mayyit, the dead body remains before him on its back, in a manner that its head is on his right and its feet on his left side. As a recommended precaution, the place where a man stands to offer Namaz-e-Mayyit should not be a usurped one, and it should not be higher or lower than the place where the dead body is kept. However, its being a little higher or lower is immaterial. The person offering Namaz-e-Mayyit should not be distant from the dead body. However, if he is praying in a congregation, then there is no harm in his being distant from the dead body in the rows which are connected to each other. In Namaz-e-Mayyit, one who offers prayers should stand in such a way that the dead body is in front of him, except if the Namaz is prayed in Jama'at and the lines extend beyond on both sides, then praying away from the dead body will not be objectionable. As a precaution, there should be no curtain or wall or any other obstruction between the dead body and the person offering Namaz-e-Mayyit. However, there is no harm if the dead body is in a coffin or in any other similar thing. The private parts of the dead body should be concealed when Namaz-e-Mayyit is being offered. And if it was not possible to give Kafan, even then at least its private parts should be covered with a board or brick or any similar thing. A person should be standing while offering Namaz-e-Mayyit and should offer it with the Niyyat of Qurbat, specifying the dead person for whom he is praying. For example, he should make his intention thus: "I am offering Namaz for this dead person in compliance with the pleasure of Allah". If there is no one who is capable of praying Namaz-e-Mayyit while standing, then it can be offered while sitting. If the deceased had made a will that a particular person should lead the prayers for him the recommended precaution is that such a person should take permission from the guardian of the dead person. It is Makrooh to repeat Namaz-e-Mayyit a number of times, unless the dead person was an Aalim and pious one, in which case it is not Makrooh. If a dead body is buried without Namaz-e-Mayyit, either intentionally or forgetfully, on account of an excuse, or if it transpires after its burial that the prayers offered for it was void, it will not be permissible to dig up the grave for praying Namaz-e-Mayyit. There is no objection to praying, with the Niyyat of Raja', by the graveside, if one feels that the decay has not yet taken place.