Place objects at the bottom of the screen

I'm currently using Bootstrap 4 and facing an issue where I want to keep a row with some columns at the bottom of the page. However, when I add position fixed and set it to bottom, the placement gets disrupted and does not stay centered. I suspect this might be related to flex?

Here is the link to the JSFiddle for reference: http://jsfiddle.net/1dLrfsbh/1/

<div class="container-fluid">
    <div class="mt-3 text-center justify-content-center">
    <img src="https://via.placeholder.com/800x200" class="img-fluid logo" />

    <div class="chk-actions">
       <div class="row">
           <div class="col-lg-6">
              <a href="#">
                <img class="img-fluid" src="https://via.placeholder.com/800x200" />
              </a>
           </div>

           <div class="col-lg-6">
               <a href="#">
                  <img class="img-fluid" src="https://via.placeholder.com/800x200" />
               </a>
         </div>
      </div>
</div>

.chk-actions {
  position: fixed;
  bottom: 20px;
}

.chk-actions a {
  margin-bottom: 10px;
}

Answer №1

It seems that the issue is not related to flex, but rather to defining the position of the element. Currently, only the bottom value/position has been defined.

If assuming the default grid gutter in Bootstrap is 30px, you could simply add 15px for both left and right values.

.chk-actions {
  position: fixed;
  bottom: 20px;
  left: 15px;
  right: 15px;
}

.chk-actions a {
  margin-bottom: 10px;
}
<div class="container-fluid">
    <div class="mt-3 text-center justify-content-center">
    <img src="https://via.placeholder.com/800x200" class="img-fluid logo" />

    <div class="chk-actions">
       <div class="row">
           <div class="col-lg-6">
              <a href="#">
                <img class="img-fluid" src="https://via.placeholder.com/800x200" />
              </a>
           </div>

           <div class="col-lg-6">
               <a href="#">
                  <img class="img-fluid" src="https://via.placeholder.com/800x200" />
               </a>
         </div>
      </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

Navigating multi-level drop-down menus on touch devices can be tricky, but there are ways to effectively

I recently created a website using HTML and CSS with a three-level navigation menu that worked perfectly on desktop. However, the issue arises when users access the site from touch devices like smartphones or tablets because the sub-menu does not appear wh ...

Position a modal in the vertical center with scroll functionality for handling extensive content

Looking for ways to tweak a Modal's CSS and HTML? Check out the code snippets below: div.backdrop { background-color: rgba(0, 0, 0, 0.4); height: 100%; left: 0; overflow: auto; position: fixed; top: 0; width: 100%; z-index: 2020; } ...

How to switch between classes for elements and return to the original one when none of the elements is chosen

Hello there, I need some assistance. Here's the scenario: I am working with a grid of six items. My goal is to have the first item in the grid become active by default. When the user hovers over any of the remaining five items, I want the active clas ...

Achieving equal height for the inner div in Flexbox to match the height of its parent

I am currently using flexbox to structure a web application. While it is functioning as expected for most parts, I am encountering an issue with the main content area. The "router-view" element has the desired full height, but the nested div inside of it d ...

List on the Left Side with Scroll Capability

In my ASP.NET web application that targets .NET 3.5 and utilizes an AJAX asp:UpdatePanel, I have structured the page layout using multiple div elements to divide the vertical space into sections - header, first content, second content, third content, and f ...

- Challenges with internal systems

I have a dialog window where I want to display a confirm dialog when clicking Cancel. To achieve this, I am creating a div element with some text that should be shown in the confirm dialog. However, the issue I'm facing is that the text intended for t ...

Expanding Tile Size in Grids Using CSS and JavaScript

I have a strong grasp of CSS and JS, utilizing jQuery for this particular project. The design includes a fluid grid made up of an unordered list with 'li' tags. Each tile has uniform width and height, adjusting to the browser window size by wrapp ...

The Art of Determining the Text's Baseline

My goal is to create a test that determines whether the text rendered inside an <input> has the same baseline as a label: To achieve this, I want to calculate the baseline of the rendered text in each element and compare their values. Is it possible ...

Bootstrap causing issues with file uploads

Using Bootstrap 4.0.0 <div class="container"> <div class="jumbotron mt-3" style="padding: 0.6em 1.6em;"> <h4>File Uploader</h4> <form enctype="multipart/form-data" action="/myurl/?action=upload" method="POST"> ...

Calculating the percentage width in jQuery by subtracting pixels is not producing the expected elasticity in

Seeking a solution to the CSS calc issue by turning to jQuery (since calc does not work on Explorer) - however, encountering an issue where setting the width minus pixels causes the columns to lose their elasticity and overlap on jsfiddle (although they ap ...

Tips for styling the edit, update, and delete buttons on a gridview using Bootstrap in an ASP.NET web form

I am currently working on a gridview in an ASP.NET web form that has edit, delete, and update buttons enabled. I am looking to customize the appearance of these buttons as they currently look like simple hyperlinks by default. Below is the code snippet fo ...

The HTML email appears distorted on Yahoo and Outlook, but displays correctly on all other platforms

Basically, I have an HTML email that was converted from a PSD file. I sliced the layers, made some changes to the URLs, and did a test email. The email looks fine on most email clients, but when I send it to Yahoo Mail or Hotmail/Outlook and open it in Chr ...

Tips for populating a row in the Bootstrap grid with the assistance of the mr or ml classes

I've come across a roadblock here. The issue arises when attempting to fill the Bootstrap row while also utilizing mr (or ml). Initially, I attempted to calculate the numbers so that they add up to 12. In my 3-column layout, I have a column of 5, fol ...

"The Fieldset Legend Mystery: Unraveling Internet Explorer's

I'm at my wit's end. Currently, I am customizing the front end of an ASP.NET built website, and one of the sections includes a fieldset with a legend. However, this specific area appears differently on IE, Firefox, and Chrome. Out of the three, ...

What could be the reason for the absence of this Javascript function in my attribute?

I have been working on an app using electron, and I have a function that successfully adds tabs to the app. The issue arises when I try to add tabs via JavaScript with the onclick attribute - they show up as expected but do not execute the code to hide and ...

Halt the CSS transition on the preceding element

I tried to pause a CSS transition and came across a question with a solution that seems similar: Is there a way to pause CSS transition mid-way? However, I couldn't make it work for my code. I suspect the issue lies with the before element. What cou ...

What could be causing the black spaces to appear after my text in HTML?

I recently tried to implement text on an image following a tutorial I found at https://css-tricks.com/text-blocks-over-image/. Here is the code snippet I used: .image{ position: relative; } h2{ position:absolute; top: 200px; left: 200px; wi ...

Aligning a list in the center without adding any indentation

So, I have this list that I want to center using some CSS magic. I did some searching and found a solution to remove the list style and left margin. But I really want to make sure it's perfectly centered, so I added text-align:center;. However, I not ...

Utilizing JavaScript to dynamically set a CSS file from an API in AngularJS

I am currently facing an issue with integrating a CSS file returned by an API into my entire website. Since the URL of the CSS file keeps changing, hard coding the URL is not feasible. While I have successfully implemented this on 'view1', my goa ...

Positioning the footer to sit at the bottom of my webpage, leaving a pleasing margin at the top

One technique I frequently use to ensure my footer stays at the bottom of my page is by utilizing an empty div. Here's how the code looks: <body> <div id="canevas"> <article>My website's content</article> ...