The words напротив, впереди/сзади, внутри/снаружи, возле, вокруг are adverbs when used with verbs, and describe the action; when used with nouns in genitive case they are playing the role of prepositions.
But in both cases they serve to express spatial relationships between objects.
Сравните:
Compare:
But in both cases they serve to express spatial relationships between objects.
Сравните:
Compare: