I'm configuring a Bootstrap template and trying to set a P5.js sketch as the background to a section of the website.
I've tried creating a div inside the section and then setting the CSS of the div as position: absolute !important;
however, this still displaces everything else and does not fill the section area.
What is the most robust solution to insert the sketch into the section so it completely fills it as a background without disturbing any other components?
<section class="resume-section p-3 p-lg-5 d-flex d-column" id="about">
<div id="container"></div>
<div class="my-auto">
<h1 class="mb-0">Charles
<span class="text-primary">Fried</span>
</h1>
<div class="subheading mb-5">Give a description
<a href="mailto:name@email.com">name@email.com</a>
</div>
<p class="mb-5">Blahhhhhhh</p>
<ul class="list-inline list-social-icons mb-0">
<li class="list-inline-item">
<a href="#">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li class="list-inline-item">
<a href="#">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li class="list-inline-item">
<a href="#">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-linkedin fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li class="list-inline-item">
<a href="#">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
</ul>
</div>
</section>
P5 sketch:
function setup() {
var clientHeight = document.getElementById('about').clientHeight;
var clientWidth = document.getElementById('about').clientWidth;
var cnv = createCanvas(clientHeight, clientWidth);
cnv.parent("container");
background(0);
}
EDIT: I've put a JSfiddle together in the hope that someone can help me figure this out. For clarity, the canvas should fill the yellow area (section) without displacing any items within it.