Some people place is vertically, while others horizontally. One also observes all kinds of inscriptions, engraving and carving on these, some in Arabic. The visitors to the graveyard accidentally step on these all the time. Is this allowed?
It is permissible to use the grave marker for identification purposes. You
may write on it the deceased’s name and date of death only. You should not
write any Qur’aan or poem on it. (Shaami vol.2 pg.237)
and Allah Ta’ala Knows Best
Mufti Ebrahim Desai