Is it possible to display the middle column at the top on small screens using Bootstrap 3?

The code snippet below displays "1 2 3":

<div class="row">
    <div class="col-md-3">
        1
    </div>
    <div class="col-md-6">
        2
    </div>
    <div class="col-md-3">
        3
    </div>
</div>

In order to prioritize the main contents on smaller screens, particularly phones, is there a way we can have it displayed as "2 1 3"?

Answer №1

One possible solution is to implement the following code snippet:

<div class="row">
    <div class="col-md-6 col-md-push-3">
        2
    </div>
    <div class="col-md-3 col-md-pull-6">
        1
    </div>
    <div class="col-md-3">
        3
    </div>
</div>

Check out a demonstration here:

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

Guide on shifting components (main page, attributes, cost, drop-down menu) to the right section of the navigation bar?

<div class="container"> <nav class="navbar navbar-toggleable-lg fixed-top navbar-light bg-faded"> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navb ...

What is the best way to reset a CSS background GIF after hovering over it?

Is there a way to create a texture animation with text using CSS background GIFs that reload when hovered again? I've tried some JavaScript/jQuery but can't seem to make it work. Any suggestions? I attempted the following approach, but it's ...

Utilizing AngularJS to create dynamic styles with an expanded class functionality

I am attempting to showcase a status label that will show various background colors and text depending on the status using AngularJs (for example, 'New' = green, 'Active' = yellow). Currently, I have a CSS file with .status { padd ...

Begin an unnumbered hierarchical list commencing at 1.2.1

I am trying to create a nested unordered list with specific numbering. My goal is for the list to start at "1.2.1, 1.2.2, etc." Please refer to the attached fiddle for reference. The desired outcome is shown in the following image: https://i.stack.imgur ...

modify the color of text in a row within a jquery ajax table

Is it possible to change the font color of values in a row based on a condition inside a function? Specifically, if the TotalStudent count exceeds the room capacity, can we add student information to the table with red font color? Below is my attempt using ...

What is the best way to choose an unidentified HTML element that contains text content?

In today's world, we often use CSS modules or other methods to hide classes and IDs. However, there are times when we need to select elements using JS selectors, and that can be a bit tricky. Let's take an example. If we look at the home screen ...

The issue with HTML/CSS is that it does not display video backgrounds correctly on mobile devices

On mobile, I have a code that displays a video with only a play button visible without the video itself. Once I click on play, the video starts playing as expected, but I would like to have something behind it. Here is how it currently appears: https://i ...

Tips for centering a div vertically inside another div that has a background image

My goal is to center the text within the background image, keeping it centered on all devices. Initially, I used a fixed pixel margin-top value, but I need it to be a percentage so that it remains centered as the screen size changes. However, when I change ...

Position the component at the center of another component

Looking to center a component inside another component. I have a div with two components - the main one and a banner that I want to display in the center of the main component. Check out my issue on this jsfiddle: https://jsfiddle.net/CanadianDevGuy/vjb4k ...

Providing data in response to a completed form submission

As a beginner, I'm attempting to accomplish the following task: a user selects options from three dropdown menus within a form, and the chosen values are then sent to another file for processing. action="process.php" method="post" In the processing ...

The struggle of positioning two divs in alignment

In my HTML code, I have a div container named row3red3. Inside this container, there are two divs: left (.row3red3slika) and right (.row3red3info). I am facing an issue where I cannot position the right div .row3red3info on top, inline after the image. I ...

How can CSS grid be utilized to create columns of various widths that wrap onto a new line

Struggling with CSS grid in my new responsive design, particularly regarding wrapping. The issue is with a nav bar containing a header that needs to be aligned left and four buttons that should be aligned right. Currently, using: grid-template-columns: r ...

Challenges with responsive layout of flex items

Utilizing Tailwind CSS, I have designed this div element: https://i.sstatic.net/FDloP.png However, an issue arises when the div is resized: https://i.sstatic.net/Sq309.png Using white-space: nowrap causes it to extend beyond the div boundaries. https://i ...

Learn how to incorporate unique breakpoints in Bootstrap 4 and effectively utilize responsive breakpoint mixins in SCSS for a tailor-made responsive design

I am currently developing an Angular 5 application that requires responsiveness. I am encountering difficulties in making it responsive for different resolutions such as 1366X768 and 1920X1080 where font sizes vary. Issue 1: I have customized breakpoints ...

"Strategies for aligning the div to the center of the entire page

Is there a way to vertically center content? I attempted using padding on top and setting vertical alignment, but it doesn't seem to work on mobile view. Can someone provide some guidance? <div style="padding-top:200px;vertical-align: middle;" ali ...

Using the CSS trick of First-of-type and Last-of-type can result in shortened rounded edges when viewed in IE11

When using the radio+label trick to style radio buttons, a peculiar issue arises in Internet Explorer 11 (IE11). The first and last buttons in each set appear to have their bottom parts cut off or shortened, depending on the background displayed. Removing ...

How can I modify the orientation of the arrow and switch sides in a dropdown submenu?

I am working on creating a menu with dropdown-submenu functionality using CSS. .dropdown-menu { float:left; } .left-submenu { float: none; } .left-submenu > .dropdown-menu { border-radius: 6px 0px 6px 6px; left: auto; margin-lef ...

Anchor elements are not enclosed by borders

I seem to be overlooking something obvious here, so my apologies in advance. I have the following HTML code and I am trying to use a CSS rule to add a border around the "third-content-wrapper" class. However, the border is only applied to the text and no ...

Selenium: Element not found using class and id selectors

When attempting to scrape a website, I wrote a loop that successfully located all the elements. However, my issue is that the next button id changes with each page, making it impossible to use the id as a reliable locator. For example, on page 1, this is ...

Establish limits for draggable item

I am working on a project where I have a draggable element generated dynamically using jQuery. The div containing the element also has a background image. How can I ensure that the draggable element never goes outside of the boundaries of the div? If you ...