Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Particles JS is not covering full page

Hello!

My problem is with Particles JS, it doesn’t cover my page. There is a space at the top.
enter image description here

HTML:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

...
<body>
    ...
        <div id="particles-js"></div>
        <img alt="Server Name" draggable="false" id="Logo" src="assets/img/logo.png">
        <div id="Navigation">
            <a href="#"><img alt="Forums" draggable="false" src="assets/img/icon_exemple.png"></a>
            <a href="#"><img alt="Store" draggable="false" src="assets/img/icon_exemple.png"></a>
            <a href="#"><img alt="Vote" draggable="false" src="assets/img/icon_exemple.png"></a>
        </div>
        <button id="Server" onclick="copyToClipboard('server.ip:port')"><span>Join to us</span></button>
    ...
</body>
...

CSS:

...
body {
  background-image: url(../img/background.png);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 100vh;
}
#particles-js {
  height: 100%;
  width: 100%;
  position: fixed;
  z-index: -100;
}
...

I tried to solve the problem myself trying different options but nothing.

>Solution :

You should add position values to #particle-js

#particles-js {
  height: 100%;
  width: 100%;
  position: fixed;
  z-index: -100;
  top:0;
  left:0;
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading