Leveraging the power of Bootstrap 4 to place the footer beneath all remaining content on the

I am currently working on a React application that consists of a header, container, and footer. To add animation to the route loading process, I had to apply position: absolute to the container section of the page.

Within the container, there is a row with 2 columns - one for the menu and the other for the page content. However, the issue arises when the second column, which has a position: absolute, causes the footer to go underneath the taller column.

Is there a method to ensure that both columns within the row have the same height? The application is built using Bootstrap 4, so any alternative suggestions are welcome.

<header>..</header>
<div class="row">
 <div class="col-4">

 </div>
 <div class="col-8"> //This is positioned absolute
  <div class="page"><div> // class that applies position
 </div>
</div>
<footer>..<footer> //footer goes below any column whichever has more height.

Edit: CSS:

.page {
    position: absolute;
    left: 0;
    right: 0;
}

All other classes are Bootstrap.

You can see the issue if you can log in to the below app with any email and any password.

As in the picture below, the footer overlaps the content. Footer sits just below the menu column as the content column is given a position absolute.

https://i.sstatic.net/E8vej.png

Answer №2

To effectively design your layout, consider implementing a table structure similar to the example provided:

.table-row{display: table; table-layout: fixed; }
.table-col{display: table-cell; float: none; vertical-align: top; } 

<header>..</header> 
  <div class="row"> 
    <div class="table-row"> 
      <div class="col-4 table-col"> </div> 
      <div class="col-8 table-col"> //Utilize absolute positioning here ...... 
      </div> 
    </div> 
  </div>
<footer>..<footer>

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

What could be the reason for meteor not injecting the text from my template helpers?

My goal is to dynamically generate a table displaying two different sets of data. Despite having verified returns from my database, the rendered page does not show the corresponding HTML elements as expected. Here is the template and HTML code: <templ ...

To access a form element in JavaScript function, utilize the dynamic form name approach

Currently, I am facing an issue with a JavaScript alert function where I am trying to view the HTML form URL before it is submitted. Following advice from a post on StackOverflow about retrieving form submit content before submit, I attempted to implement ...

Copying to the clipboard now includes the parent of the targeted element

Edit - More Information: Here is a simplified version of the sandbox: https://codesandbox.io/s/stupefied-leftpad-k6eek Check out the demo here: https://i.sstatic.net/2XHu1.jpg The issue does not seem to occur in Firefox, but it does in Chrome and other ...

Click the custom button to launch the DatePicker or DatePickerDialog

Is there a method to activate the DatePickerDialog to appear using an external control or button besides the default input that comes with the DatePicker component? Our project utilizes the material-ui library. ...

Z-Index not functioning as expected

I've been trying to position my <h1> header on top of a light div with a background image called light.png. I used Z-index to stack them and added position:relative, but for some reason, the <h1> is not showing above the <div class=ligh ...

When adding a new div, ensure it is counted and delete it once a new div is added

When clicked, a new div is added. When clicked again, another div with the same content is created as a duplicate. Q: Is there a way to remove the previous div when a new one is created? $(document).on('click', '.LibSectOpen', functio ...

Navigation bar refuses to collapse in Bootstrap version 4.0.0-alpha.5

I am currently working on a website where the php header and footer work perfectly in the HTML version, but in the php version, the navbar does not return. Here is my header code: <div class="container"> <div class="row"> ...

Ways to invoke a function in HTML aside from using the (click)="function()" syntax

How can I display data from a GET request to the WordPress API as the page loads in an Ionic app using Angular? I am able to retrieve my desired post list, but only when I use a button click event to call the method in the HTML. Since this is my first att ...

Responsiveness of the element along the vertical axis

I have an element that, when clicked, should display additional content. However, when the headline contains a lot of text, the element does not expand vertically as it should. Thank you for your help! Check out how it looks currently This is my HTML co ...

Error: The URL specified in /accounts/detail could not be found

I encountered an error with the message "NoReverseMatch at /accounts/detail - Reverse for 'upload' with arguments '()' and keyword arguments '{}' not found. 1 pattern(s) tried: [u'accounts/upload/(?P\d+)/$']". T ...

React component closes onBlur event when clicked inside

I recently developed a React component using Material UI which looks like the code snippet below: <Popper open={open} anchorEl={anchorRef.current} onBlur={handleToggle} transition disablePortal > <MenuList autoFocusItem={open}> ...

The map function paired with the filter function

I am looking to create a function that will display label names from an array and then filter based on the IDs obtained. The goal is to filter where the ID from the first array matches within a second array, and then display all matching IDs. The FIRST ar ...

I'm curious if there's a method to ensure that the content within a mat-card stays responsive

So I'm working with this mat-card: <mat-card> <mat-card-content> <div *ngFor="let siteSource of siteSources | paginate: { itemsPerPage: 5, currentPage: page};"> <site-details [site]='siteSource'></s ...

Exploring GitHub's sleek popup: in search of CSS styling!

Exciting news from Github: they have introduced a new feature called maps. This feature is developed using Leaflet, and it has some unique custom CSS for the pop-up design: I'm eager to implement something similar on my site, but I'm having trou ...

Checking out a mongodb record by object identification

I've been building an inventory system using the MERN stack. However, when I attempt to view products with the code below, it always returns 'No Matching Product' even though there are matching products in my collection. The backend works fi ...

Encountering difficulties installing React Native with the expo-cli command on a Windows system

Just stepping into the world of react-native! I've been following a tutorial on installing react-native from this YouTube video. However, I encountered an error during installation, here is what it looks like: Error: npm ERR! This is an error with np ...

I want to have a video playing in the background of my home page, but when viewers access it on their mobile devices, I would like to display a specific image instead

Is there a specific attribute I can include to make the image display instead of the video on mobile or small devices? ...

How can one go about incorporating the feature "updating list upon clicking a label" on a webpage?

On my website, I currently display a comprehensive list of publications. However, I am looking to organize these publications by various research topics using labels. Ideally, when clicking on a specific label, only the papers related to that topic will be ...

What is the method for establishing xpath for non-sequential words within a single attribute?

There is a single tag present : <span class="abc pqr and xyz"> I am looking to locate this specific tag in the DOM using xpath. I have attempted the following: //span[contains(@class,'abc pqr')]..... The term 'and' in the cla ...

The robots.txt of Websiteplanet does not specify a sitemap URL

This is how my robots.txt file is set up: User-Agent: * Disallow: /info/privacy Disallow: /info/cookies Allow: / Allow : /search/Jaén Allow : /search/Tarragona Allow : /search/Rioja Sitemap: https://www.alquileres.xyz/sitemap.xml However, when I verify t ...