Okaasan is right.
'Across from' is used when there is something dividing the entities: a street, a river, or a hallway, for instance.
So, we would say that # 21 Maple Street is next to # 23 Maple Street (on the same side), and they are across (the street) from# 22 and # 24 Maple Street on the other side.
We say that Rooms # 233 and # 235 are next to each other and across (the hall) from Rooms # 234 and # 236.
We say Europe is across the ocean from North America.
Let's say you are talking about your house. It's white. In front of your house -- on the same side of the street -- you have two large trees. There is a car parked in front of your house, on the same side of the street.
Opposite your house -- across the street from your house -- is another house, a yellow house. You may see another car parked in front of that yellow house, and that yellow house may have some trees in front of it, too. That car and those trees are in front of that yellow house, but the yellow house, its trees, and the car parked in front of it are all across (the street) from your white house.
If you are standing between your house and the street, you are standing in front of your house. If your neighbor in the yellow house is standing between his house and the street, he is standing in front of his house, but across (the street) from you and your house.
If a street divides the mosque and the temple, the are across (the street) from each other.