Repair the bottom section on Bootstrap

I've successfully made the image stick to the footer, but I'm struggling to get the footer to stick to the bottom when in responsive mode. I'm new to bootstrap, so any help would be greatly appreciated.

HTML: The footer is located after the table.

<div class="instructables-container" id="instructables" style="position: relative; margin-left: 0px;height: 10px; ">
    <div class="container">
        <div class="row">
            <div class="col-lg-12 text-center">
                <h2 class="section-heading" style="color: #2E2E2E; text-align: center;">INSTRUCTABLES</h2>
                <hr class="primary">
            </div>
        </div>
    </div>
    <div class="container">
            <div class="row">
                <div class="col-lg-3 col-md-6 text-center">
                    <div class="service-box">
                        <p style="font-size: 60px;">x</p>
                        <p>Instructables</p>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6 text-center">
                    <div class="service-box">
                       <p style="font-size: 60px;">x</p>
                        <p>xx</p>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6 text-center">
                    <div class="service-box">
                        <p style="font-size: 60px;">x</p>
                        <p>xx</p>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6 text-center">
                    <div class="service-box">
                        <p style="font-size: 60px;">x</p>
                        <p>xx</p>
                    </div>
                </div>
            </div>
        </div>

 </div> 

  <div class="footer" style="height:30%; background-color: white;">
        <div class="robot" style="position: absolute; margin:auto; left:0; right:0; bottom: 20px;">
            <a href="http://instructables.com/member/neroliko"><img src="http://i.imgur.com/q7GBNF1.png" /></a>
        </div>
        <div class="words" style="position: absolute; width:100%;background-color:#E6E6E6; bottom:0px;">
             <p style=" font-size: 13px; font-family: 'Open Sans', 'Helvetica Neue', Georgia, serif;">Contact: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1d73786f7271747676755d7a707c7471337e7270">[email protected]</a> </p>
        </div>
  </div>

CSS:

.instructables-container {
    margin-top: 25px;
    margin-bottom: 300px;
    margin-left: 0px;
    letter-spacing: 2px;
    line-height: 2;
    font-size: 15px;
    font-family: Helvetica;
}

.table{
    margin-top: 80px;
    text-align: center;
    margin-left: 11%;
    border: 0px;
}

.footer {
    position: absolute;
    font-family: Helvetica;
    letter-spacing: 3px;
    width: 100%;
    height: 40px;
    line-height: 20px;
    font-size: 4px;
    text-align: center;
    height:400px;
}

Answer №1

.container-instructables {
    margin-top: 25px;
    margin-bottom: 300px;
    margin-left: 0px;
    letter-spacing: 2px;
    line-height: 2;
    font-size: 15px;
    font-family: Helvetica;
}

.table{
    margin-top: 80px;
    text-align: center;
    margin-left: 11%;
    border: 0px;
}

.bottom-bar {
    position: absolute;
    font-family: Helvetica;
    letter-spacing: 3px;
    width: 100%;
    height: 40px;
    line-height: 20px;
    font-size: 4px;
    text-align: center;
    height:400px;
}
.test div{
  z-index:1;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container-instructables" id="instructables" style="position: relative; margin-left: 0px;height: 10px; ">
    <div class="container">
        <div class="row">
            <div class="col-lg-12 text-center">
                <h2 class="section-heading" style="color: #2E2E2E; text-align: center;">INSTRUCTABLES</h2>
                <hr class="primary">
            </div>
        </div>
    </div>
    <div class="container">
            <div class="row test">
                <div class="col-lg-3 col-md-6 col-xs-6 text-center">
                    <div class="service-box">
                        <p style="font-size: 60px;">x</p>
                        <p>Instructables</p>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6 col-xs-6 text-center">
                    <div class="service-box">
                       <p style="font-size: 60px;">x</p>
                        <p>xx</p>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6 col-xs-6 text-center">
                    <div class="service-box">
                        <p style="font-size: 60px;">x</p>
                        <p>xx</p>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6 col-xs-6 text-center">
                    <div class="service-box">
                        <p style="font-size: 60px;">x</p>
                        <p>xx</p>
                    </div>
                </div>
            </div>
        </div>

 </div> 

  <div class="bottom-bar" style="height:30%; background-color: white;">
        <div class="robot" style="position: absolute; margin:auto; left:0; right:0; bottom: 20px;">
            <a href="http://instructables.com/member/neroliko"><img src="http://i.imgur.com/q7GBNF1.png" /></a>
        </div>
        <div class="words" style="position: absolute; width:100%;background-color:#E6E6E6; bottom:0px;">
             <p style=" font-size: 13px; font-family: 'Open Sans', 'Helvetica Neue', Georgia, serif;">Contact: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="107e75627f7c797b7b7850777d71797c3e737f7d">[email protected]</a> </p>
        </div>
  </div>

You should include the appropriate classes for mobile screens by defining the width for each div on smaller screens. Utilize the bootstrap class .col-xs-6 to ensure one of these divs takes up half of the screen. Here is your HTML code along with a jsfiddle

Avoid using inline styles and opt for internal or external styles instead!

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 is the best way to utilize mysql for storing user state in order to restrict them from taking a particular action more than once per day?

< button type="button" id="daily-reward-button">Claim</button> 1) When a user clicks this button, it should be disabled which will result in the user being banned in the MYSQL database and unable to click the button again. 2) The button shoul ...

