Relative Content

Tag Archive for javascripthtmlcssgame-development

How would I correctly position elements based of their y position?

I’m creating a HTML/JS browser based game, and I’m trying to have any element that has a higher Y on the page to have a lower Z Index, making it appear behind elements with a lower Y, the code I’ve written seems to be doing just that, by setting the Z Index to the elements top positioning, but visually it doesn’t