The expanding Bootstrap Footer is overlapping the content on the page, causing it to be hidden

I have implemented a bootstrap footer with position:absolute to ensure it remains at the bottom of my single-page website at all times.

The issue arises when I resize the screen width and reach around 980px, the footer height increases, obstructing most of the page content (specifically a login panel). This is frustrating as ideally, it should resize downwards to allow continuous visibility of the login panel.

So far, I have experimented with position:relative but this results in the footer lingering in the middle of the page, which is not the desired effect.

<body style="height:100%;min-height:100%">

<footer class="page-footer font-small indigo" style="position:absolute;right: 0;bottom: 0;left: 0;">
  <div class="container text-center text-md-left">
    <div class="row" id="footer">
      <div class="col-md-3 mx-auto">
        <h5 class="font-weight-bold text-uppercase mt-3 mb-4">Explore</h5>
        <ul class="list-unstyled">
          <li>
            <a href="#!">Link 1</a>
          </li>
          <li>
            <a href="#!">Link 2</a>
          </li>
          <li>
            <a href="#!">Link 3</a>
          </li>
          <li>
            <a href="#!">Link 4</a>
          </li>
        </ul>
      </div>
      <div class="col-md-3 mx-auto">
        <h5 class="font-weight-bold text-uppercase mt-3 mb-4">About us</h5>
        <ul class="list-unstyled">
          <li>
            <a href="#!">About us</a>
          </li>
          <li>
            <a href="#!">Trust and safety</a>
          </li>
          <li>
            <a href="#!">Help and support</a>
          </li>
          <li>
            <a href="#!">Contact</a>
          </li>
        </ul>
      </div>
      <div class="col-md-3 mx-auto">
        <h5 class="font-weight-bold text-uppercase mt-3 mb-4">How does it work?</h5>
        <ul class="list-unstyled">
          <li>
            <a href="#!">Link 1</a>
          </li>
          <li>
            <a href="#!">Link 2</a>
          </li>
          <li>
            <a href="#!"></a>
          </li>
          <li>
            <a href="#!"></a>
          </li>
        </ul>
      </div>
      <div class="col-md-3 mx-auto">
        <h5 class="font-weight-bold text-uppercase mt-3 mb-4">Links</h5>
        <ul class="list-unstyled">
          <li>
            <a href="#!">Link 1</a>
          </li>
          <li>
            <a href="#!">Link 2</a>
          </li>
          <li>
            <a href="#!">Link 3</a>
          </li>
          <li>
            <a href="#!">Link 4</a>
          </li>
        </ul>
      </div>
    </div>
  </div>
</footer>

</body>

Answer №1

It's recommended to implement breakpoints in your design.

@media (min-width: 992px){
    .page-footer{
        position:absolute;
        right: 0;
        bottom: 0;
        left: 0;
    }
}

To apply this code, ensure you remove the footer style from the HTML and move it into a separate .css file or embed it within a <style> tag.

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

The website is not displaying correctly

I've been working on building a website using the CakePHP framework, but I've encountered an issue where the site is sometimes not rendering properly. This results in either the CSS not being applied correctly or only partially applied. It's ...

Tips for creating CSS Grid elements that stay fixed to the viewport

I am attempting to achieve a 100vh viewport with multiple responsive overlays on top of it. I have managed to fix the header element on the viewport using position: sticky, but I am encountering issues with making the rest work in the same way. Additional ...

Leveraging Ajax XHR2 for uploading files and accessing values in PHP

I recently followed a fantastic tutorial online on how to use AJAX to upload a file in an HTML form. Here is the code snippet I used: HTML <input type="file" id="myFile" name="myFile" /> <input type="button" id="upload" value="upload" /> < ...

Having trouble getting my AngularJS directive with a number in the name to function properly

