Tips for adding a personalized background below the jumbotron

#particles-js{
  background:rgba(0, 10, 14,.8);
  height:100%;
  position: absolute;
  top:55px;
  left:0;
  width:100%;
  min-height:700px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

#jumbotron{
  margin: auto;
  width: 700px;
}
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8>
  ... (truncated for brevity) ...
    crossorigin="anonymous"></script>

  <script>
    particlesJS.load('particles-js', 'particles.json', function () {
      console.log('particles.json loaded...');
    });
  </script>
</body>

</html>

I have a jumbotron inside a div, which has some particle effect.

https://i.sstatic.net/DzIxQ.jpg

As can be seen in the image these particles starts below the jumbotron. How can I have thses below the jumbotron also?

index.html

<div id="particles-js">
  <div class="jumbotron text-center mt-3" id="jumbotron">
    <h1 class="display-3">{{title}}</h1>
...

Style .css

#particles-js {
  background: rgba(0, 10, 14, .8);
  height: 100%;
  position: absolute;
  top: 55px;
  left: 0;
  width: 100%;
  min-height: 700px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

#jumbotron {
  margin: auto;
  width: 700px;
}

But if I use the position:fixed property of jumbotron, I got the desired effect but jumbotron moved to the extreme left of the page.

https://i.sstatic.net/8Pb9h.jpg

How can I have it like the second picture with jumbotron in the center?

Thanks for the help in advance.

Answer №1

It seems like the issue lies in the code that was created using particles js. The #particles-js div with a background is starting at the top when it should be set to start at the bottom. This discrepancy may require adjustments either within the settings or the CSS itself.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Toggle the visibility of a Div element using PHP and jQuery

I am attempting to create 3 buttons that, when clicked, display the content of a PHP file. Here is what I have done so far: In the main HTML file: <div class="buttons"> <a class="showSingle" target="1">Logg</a> <a class="showSingle ...

Determine the total by multiplying the value of a dropdown menu and a text input field using jQuery when the values are changed

I am new to jQuery and JavaScript. I have a textbox and a select box, and when I enter a value in the textbox and select a value from the select box, I want to display the multiplication of both values in another textbox. I have tried doing this with two t ...

Using AJAX to send data with a POST request in Django may not function properly

Let me preface by saying I have searched for solutions online, but none of them seem to address my specific issue (mainly because they use outdated methods like Jason). I am currently working on a Django project and trying to implement ajax for a particul ...

Redirecting a CSS link on a website

I have a webpage with a "read more" option that redirects to the About Us page. When I click on "read more", the About Us page opens at the top, but I want it to redirect to the bottom of the About Us page. How can I achieve this? ...

Comparing inline-block and block display options for displaying images

In this HTML snippet, there is a main div with the id of "main_div" that contains two sub-divs. The first sub-div has an id of "logo" and includes a link to a picture. The second sub-div has an id of "intro" and contains text. For reference, here is the o ...

Preserving hyperlinks while transferring text from an HTML element using JavaScript

I'm struggling to preserve links from HTML elements while copying rich text, but have been unable to achieve it despite numerous attempts. The following code represents my best effort so far, however it only copies text without maintaining the links ...

Tips for implementing a feature in Angular 6 that enables an input box to accept both negative and positive values within the range of 0 to

HTML markup <input type="number" min="0" max="100" required placeholder="Charge" [(ngModel)]="rateInput" name="rateInput" [formControl]="rateControl"> Implementing TypeScript validation this.rateControl = new FormControl("", [Validators.max(100) ...

The lengthy string is not breaking into separate lines as expected in Internet Explorer

My querystring is quite long http://terra.cic.local/web/index.cfm//pm/uebersicht?sucheAufgeklappt=was%2Cwie%2Cwohin%2Cwann%2Cwer&sucheVon=&sucheBis=&sucheIstErsteSeiteAnzahlProdukteErmitteln=false&sucheIDReiseart=26&sucheHotelart=1081& ...

Looking to showcase an uploaded image next to the upload button in Vue.js using Element.ui?

I am currently working on implementing a feature that allows users to preview an image after uploading it. My approach involves uploading the image and then making an axios/AJAX call. Please see the following code snippet for reference: HTML code: ...

The functionality of Bootstrap 5's modal-dialog-scrollable seems to be malfunctioning

I recently created a Student Add form using bootstrap 5 <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dial ...

Incorporating Font Awesome into your gulp project the right way

Looking for advice on incorporating Font Awesome into a new gulp-scss-bootstrap project. What is the proper and efficient method to do so? Thanks in advance! ...

Tips for managing content and tables that exceed their container's boundaries

On my webpage, I have a slide-out sidebar that shifts the other contents and causes overflow with a scrollbar. I want the content to remain inside the window and adjust according to the available space. Image of Slide-out Sidebar As seen in the image, t ...

Encountering iOS 10 freezing issues when scrolling through an HTML list that is styled with -webkit-overflow-scrolling: touch

Overview This specific issue pertains to a potential freeze that occurs when scrolling through a <ul /> element that has been styled using CSS, specifically with the property -webkit-overflow-scrolling: touch on the Safari browser of iOS. Related Pr ...

What is the best way to achieve maximum clarity in a div element while adjusting opacity?

Is there a way to have a div with an opacity of 40%, but make the text inside the div show with an opacity of 100%? #box { Background-color:#000; Opacity:40%; } ...

Incorporating a Bootstrap Modal (Pop-up window) into the Navbar of a

How can I successfully integrate a Bootstrap Modal into my Django Navbar? Despite following the official Bootstrap documentation, I am encountering issues in my Django project. Is there a way to make this work? <!-- Button trigger modal --> <bu ...

Tips for creating two HTML buttons to switch between images

I have a pair of robot images, one displaying the front and the other displaying the back. I am looking for HTML or CSS code to switch between the two images by clicking on them, without using JavaScript or jQuery. I came across a helpful tutorial on this ...

Issue with VideoJS: MP4 file does not play after dynamically updating video URL

I have been using videoJs to display videos on my website. Below is the HTML code: <video id="player-vjs_html5_api" class="vjs-tech" crossorigin="anonymous" preload="auto" src="http://path-to-video/small.mp4"> <p class="vjs-no-vjs">Your bro ...

Guidelines on creating actionable functions using JavaScript

Having trouble connecting the form to the database and looking for a solution. This is the HTML form that I've been working on, attempting both POST and GET methods. <form id="register" action="script/register.js" method="post"> <label for= ...

I am looking to remove the magnificent popup jQuery effect

Appreciate the assistance so far. This issue is a bit tricky for me, as it involves jquery which I'm not well-versed in. My aim is to make my image clickable. <div class="col-lg-6 col-sm-12 mt-3"> <a class="portfolio-box" href="im ...

Identifying the position of an element as the first, nth, or last child within its parent using ReactJS

I'm currently experimenting with dynamic functionality in ReactJS and I need to determine the position of a child relative to its parent. How can I achieve this in ReactJS? I have come across this post which discusses detecting relationships between ...