Discover the magic of column re-ordering in Bootstrap 4.4!

Trying to rearrange the last column in the code below to display it in the 3rd position on md and up.

I have assigned the title "I want to be on the 3 place on md anb up" to the h2 tag that corresponds to that column.

Not sure what mistake I am making. I am currently using Bootstrap 4.4 version.

<section class="servicios">
  <div class="container">
    <div class="row">

      <div class="col-12 col-md-6 col-lg-4 wrapper-servicio">
         // Column content here 
      </div>
      
      <div class="col-12 order-md-4 col-md-6 col-lg-4 wrapper-servicio">
          // The column you want to move goes here
       </div>

      // Rest of the columns follow...

    </div>
  </div>
</section>

When using order-first or order-last, it works, but not with order-md-*. This might be due to the number of columns used. I structured it this way because I will need to iterate through them using a CMS later on.

Answer №1

Modified the order of elements within the specified div container to achieve the desired sequence. Updated classes order-md-3, order-md-4, order-md-5, and order-md-6 accordingly.

See successful result below:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Lora:400,700|Montserrat:300" rel="stylesheet">
<script src="script.js"></script>

<section class="servicios">
  <div class="container">
    <div class="row">

      <div class="col-12 col-md-6 col-lg-4 wrapper-servicio">
        <!-- Content Here -->
      </div>
      <div class="col-12 col-md-6 col-lg-4 wrapper-servicio">
        <!-- Content Here -->
      </div>
      <div class="col-12 col-md-6 col-lg-4 wrapper-servicio order-md-4">
        <!-- Content Here -->
      </div>

      <div class="col-12 col-md-6 col-lg-4 wrapper-servicio order-md-5">
        <!-- Content Here -->
      </div>
      <div class="col-12 col-md-6 col-lg-4 wrapper-servicio order-md-6">
        <!-- Content Here -->
      </div>
      <div class="col-12 col-md-6 col-lg-4 wrapper-servicio order-md-3" id="desired-placement">
        <!-- Content Here -->
      </div>

    </div>
  </div>
</section>

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

Looking for assistance with aligning an image in a <td> cell that doubles as a link?

How can I center a play icon in the middle of a td cell and make the entire content clickable as a link, including the background image? I've tried various methods but can't seem to get it right without breaking the alignment. Any suggestions wou ...

The Angular Shepherd Tour Guide is experiencing a bug where it does not scroll when the next page is clicked

I'm facing an issue where scrolling to the next element is not working properly. When I click on the next element, it moves there but does not scroll down automatically. I have tried various solutions but have been unsuccessful so far. If anyone can p ...

Ensure that Mathjax underscores are consistent with the height of other characters

Presented below is the latex code being used with Mathjax. \class{mathjaxCursor}{\text{_}} ...and here is the accompanying css: .mathjaxCursor { font-weight: bold; background-color: red; } This setup results in the following display: ...

Persistent hover effect for collapsible accordion panels when closing them

My simple accordion features a functionality where a class of .open is added to the title + content group when you open a panel for styling purposes. Everything works smoothly, but I've noticed on my phone that after clicking to close a panel, the hov ...

Quicker loading times for background images when creating PDFs using wkhtmltopdf

As I work on generating a 5-page PDF from my HTML file using wkhtmltopdf, everything seems to be running smoothly. However, I've encountered an issue when it comes to the time it takes to complete this task, especially when a background image is inclu ...

Viewing underlined text in iPhone with Bootstrap 5

Recently, I completed a project using Bootstrap version 5.1.3. Upon checking the mobile version on my iPhone XS, I noticed that all anchor tags (<a href="#">Something</a>) have underlined text. To address this issue, I attempted to re ...

The click function for the responsive navbar hamburger is not functioning properly

Having some trouble with the code not working in responsive mode. I've tested it on a 600px screen and the hamburger button doesn't seem to work (I click it and nothing happens). I've gone through both the CSS and JS multiple times but can&a ...

Revamp the button's visual presentation when it is in an active state

Currently, I'm facing a challenge with altering the visual appearance of a button. Specifically, I want to make it resemble an arrow protruding from it, indicating that it is the active button. The button in question is enclosed within a card componen ...

What is the best way to maintain an active listGroup even after reloading the page?

I'm currently working on a gallery project using the #listGroup bootstrap component. I would like to ensure that when a user clicks on one of the albums, the active state of the #listGroup persists even after the page is reloaded or refreshed. How can ...

Gradually Generated HTML website

Recently, I've been attempting to create a Sign-UP form using HTML and CSS in Notepad++, but I'm encountering a problem. Every time I try to test it on Chrome, the page loads incredibly slowly. I'm not sure if it's a configuration error ...

Showing ng-repeat values in a modal

I am having trouble displaying values in a bootstrap modal when clicking on a specific story from a list of stories with images, content, and titles using ng-repeat. I have tried calling the function showStories(), but it is not working as expected. The va ...

Guide to using Javascript to dynamically insert items into the shopping cart menu list

Greetings! I am diving into the world of JavaScript and currently facing a challenge while working on my eCommerce website project to enhance my web development skills. My query pertains to creating a dynamic system where, upon a user adding items to their ...

When using a routerlink in an a tag with Bootstrap 4, the navigation tab functionality may not work as expected

I've been working on bootstrap4 tabs and everything is working smoothly until I add a router link to the anchor tag. Strangely, only the hover effect works in this case. Can anyone help me troubleshoot this issue? Below is my code snippet: <link ...

What causes materialui styles to vanish upon refreshing in nextjs?

After consulting the materialui documentation (https://material-ui.com/guides/server-rendering/), I was able to find a solution, but I am still unsure of the underlying reason. Why does the style work initially during rendering but disappear upon subs ...

I'm interested in learning the best way to insert the images from this JSON file into the corresponding div elements

I have completed developing a clone of an Instagram web page. Although I can retrieve data from the JSON file and insert it into the <img> tag, I am facing difficulty in displaying each image above its respective .below-image div with consistent spac ...

I am looking to implement a dropdown menu that appears after clicking on an image. Any suggestions on how to achieve this using

I've been experimenting with adding a dropdown class, but I'm feeling a bit lost on where to start. Here's a snippet of code that shows what I'd like to do to add a dropdown menu: <span id="dropdown-info" ng-init= "myVar='i ...

What is the best way to ensure consistent code placement at the bottom of my Django Template using inheritance?

Lately, I've been working on incorporating a footer into my layout.html file that is inherited by all other pages within my Django project. I am aiming to create a footer that remains fixed at the bottom of every webpage just like how Stack Overflow ...

"I'm facing an issue with aligning elements in my ReactJS application using CSS Flexbox. Despite setting up a flexbox layout, I am unable to

Despite setting up a flexbox to align my elements, I am struggling with vertical centering on my page. I have made sure to use a container for the page and set brute size with viewport units. Here is my sandbox: https://codesandbox.io/s/rlk3j68pmq. Belo ...

The resizing issue persists with Angularjs charts

I have recently developed a small web application using AngularJS and I have implemented two charts from the AngularJS library - a bar chart and a pie chart. Although both charts are rendering correctly, they are not resizing properly as the display size c ...

Retrieve the width of a fixed div element based on the parent element's width, set

I attempted to set a fixed div to occupy 100% of its parent, but it is taking 100% of the screen instead. You can find the code I used here: http://codepen.io/rodboc/pen/ZOOEWp HTML <div id="wrapper"> <div class="box"> <div class="h ...