However...
However, there is no harm if the dead body is in a coffin or any other thing similar to it. 609. The private parts of the dead body should be covered when the prayers is being offered. And if it is not possible to shroud it, its private parts should be covered with a board or brick or any other similar thing. 610.
A person should be standing while offering prayers for a dead body and should offer it with the intention of complying with the commands of Allah and while making an intention to offer the prayers he should specify the dead body e.g. he should make his intention thus: "I am offering prayers for this dead body in compliance with the commands of Allah". 611. If a person cannot offer prayers for a dead body in a standing posture, he may offer it while sitting. 612.
If the dying person has made a will that a particular person should lead the prayers for him the recommended precaution is that that person should take permission in this behalf from the guardian of the dead body. 613. It is abominable to offer prayers for a dead body a number of times. However, if the dead person was a learned and pious one, it is not abominable to do so. 614.
If a dead body is buried without offering prayers for it, either intentionally or by mistake, or on account of an excuse, or if it transpires after its burial that the prayers offered for it was void, it is obligatory that before the body is disintegrated prayers is offered at the grave of the deceased observing all necessary formalities. 615.
There are 5 takbirs (saying Allahu Akbar) in the prayers offered for a dead body and it is sufficient if a person recites those 5 takbirs in the following order: (i) After making an intention to offer the prayers and pronouncing the 1st takbir he should say: Ash hadu an la ilaha Illal lah wa Ash hhadu anna Muhammadan Rasulullah .(I bear witness that there is no god but Allah and that Muhammad is Allah's Messenger).
(ii) After the 2nd takbir he should say: Alla humma salli 'ala Muhammadian wa alay Muhammad. (O'Lord! Bestow peace and blessing upon Muhammad and his progeny). (iii) After the 3rd takbir he should say: Alla hummaghfir lil mu'mineena wal mu'minat. (O'Lord! Forgive all believers - men as well as women). (iv) After the 4th takbir he should say: Alla hummaghfir ' li hazal mayyit. (O'Lord! Forgive this dead body). (a) If the dead body is that of a woman he should say: Ala hummaghfir li hazihil mayyit.
(O'Lord! Forgive this dead body).