Tips for updating the content of a div and navigating within a tab in one go

Embedded within a tab are several radio buttons and a div. By clicking on a button, I use Ajax to replace the div with specific content, which works perfectly. My ultimate goal is to navigate within the tab, meaning that, from within the div, I can click a ...

HTML links have been disabled

I have been making updates to the charity website I manage, heroinitiative.org. You can view the revamp progress here: (please note that this is not live code, it is simply for my boss to see the progress and does not need to be kept secret, hence why I a ...

Troubleshooting Issues with jQuery Accordion Buttons

I have a nearly complete accordion that just needs some adjustments. HTML CODE: <footer> <div> <h1>Hide</h1> <h1>Hide</h1> <h1>Hide</h1> <h1>Hide</h1> ...

Tips for utilizing the form.checkValidity() method in HTML:

While delving into the source code of a website utilizing MVC architecture, I encountered some difficulties comprehending it fully. Here is a snippet of the view's code: function submitForm (action) { var forms = document.getElementById('form& ...

duplicate styling for individual table cells

I am in need of a span element inside a td tag that I am generating within a table. In order to ensure the span fills the td, I have set it as an inline-block with a width and height of 100%. However, when pressing the delete key in the last cell, it star ...

The back button functionality in Android cannot be altered or overridden using JavaScript

Hey everyone, I'm currently in the process of developing a mobile application using phonegap. I'm facing an issue where I want to disable the functionality of the back button from navigating to the previous page. I simply want it to do nothing or ...

Styling in sass gets even more powerful when using custom selectors that are

Using these mixins makes it easy to work with BEM syntax in sass 3.3.2: =b($name) .#{$name} @content =e($name) &__#{$name} @content =m($name) &--#{$name} @content +b(menu) +e(item) color: grey +e(item) +m(alert) ...

Is there a way to maintain the selected position on the drop-down menu for users?

Whenever I choose an option from the drop-down field in my form, it automatically jumps back to the top of the page. Just to clarify, I have a drop-down menu at the top of the page and several input fields below. Users need to scroll down to reach the dro ...

Determining when a message has been ignored using php

One of the features I am working on for my app is adding announcements, which are essentially personalized messages to users. Once a user receives a message and dismisses it, I want to ensure that specific message does not appear again. Here is the PHP co ...

Creating a table in VueJs and populating it with values retrieved from an MSSQL database in a .NET Core web application

I am developing a table within a .NET Core Web Application that includes multiple rows and columns filled with data retrieved from a MSSQL server through a WEB API Given the need for numerous rows and columns, I am considering using a for loop inside my & ...

Leveraging the power of PHP variables within jQuery code

Wondering how to incorporate a PHP value into jQuery? My approach involves retrieving the VAT rate from the database using PHP and storing it in $vatrate: $sqlv = <<<SQL SELECT * FROM `vatrate` WHERE id='1' SQL; if(!$resultv = $db-&g ...

Connecting CSS auto-complete with JSP content within Eclipse

Is there a way to connect the CSS autocomplete with the content of a JSP page? For instance, if I have an element like <div id="myid"> in the JSP file, can Eclipse auto-complete "myid" when typing "#" in the CSS file? I am aware that NetBeans has th ...

What is causing my div exchange using .class to fail?

Struggling to convert this code from working with IDs to Classes. The code reveals one Div while hiding another based on the onClick event. Originally, it was straightforward because the div location was absolute. In the classes version, I need to revea ...

Is there a way to apply the style property only when a component is hovered in Next.js?

I would like the ability to hover over a component and have it display with unique CSS characteristics. For instance, if I hover on item A, I only want item A to stand out from the rest. Currently, I am using this method of changing the element's bac ...

Issues with displaying search form div using jQuery AJAX

Currently, I am in the process of developing a search form that includes a dropdown menu. The functionality involves selecting an item from the dropdown menu triggering an AJAX call to another PHP file. This call returns tags which resize both the dropdown ...

Divs are being obstructed by the navigation bar

I am seeking a solution to prevent div elements from being positioned below my navigation/information bar when the screen width is minimized. The information bar has a height of 1200px and I would like it to stay on the left side without any overlapping fr ...

Combination of words & design having "background-image:url"

Currently utilizing Thymeleaf within a Spring Boot project, the following code initializes an image in the center of the screen (sourced from this .html ): <div class="col-lg-9 image_col order-lg-2 order-1"> <div class="single_product_image"& ...

Pressing the icon will trigger a top-sliding dropdown mobile menu to appear

How can I ensure my mobile dropdown menu slides in from the top when the user clicks the "header-downbar-menu" icon and slides out to the top when clicked again? Currently, the button only shows the menu but I am struggling with writing the JavaScript for ...

locate an inner div element

Here are two div elements: <body> <div id="divParent"> <div id="divChild"></div> </div> </body> What is the best way to select the divChild element using JavaScript? ...