This is my code for my canvas and my Navbar and it looks like this:
<DashboardNavbar style={{ zIndex: 2 }} />
<canvas id="canvas" style={{ background: "#232323", width: "100%", zIndex: 1 }}
></canvas>
The problem is I want to achieve something like this:
<canvas id="canvas" style={{ background: "#232323", width: "100%", zIndex: 1 }}>
<DashboardNavbar style={{ zIndex: 2 }} />
</canvas>
I want that I can display my canvas behaves like the background of the website so I can display content over it in this case it is my navbar but I plan to display more stuff below the navbar and the canvas as my background.
What I have tried:
- Using zIndexes to put my canvas one below my navbar but this did not work
- Tried using position absolute and relative on canvas but did not work either