Tips on positioning divs in a vertical layout with CSS

I have a question about CSS. I have a simple footer with col-md-8 and col-md-4 classes. How can I arrange the col-md-8 above the col-md-4 at the media breakpoint of 720px (max)? I am new to CSS and would appreciate your help with this. Please run the snippet below to see the code.

/* <================== Footer ================> */

/*--- Footer Copyright ---*/
footer {
    background-color: #5A5A5A;
    color: #ffffff;
    padding: 10px;
}

footer .col-md-8 ul {
    list-style: none;
    display: inline-flex;
}

footer .col-md-8 ul>li {
    padding-left: 20px;
}

footer .col-md-8 ul>li>a {
    color: #ffffff;
}

@media only screen and (max-width: 720px) {
     
}
<!-- <======================== Footer ======================> -->
  <footer class="mt-3">
    <div class="row">
      <div class="col-md-4">

        <!-- Footer Copyright -->
        <p class="ml-4 mb-0">Copyright <i class="fa fa-copyright"></i> 2020 Swan. All Rights Reserved.</p>
      </div>
      <div class="col-md-8 pull-right">

        <!-- Footer Navigation -->
        <ul class="mr-4 mb-0">
          <li><a href="#">About</a></li>
          <li><a href="#">Contact</a></li>
          <li><a href="#">Private Policy</a></li>
        </ul>
      </div>
    </div>

  </footer>

Answer №1

To rearrange the columns, apply the order-first order-md-2 bootstrap classes:

/* <================== Footer ================> */

/*--- Footer Copyright ---*/
footer {
    background-color: #5A5A5A;
    color: #ffffff;
    padding: 10px;
}

footer .col-md-8 ul {
    list-style: none;
    display: inline-flex;
}

footer .col-md-8 ul>li {
    padding-left: 20px;
}

