I have a canvas loaded onto the _Layout.cshtml
When I browse from the Index page, to About or Contact, the <canvas>
is showing but the page content is missing.
Index
page will load a div
under <body>
tag but About
page is missing content.
I'm assuming @RenderBody
isn't in the appropriate z-index or is not showing on top of <canvas>
like my Index page does.
<canvas id="bgCanvas"></canvas>
<script src="~/Scripts/starLayout.js"></script>
<div class="container body-content">
@RenderBody()
<hr />
<footer>
<p>© @DateTime.Now</p>
</footer>
</div>
edit2:
under view source it shows
<canvas id="bgCanvas"></canvas>
<script src="/Scripts/starLayout.js"></script>
<div class="container body-content">
<h2>About.</h2>
<h3>Your application description page.</h3>
<div>
<p>Use this area to provide additional information.</p>
</div>
<hr />
<footer>
<p>© 4/17/2015 11:33:17 AM - JTR</p>
</footer>
</div>
However I still can't see the content so it's underneath the canvas I believe. Which is weird since it is on top of the canvas on index.cshtml
Here is your answer: w3c canvas. Shortly, you must provide width and height properties for canvas element.
And remember to place the *.js file/code which is responsible for "drawing" after the canvas element.
Can you provide css code, so I'll be abe to edit this answer to be more specific?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With