Check out my code snippet: app.directive('3dPlansSlider', function(){ return { controller: 'projectCtrl', restrict: 'E', templateUrl: 'views/3dPlansSlider.html', link: function(scope, element, attr ...

What is the best way to create a function that will only execute when the mouse is not hovering over a specific div?

My current code looks like this: function() { setInterval("getSearch()",10000); getSearch(); } ); However, I need to implement a functionality where the interval pauses if the mouse cursor hovers over a specific div on my ...

Can a website be designed to load a specific font for mobile phones, such as Arial Black for iOS?

Although the font Arial Black is commonly available on both Mac and PC systems, it is not accessible on iOS devices. Is there a way for a webpage to implement CSS techniques or tricks (such as assigning a class like "mobile" or "ios" to the body element), ...

Scraping content using xpath in a complex html layout

I have a large amount of HTML code that I need to process using XPath. There are two different ways in which the text "The Text" can appear: <div> The Text </div> <!-- OR --> <div> <span>The Text</span> </div> ...

Adjust the size using padding alone

My CSS specifies font size of 14px, line height of 14px, and padding of 7px on the top and bottom. The total should be 28px. When I apply these styles in a div, it results in a height of 28px. However, when applied to a ul li a element, the height becomes ...

Having a tough time navigating the Bootstrap upgrade from 2.x to 3.x - now my design is all out of whack

Upgrading my site to the newest version of Bootstrap has been quite the challenge. I'm noticing that despite the window size being the same, version 1 and version 2 of my site are displaying different @media sizes. What's going on? On the left i ...

The impact of increasing memory usage in Chrome by modifying global variables

Recently, I've been delving into optimizing JavaScript code for creating HTML5 games, particularly with a focus on mobile browsers. My journey began with comparing different engines and gradually simplifying the code to discover something that has lef ...

Office Outlook Client experiencing incorrect div width

I'm having trouble sending an email with HTML content because it's not displaying correctly in Microsoft Office Outlook when it comes to width. Any suggestions on how to fix this issue? <div style="width: 650px; border: 1px solid blue">hel ...

Fade out the content using jQuery and simultaneously change the div

I stumbled upon this interesting code snippet here: http://jsfiddle.net/7hqyq/ Being a novice in the realm of jQuery, I am curious to learn how one can modify the background color of the selected square (including the first square on page load) and implem ...

Can you please provide me with the steps on how to show only non-zero values in MySQL using PHP and

This image shows data entry into a MySQL database. The image above displays the output I am currently receiving, However, I want to show only non-zero fields as output, which means from the "Sample Received" column to the "Library QC" column only. The P ...

Allow only specified tags in the react-html-parser white list

Recently, I've been working on adding a comments feature to my projects and have come across an interesting challenge with mentioning users. When creating a link to the user's profile and parsing it using React HTML parser, I realized that there ...

What is the best method for removing extra spaces from an input field with type "text"?

I have an input field of type "text" and a button that displays the user's input. However, if there are extra spaces in the input, they will also be displayed. How can I remove these extra spaces from the input value? var nameInput = $('#name ...

Two objects precisely located in the same spot yet not visible simultaneously

There are two elements here. One is a transparent button, and the other is an image positioned behind it. The background property didn't work for me, so I attempted different variations without success: .top-container > button { background-ima ...

Ways to enlarge a YouTube thumbnail upon loading using JavaScript

I recently found a solution to my question on how to prevent YouTube videos from repeating even when different embedded codes are used. I have a specific need to resize the thumbnail image of my YouTube video to width:146px and height:124px when the page l ...

"Tailwind - where your brand shines with a sleek, modern logo that stands

I have a specific title width that I need to adhere to, and I'm looking to place a logo after the last word in the title. When the title is too lengthy, it wraps onto a second line. For example: My Title (insert logo here) Check out this CodePen us ...

React Material Design Cards for Responsive Layouts

Hi there, I am currently navigating my way through Material Design and attempting to ensure that the cards section is responsive by utilizing media queries and flex. However, I have encountered an issue where only a portion of the image is displayed when t ...

Attempting to adjust the style.color of a <label> element with JavaScript results in an error

Why does this code work in Firefox but not in IE9? // turn on the 'image file upload' field and its label document.getElementById('itemImageId').disabled = false; document.getElementById('labelForImageUploadID').style.color = ...