Questions & Answers about Я живу на седьмом этаже.
Russian normally uses на with этаж when talking about what floor something is on.
- жить на пятом этаже = to live on the fifth floor
- быть на втором этаже = to be on the second floor
So на is the standard preposition here, just like English on in on the seventh floor.
Using в with этаж would sound unnatural in this meaning.
It is the prepositional case.
The preposition на can take different cases, but here it answers the question where? so it uses the prepositional:
- на седьмом этаже = on the seventh floor
Compare:
- где? → на седьмом этаже = where? on the seventh floor
- куда? → на седьмой этаж = to what place? to the seventh floor
So in your sentence, both седьмом and этаже are in the prepositional case.