Incorporating a scrolling background image behind my other <div> columns

I've been working on a website for a relative and have organized the page into columns wrapped in div elements,

However, I'm struggling to get the columns centered over the scrolling background image,

If I place the background div element at the bottom of the page, it positions the background between the footer and all the columns,

If I place it before the columns, the image ends up above the columns.

How can I center the columns over the background image?

Here's the HTML page and CSS file,

(some CSS elements are related to an image gallery on another page):

* {
  box-sizing: border-box;
}

.row::after {
  content: "";
  clear: both;
  display: table;
}

[class*="col-"] {
  float: left;
  padding: 15px;
  border: 15px solid orange;
}

html {
  font-family: "Lucida Sans", sans-serif;
}

h1 {
  text-align: center;
}

.header {
  background-color: white;
  border: 15px solid orange;
  padding: 15px;
}

.menu ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.menu li {
  padding: 8px;
  margin-bottom: 7px;
  background-color: #FFD700;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.menu li:hover {
  background-color: #DAA520;
}

.aside {
  background-color: orange;
  padding: 15px;
  color: white;
  text-align: center;
  font-size: 14px;
  box-shadow: box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.footer {
  background-color: orange;
  color: white;
  text-align: center;
  font-size: 12px;
  padding: 15px;
}


/* for mobile phones */

[class*="col-"] {
  width: 100%;
}

@media only screen and (min-width: 600px) {
  /*for tablets */
  .col-m-1 {
    width: 8.33%;
  }
  .col-m-2 {
    width: 16.66%;
  }
  .col-m-3 {
    width: 25%;
  }
  .col-m-4 {
    width: 33.33%;
  }
  .col-m-5 {
    width: 41.66%;
  }
  .col-m-6 {
    width: 50%;
  }
  .col-m-7 {
    width: 58.33%;
  }
  .col-m-8 {
    width: 66.66%;
  }
  .col-m-9 {
    width: 75%;
  }
  .col-m-10 {
    width: 83.33%;
  }
  .col-m-11 {
    width: 91.66%;
  }
  .col-m-12 {
    width: 100%;
  }
}

@media only screen and (min-width: 768px) {
  /* for desktop */
  .col-1 {
    width: 8.33%;
  }
  .col-2 {
    width: 16.66%;
  }
  .col-3 {
    width: 25%;
  }
  .col-4 {
    width: 33.33%;
  }
  .col-5 {
    width: 41.66%;
  }
  .col-6 {
    width: 50%;
  }
  .col-7 {
    width: 58.33%;
  }
  .col-8 {
    width: 66.66%;
  }
...
...

  <link rel="stylesheet" href="kevin1.css">
</head>

<body>

  <div class="header">
    <h1>Rellim Nievk Photography©</h1>
  </div>


  <div class="row">

    <div class="col-3 col-m-3 menu">
      <ul>
        <li><a href="index.html">Home</a></li>
        <li><a href="portfolio.html">Portfolio</a></li>
        <li><a href="https://www.instagram.com/rellim_nivek_/">Instagram</a></li>
        <li><a href="contact.html">Contact</a></li>
      </ul>
    </div>

    <div class="col-6 col-m-9">
      <p class=>Rellim Nievk Photography© is a photographer working out of north central Connecticut. His predominant field of expertise is automotive photography at car shows and events in and around the northeast part of the United States. He also does lots of
        general artistic photography of things like people and scenery. You may view his portfoilo here on the website, as well as on his instagram <a href="https://www.instagram.com/rellim_nivek_/">here</a></p>
    </div>


    <div class="col-3 right col-m-12 right">
      <div class="aside">
        <h2>INSERT TEXT HERE</h2>
        <p>Insert Text heer</p>
        <h2>INSERT THE TEXTS HERR YO</h2>
        <p>oooooweeee forrmatting tests!!!</p>
      </div>
    </div>

  </div>

  <div class="fixed-bg"></div>

  <div class="footer">
    <p>©2017 Rellim Nievk Photography</p>
  </div>


  <div class="clearfix"></div>


</body>


</html>

If anyone has any suggestions or insights, they would be greatly appreciated!

Answer №1

To ensure your columns are vertically centered, it is recommended to utilize the bootstrap container. The standard structure involves using container -> row -> column for optimal alignment.

<div class="container">
    <div class="row">
        <!-- Add your content here -->
    </div>
</div>

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

Troubleshooting issue with CSS in Django_tables2

Working with the django_tables2 plugin for the first time has been an interesting experience. I followed the installation and quick start guide provided in their documentation. After pip-installing django-tables2, adding 'django_tables2' to my ...

How can I simulate pressing the ENTER key in Selenium without selecting any element?

Having trouble using the firefox selenium plugin and sending the enter key after pasting text? The ENTER key press should not interact with any other element on the page, just a simple 'dumb' ENTER key press. error [error] Element name=code not ...

Error encountered while using the getJSON code syntax

Is there an issue with this code snippet? I am receiving a syntax error on line 1: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Demo</title> </head> <body> <script src="http:/ ...

Python Selenium is having trouble finding the elements

I've been struggling for hours to extract the specific text from a variety of elements on a website. I attached 2 images in hopes that they will help in identifying these elements by their similarities, such as having the same class name. The black un ...

Obtaining a link to a Wordpress post

How can I fix the 403 ERROR when trying to display a post thumbnail and direct the user to that post in PHP? I'm new to programming and unsure of what is causing this issue. PHP <?php query_posts('cat=5'); while (have_posts()) : the_pos ...

Struggling to pass a function to a stateless functional component in React

I'm currently working on a drum machine project in React as part of my freeCodeCamp tasks. I have successfully rendered the buttons, but I am facing difficulty in making them play the audio files. I've built a stateless functional component that ...

Insert PHP script within jQuery

My jQuery function includes HTML select and input elements, displaying a form with a selectable value named "olcu." <script type="text/javascript"> $(document).ready(function() { $("#add").click(function() { var intId = $("#buildyourfor ...

Insert half a million records into a database table using JavaScript seamlessly without causing the webpage to crash

I am facing an issue with my report system where running a single report query results in over 500,000 rows being returned. The process of retrieving the data via AJAX takes some time, but the real problem arises when the browser freezes while adding the H ...

Jquery Ajax Request

My goal is to create an Ajax call with the following specifications: $.ajax({ type: "GET", dataType: "json", contentType: "application/json", username: "user123", password: "admin123", url: "http://localhos ...

The iPad scroll did not meet the condition for reaching the bottom

Looking to modify the footer when the bottom of the page is reached via scrolling, I implemented the following code: if($(window).scrollTop() + $(window).height() == $(document).height()) This condition successfully detects whether the scroll has reached ...

How to use ajax to add multiple products to the cart in WooCommerce using a single add-to-cart button?

My goal is to utilize ajax in order to add multiple, distinct products to the cart with a single click of a button. The AddToCart-Button is located in SHOP before pagination. Whenever I try to add multiple products to the cart at once, the Ajax request is ...

Response is null in the success callback of the AJAX function

Within my codebase, I have a function designed to remove a user from the database by utilizing a Web API call. This server-side function provides feedback in the form of a string confirming whether the user was successfully located and deleted or if the pr ...

Shrink the size of the fixed navigation menu

I am experiencing a significant issue with a fixed menu when the browser is resized, as the list items are overlapping and extending beyond their defined section. It's quite frustrating :(. I have been considering two possible solutions: 1: Set a fixe ...

How can I place an inline element on the same row?

Here is a code snippet that I am working on: <div id="header"> <p>Home</p> <p>Home</p> <p>Home</p> <p>Home</p> </div> I'm trying to display this element centered and inlin ...

What does it mean when an "Unidentified column in the field list" error occurs?

I've encountered a problem with my HTML+PHP code. Whenever I try to input data into this table within my database, an error message pops up saying "Unknown column 'phone_outlet' in 'field list'"... What should I do? :( I can't ...

Easily transform your Twitter Bootstrap menu dropdown to appear on hover instead of click with this simple solution

Is there a way to make the toggle dropdown button display the dropdown menu when hovering over it instead of clicking? I tried using the Bootstrap method $().dropdown('show'). What are your thoughts on this approach? $(document).on("mouseenter ...

Python Selenium: Clicking a Button

Here is the HTML code I am currently working with: <button aria-label="Nur zuhören" aria-disabled="false" class= "jumbo--Z12Rgj4 buttonWrapper--x8uow audioBtn--1H6rCK"> I am trying to automate the clicking of the button using the following Python ...

Excessive Margins in Bootstrap on Mobile Devices

After attempting to create a webpage using Bootstrap 3.3.6, everything looked good on my laptop. However, when I tried to view it on mobile devices using Chrome and other browsers, there was a significant offset issue. Current situation: https://i.sstati ...

The form transmits the URL parameter rather than executing an update

I'm having trouble with my code and can't seem to figure out why it's behaving this way. When I try to update a recordset, the page reloads upon hitting the submit button and multiple URL parameters appear in the address bar. There are two ...

Error message: An attempt to call an undefined function get_query_var() has caused a fatal

Recently I encountered a file named: taxonomy-product_cat-ford.php On my homepage, there is a menu that displays: All car | ford | toyota By default, the homepage always shows all cars. To specifically load the content of taxonomy-product_cat-ford.php, I ...