What is the view of the scholars of Islam regarding the following matter?
There is a masjid in our locality. Next to it is a graveyard. There is no other place close to the masjid in which the masjid can be extended. If pillars were to be constructed over the graves and a floor be built on the pillars so that the graves won’t be affected, then will it be permissible to perform Salah on the floor over the graves or not. There is no other place next to the masjid where it can be extended. There are roads in every direction of the masjid.
If the Masjid needs to be extended and there is no appropriate place next to it in which it can be extended other than the graveyard, then the method mentioned in the question (i.e. extending the masjid by constructing pillars over the graveyard) is allowed, and performing Salah there will also be permissible without dislike.