According to the hadeeth narrated by al-Bukhaari (406) and Muslim (547) from ‘Abd-Allaah ibn ‘Umar, the Messenger of Allaah (peace and blessings of Allaah be upon him) saw some spittle on the wall of the mosque in the direction of the qiblah, so he scratched it off then turned to the people and said: “If any one of you is praying, let him not spit in front of him, for Allaah is in front of him when he prays.”
There is no contradiction between this is the fact that Allaah is high above His creation.
Shaykh al-Islam [Ibn Taymiyah] said in Majmoo’ al-Fataawa, 5/101:
The words of the Prophet (peace and blessings of Allaah be upon him), “When any one of you stands to pray, Allaah is in front of him so let him not spit in front of him,” mean what they appear to mean. Allaah is above the Throne and He is in front of the worshipper. This description may even apply to created things: when a man looks at the sky and the sun and the moon, the sky, sun and moon are above him and they are also in front of him.
He also said (5/672):
It is well known that whoever turns to face the moon and addresses it – if he were able to address it – is turning to face it even though it is above him … Similarly when a person stands to pray he is turning to face his Lord even though He is above him, and he addresses Him on the basis of Him being in front of him not to his right or left, and he calls upon Him on the basis that He is above not below.
Shaykh Ibn ‘Uthaymeen said:
The evidence that Allaah is in front of the worshipper is:
The words of the Prophet (peace and blessings of Allaah be upon him): “When any one of you stands to pray, Allaah is in front of him so let him not spit in front of him.”
This being in front is ascribed to Allaah in a manner that befits Him and does not contradict His exalted state. The two may be reconciled in two ways:
1 – It is possible to reconcile between them with regard to created things, such as when the sun is rising, it is in front of the one who faces the east, even though it is in the sky. So if they may be reconciled with regard to a created thing then it is more apt that they be reconciled with regard to the Creator.
2 – Even if it were not possible to reconcile them with regard to created things, that does not mean that they cannot be reconciled with regard to the Creator, because there is nothing like unto Allaah.
Fataawa Ibn ‘Uthaymeen, 4/287.