Assume I have the following books and no room to store them standing up. Being a good Jew, you know that the holier books go on top of those of lesser holiness. Here are 10 books: 1) Gemara Kesubos; 2) a siddur, 3) Sefer B'reshis with Rashi's commentary; 4) an Art Scroll Chumash; 5) Sefer Yehoshua; 6) a Mishna Brurah volume; 7) Mesilas Yesharim; 8) Mishna Shabbos; 9) Igras Moshe; and 10) Mesekes Shekalim (Jerushalmi Talmud). Put them in order of holiness top to bottom and explain why.
I would agree in principle with Double AA in that "they all have the same kedusha", but would add a practical component. In stacking the books in a specific order based purely on content, you could end up with larger books stacked on smaller books, thus increasing the probability that the whole stack will fall over on to the floor, which I would think is a bigger issue. It would make more sense to ensure a stable stack to avoid this situation.