footer .col-md-8 ul>li>a {
    color: #ffffff;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<!-- <======================== Footer ======================> -->
  <footer class="mt-3">
    <div class="row">
      <div class="col-md-4">

        <!-- Footer Copyright -->
        <p class="ml-4 mb-0">Copyright <i class="fa fa-copyright"></i> 2020 Swan. All Rights Reserved.</p>
      </div>
      <div class="col-md-8 order-first order-md-2">

        <!-- Footer Navigation -->
        <ul class="mr-4 mb-0">
          <li><a href="#">About</a></li>
          <li><a href="#">Contact</a></li>
          <li><a href="#">Private Policy</a></li>
        </ul>
      </div>
    </div>
  </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

Checking for the Existence of a Database Table in HTML5 Local Storage

Upon each visit to my page, I automatically generate a few local database tables if they do not already exist. Subsequently, I retrieve records from the Actual Database and insert them into these newly created local tables. I am wondering if there is a me ...

Using jQuery.dataTables to choose all rows except the final column

I'm utilizing a table with jQuery.dataTables. I have a requirement to input dates in the last column. However, when I click to input a date, the row becomes deselected. The following code is meant for selecting all rows: Displayed below is the DataT ...

What are some successful methods for displaying extensive data lists to users in a meaningful and organized manner?

From dropdown lists to hover menus with fly-out options, there are various ways to present content on a website... I am managing a comprehensive list of U.S. military bases across the world for my website. This list includes both active and inactive bases ...

I prefer boxes to be aligned next to each other without any gaps, and I won't be

In my quest to showcase 3 boxes seamlessly lined up in a row, I am faced with the challenge of eliminating spaces between them. My goal is to accomplish this feat without resorting to the font-size property. html,body { height:100%; width ...

When the filter feGaussianBlur is applied to an SVG circle, it disappears on Safari but not on Chrome

While implementing the filter with feGaussianBlur to an SVG circle, I encountered a peculiar issue. It works perfectly on Chrome, but unfortunately, the circle disappears when viewed on Safari. https://i.sstatic.net/k916B.png https://i.sstatic.net/5Bfp9. ...

Difficulty maintaining root properties in AngularJS custom directive

I recently created a custom sidebar directive, and although it is loading correctly in the designated area, I am encountering issues with the dropdown functionality of certain tags. The desired behavior is for these tags to display their inner elements whe ...

Instructions on making a Popup appear after a specified duration of mouse inactivity on a webpage

Hello, I am new to web development and could use some guidance on creating a popup window for users to enter their username and contact number. It should be able to store this information in a database and activate after the user has been idle for about 10 ...

trigger a shortcode by clicking an HTML button

I am attempting to trigger a shortcode by clicking on a button. However, the code below is not functioning properly. When I click the button, it simply adds "/""" to my website's address without actually executing the shortcode. <div cla ...

Tips for selecting array [0] and turning it into a clickable link with JavaScript

My challenge lies in redirecting to a different URL when the user clicks on <a href="javascript:void(0)">Hotel Selection</a>. Below is my current progress. Grateful for any assistance! <div id="menu"> <ul> <li class= ...

Struggling to implement the UI router into my Angular Framework

I've been working on a framework that is supposed to be router agnostic. While I've managed to make it work with ngRoute, I just can't seem to get it functioning with UI Router. Here's a snippet of the main app module: (function () { ...

JavaScript fails to display image slideshows upon loading

Currently, I am utilizing a slideshow feature in order to display any additional images that may be retrieved from the globalgiving api. However, there is an issue with the slideshow not appearing when the page is initially loaded or when opening a modal, ...

Include specific javascript files only for smartphones

Recently, I encountered an issue with a JavaScript code that swaps background images on scroll down. To address the problem with debounce, I ended up setting different debounce times for various browsers (I am aware this is not the ideal solution, but it&a ...

Shifting the size of a React element with animation

Within my React-based application, I am attempting to execute a basic CSS3 width transition with the following code: .foo { transition: width 1s ease-in-out; } My objective is to apply a style to an element in the React component which is "width: xx% ...

How can I line up the bootstrap datepicker with a bootstrap column?

I currently have Bootstrap 3.3.7 and a bootstrap datepicker version 1.6.4 integrated into my project. However, I am facing an issue where the datepicker does not fill up the designated column within a div with the class col-md-6. Here is the HTML code sni ...

What is the best way to transfer a row value from one table to another and then reinsert it back into the original table

I attempted to transfer a row value from one table to another and then back to the original table, but unfortunately, I was unable to find a solution. $('#one tbody tr td input.checkbox').click(function() { if ($(this).attr('checked&apo ...

Refrain from engaging with "disabled" table rows to prevent user interaction

I have an HTML table with certain rows marked as 'disabled'. To make this clear to the user, I decided to apply a blur filter to the tr, resulting in a table that looks like this: https://i.stack.imgur.com/GcX67.png NOTE: You can view a live ex ...

What is the best method for locating X-Path for elements inside a frameset?

I need help creating a test case for Selenium because I am struggling to locate elements on my website. The issue seems to be related to the fact that my site uses an HTML frame set. When I try to select all links using Firebug: //a I do not get any res ...

What is causing the inconsistency in the widths of these HTML elements?

I recently created multiple div elements with a uniform width of 5px. Here is the CSS code I used: div { background-color: black; width: 5px; height: 100px; display: inline-block; } To my surprise, despite setting the same width for all divs, som ...

Challenging Trigonometry Puzzles in Javascript

In my project, I am creating an interactive application where a group of humans and bacteria engage in a game of chase. However, I encountered a problem where instead of moving directly towards their target, all entities would veer to the left. I attempt ...

The getText method in Selenium seems to be malfunctioning as it is unable to retrieve any text content from

Struggling to capture the text of WebElement using two different methods, but both are returning blank strings. // Method 1 d.findElement(By.id("deliveryDate")).getTex(); // Method 2 WebElement deliveryDate = d.findElement(By.id("deliveryDate")); Sys ...