4

I was tinkering a little bit with particles.js, so i did this in html:

<div id="particles-js"></div>

and then this in css:

*{
    margin: 0%;
    padding: 0%;

}

#particles-js{

    background-color: rgb(169, 214, 169);
}

But at the bottom of the page there is still a little bit whitespace - around 3px - why is that? I added a screenshot because i don't know if it would work if i upload it on codepen with the cdn and all. I mean it probably would, but i'm a noob and a screenshot is faster and much more convenient for now:

Full Screen

Strangely, the whitespace seems only to be there if the browser window is maximized:

enter image description here

Well, hey, thanks for your help folks! I hope i have articulated my question well enough, but please tell me if not, and what i could do better in future questions, because there will surely be more of them!

funnydman
  • 9,083
  • 4
  • 40
  • 55
user521344
  • 61
  • 1
  • 6
  • 1
    did you tried to give your page a height? In CSS `height: 100vh;` makes your content take the hegiht of the viewport. – DohaHelmy Dec 22 '19 at 07:53
  • Seems that others had the same issue: https://stackoverflow.com/questions/50975645/particles-js-in-footer-adds-3px-space-below-footer?noredirect=1&lq=1 . Here's another instance, this one with a solution; looks like you'd have to add the CSS to the #particles-js declaration: https://stackoverflow.com/questions/53715659/expand-particles-js-to-background – Henry Visotski Dec 22 '19 at 08:06
  • there is a canvas element created by particule.js .. make it a block element – Temani Afif Dec 22 '19 at 09:56
  • Hey thanks for all you answers! Seems like i have a lot of points and some badges now, which is cool:-)Thanks for the links to the other posts! the pictures are just screenshots, made with screentool - i should try height with vh the next time. and also the block element solution. Sometimes it's just a little bit confusing, but i guess it get's easier with more experience and exposure to problems. – user521344 Dec 22 '19 at 10:57

0 Answers0