+ 3

Make HTML El on top

I wrote a game and I want to add some "game over" massage at the end. The problem is that is appears below other elements. How can I place it on top? https://code.sololearn.com/W4pMlw5rGpyF/?ref=app Let the game run for 5 seconds and you'll see the "game over", then press ok on the alert. It also appears in the game_over function in the JS

3rd Apr 2022, 3:51 PM
Lior Bakal
Lior Bakal - avatar
7 Answers
+ 2
Oh. I thought it need below because of ` "game over" message at the end** `. I misunderstood it.. 😌 👍 fine.
3rd Apr 2022, 5:56 PM
Jayakrishna 🇮🇳
+ 1
#GO { text-align: center; margin-top:100%; font-size:32px; }
3rd Apr 2022, 4:23 PM
Jayakrishna 🇮🇳
+ 1
Jayakrishna🇮🇳 it didn't work, though it did move my text down
3rd Apr 2022, 5:20 PM
Lior Bakal
Lior Bakal - avatar
+ 1
Wanda♥️ amazing thanks! I see you changed span z-index to -1 Works great now!
3rd Apr 2022, 5:24 PM
Lior Bakal
Lior Bakal - avatar
0
lior bakalo Fun game. Needs a restart button.
4th Apr 2022, 1:33 PM
Bob_Li
Bob_Li - avatar
0
Yes
5th Apr 2022, 3:43 AM
Saydullo Panjiyev