Masjid is the place of worship and remembrance of Allah (Subhanahu Wa Ta'ala). Muslims should be mindful of its sanctity and take care of its cleanliness, as given in a Hadith in Sunan Kubra and Musnad Imam Ahmed:
Translation of Hadith: It has been narrated on the authority of Hadhrat Aisha Siddiqua (May Allah be well pleased with her) that the Holy Prophet (Sallallahu alaihi wa sallam) ordered construction of Masjid in localities and ordered incense to be lit in them and that they should be clean. (Sunan Kubra, Hadith No: 4480; Musnad Imam Ahmed Hadith No: 27141)
How to enter the Masjid
On entering the Masjid, the right foot should be placed in the Masjid first and the Sunnah way of removing the shoes/footwear is that the left shoe should be removed first. For the person who is entering the Masjid after removing the shoe, the correct method is that after removing the shoe from the left foot, that foot should be placed on the shoe itself, then remove the right shoe and step into the Masjid with the right foot first, as given in Ghamz Uyunil Basair Fi Sharahil Ashba Wan Nadhair.
Any work should be done with proper calmness, restraint, and grace. Haste and gracelessness is not preferred for an organized mind. The Holy Prophet (Sallallahu alaihi wa sallam) performed every act with calmness. There is a lengthy Hadith in Sahih Muslim Vol. 1, The Book of Funerals, Pg no. 313. See a small extract out of it:
Translation of Hadith: The mother of the believers, Hadhrat Aisha Siddiqua (May Allah be well pleased with her) narrates: The Holy Prophet (Sallallahu alaihi wa sallam) took His shawl slowly, wore His shoes calmly, opened the door slowly and went out and closed the door slowly.
Slamming the slippers on the ground anywhere or putting them on the ground so loudly that it creates sound is disliked. Such an act in the Masjid is disliked all the more. While entering the Masjid, while leaving it or while inside the Masjid, the manners of the Masjid should be kept in mind. No such sound should be made which disturbs the worshippers or those who are busy in remembering Allah Ta’ala (Dhikr). So while removing slippers etc. restraint and calmness should be maintained.
How to join the Salaat
The preferred place for the Muqtadi (person following the Imam in Salaat) is the place closest to the Imam. If there are an equal number of people in the row on both sides, then it is better to stand on the right side. As given in Fatawa A’alamgiri, Kitab Us Salaat.
If there are many people on the right side and less on the left, then joining for Salaat on the left side is better, as in this case, the person will be closest to the Imam. As given in Al Bahr Ur Raiq:
Translation: If there are an equal number of people on both sides, then it is better for the person joining the Salaat to stand on the right side. If there are more number of people on the right side, then he should stand on the left side.
What to do if there is only 1 row in Masjid
About the rows of worshippers, the rule in the Shariah is that if a row is completed and in the next row, only 1 man is there, then as a single person in a row is Makruh (undesirable), this man should wait for someone until the Imam goes into Ruku. If no one joins the Salaat until the Ruku, then this man should slightly pull someone who is honest and knows this rule, so that that person comes back of his own accord. If no one like this found, then that person should stand alone in the row and join the Salaat. As given in Durre Mukhtaar, Kitab Us Salaat, Babi Shurutis Salaat.
Children in elder's row in Masjid
The Shariah has commanded us to teach Salaat to children. For this reason, bringing 7-year-old children to the Masjid is permissible. When the command to teach Salaat to children has been given, then the manners of forming rows in Salaat have also been taught to us. First the elders’ row should be there and behind them the children’s row. Children should not stand in the elders’ row, as given in Fatawa A’alamgiri Vol I, The Book of Salaat.
Offering Salaat in the leadership (imamat) of a minor child is not allowed; irrespective of whether it is a Fardh (obligatory) Salaat or a Nafl (optional) one. Because, a Fardh Salaat is a Nafl for a minor and a minor’s Nafl, even as a nafl, is less than a major’s Nafl let alone a Fardh Salaat, as given in Fatawa A’alamgiri Vol. 1 Kitab Us Salaat