I wrote a tiny little website which can be found here. Everything is working as expected, except for two issues:
- The box should sit in the center of the page ideally (with a bit of padding between it and the navbar, and some padding between it and the bottom)
- There should be no whitespace at the bottom (the particles.js background should span the entire webpage)
Unfortunately, I'm not a very experienced web developer, so the solution to this escapes me. Here is the relevant HTML:
<div class="stage">
<div id="particles-js"></div>
<div class="container">
<div class="box">
<span>Hello, world!</span>
</div>
</div>
</div>
and the CSS:
body, html {
height:100%;
width: 100%;
}
.stage {
position: relative;
height: 100%;
width: 100%;
background-color: black;
}
#particles-js {
position: sticky;
height: 100%;
}
.container {
display: flex;
flex-wrap: nowrap;
align-items: center;
align-container: center;
justify-content: center;
max-width: 60%;
max-height: 60%;
}
.box {
align-self: center;
background-color: black;
color: white;
position: absolute;
left: 20%;
right: 20%;
bottom: 0;
border: solid green;
text-align: center;
}
Thank you!