Vertical order grid in bootstrap

aguisa

I want to change the column order only in xs devices with bootstrap this is what i got

<div class="container">
<div class="row">
    <div class="col-lg-7 col-md-7 col-sm-7 col-xs-12">column left</div>
    <div class="col-lg-5 col-md-5 col-sm-5 col-xs-12">
        <div>Column right nro 1</div>
        <div>Column right nro 2</div>
    </div>
</div>

I want to focus on the right column, only in xs devices i need them to be inverted showing first column right nro 2 and then column right nro 1.

FIDDLE

dfsq

One way to do it is using display: table and caption-side property and wrap those properties into xs-media rules:

@media (max-width: 768px) {
    .col-right {
        display: table;
    }
    .col-right > div:nth-child(2) {
        display: table-caption;
        margin: 0 15px;
    }
}

Demo: http://jsfiddle.net/fhn6b6gb/1/

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Bootstrap vertical grid

Bootstrap grid vertical align

Bootstrap grid with even vertical and horizontal spaces

Bootstrap vertical aligned without breaking the grid

Bootstrap Grid - vertical split within container

Issue with Bootstrap grid system and vertical aligning

Difficulty creating CSS vertical grid in Bootstrap 3

Bootstrap Grid System: Reset Vertical Space

Bootstrap grid: vertical alignment issue in columns

Bootstrap grid - change the order in mobile

Bootstrap small device order of the grid row

How to combine bootstrap grid and flexbox vertical-align?

Bootstrap Grid and Flexbox, one column with horizontal and vertical scroll

Bootstrap Grid - Square Tiles with same horizontal/vertical gap

How to make vertical nav full width on left side with grid bootstrap

How to make vertical navbar with writings right side in bootstrap grid system

How to stack bootstrap cards from horizontally to vertical in order to make it responsive?

Bootstrap Grid elements order (up and below another element)

Bootstrap responsive grid changing order of columns when displayed on mobile with rows?

change bootstrap grid column order when page in mobile view

Implement pagination in a vertical grid

Vertical grid with EXT JS

Vertical alignment in CSS Grid

Bootstrap 5 - Grid System - How to split a page vertically (2 Vertical Independent Rows, Cols or Containers)

Horizontally stacking divs in same order with bootstrap grid system when div order alternates

Bootstrap 4 order Masonry-like column cards horizontal instead of vertical

arrange elements in vertical order

CSS – vertical order of elements

Bootstrap Vertical align Issue