Rearranging Twitter Bootstrap Grid Columns

Is it possible to rearrange columns in Bootstrap without using col-sm-pull-12/col-sm-push-12? I'm struggling to achieve the desired layout. Are there any alternative methods to accomplish this task?

Check out this JSFiddle for reference.

<div class="container">
  <div class="row">
    <div class="col-xs-12 col-sm-8 red">
      A
    </div>  
    <div class="col-xs-12 col-sm-3 blue">
      B
    </div>
    <div class="col-xs-12 col-sm-4 green">
      C
    </div>  
    <div class="col-xs-12 col-sm-9 yellow">
      D
    </div>
    <div class="col-xs-12 col-sm-3 magenta">
      E
    </div>  
  </div>
</div>

Answer №1

the limitation of using bootstrap's push and pull classes is that they do not support row jumping, causing content to go off the screen if pushed or pulled beyond the 12-column grid system.

One alternative solution is to utilize the hidden class in bootstrap. Here's an example: http://jsfiddle.net/swm53ran/282/

<div class="row">
    <div class="a col-xs-12 col-sm-12 col-md-8 col-lg-8">Content of A</div>    
    <div class="b col-xs-12 col-sm-12 hidden-md hidden-lg">Content of B</div>    
    <div class="c col-xs-12 col-sm-12 hidden-md hidden-lg">Content of C</div>        
    <div class="c col-md-4 col-lg-4 hidden-sm hidden-xs">Content of C</div>
    <div class="b col-md-4 col-lg-4 hidden-sm hidden-xs">Content of B</div>
    <div class="d col-xs-12 col-sm-12 col-md-8 col-lg-8">Content of D</div>
    <div class="e col-xs-12 col-sm-12 col-md-4 col-lg-4">Content of E</div>   
</div>

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

Calculating the number of checked checkboxes using PHP and HTML

Greetings! I am just starting to learn php and I have a question about how to count the number of 'checkbox' items that are checked when I click on a submit button. Here is an example: <input type = "checkbox" value = "box" name = "checkbox1 ...

How to Delete the Bottom Border on Selected Tabs in MUI Using React

I am attempting to customize the appearance of MUI Tabs to achieve a design similar to the image below: https://i.sstatic.net/tBS1K.png I have created a sample code example in a codesandbox environment. You can view it here: Codesandbox Example. In this e ...

Conflict between Angular's ng-repeat directive and Sass styling

Currently, I am working on a project and encountering an issue that is causing some difficulty: In order to create a navigation bar with equally distributed list elements based on the number of items, I am utilizing ng-repeat for data binding and Sass for ...

Retrieving specific data from an SQL database using PHP

My goal is to create a select form with fields populated from an SQL database containing a table of stores. I used a method to retrieve distinct store names and populate the select tool with them. echo '<select name="StoreName" />'."\ ...

Find and Scroll Dropdown Menu with Bootstrap Framework

Access the jsfiddle for more information. Have a look at these questions: In my dropdown menu, I have included a search box and multiple sub-menus. However, the search box only filters the first dropdown menu and does not work with the sub-menus. How ca ...

What would be more efficient for designing a webpage - static HTML or static DOM Javascript?

My burning question of the day is: which loads faster, a web page designed from static html like this: <html> <head> <title>Web page</title> </head> <body> <p>Hi community</p> </bo ...

Using Angular2, you can dynamically assign values to data-* attributes

In my project, I am looking to create a component that can display different icons based on input. The format required by the icon framework is as follows: <span class="icon icon-generic" data-icon="B"></span> The data-icon="B" attribute sp ...

The hamburger menu for mobile devices is not functioning properly on the website's mobile version, however it operates correctly when the screen is resized

Currently, I am facing an issue with the hamburger menu not responding on my mobile device. Oddly enough, it does work when I resize my browser window to mimic a mobile size. There seems to be a glitch happening, but I'm struggling to pinpoint the exa ...

Accessing an image from a directory using Javascript

I have a simple question that I need help with. In my code, I currently pull images from a website using this syntax: icon: 'http://i45.tinypic.com/2yua8ns.png'. However, I would like to use something like this instead: icon: '\images/i ...

SVG embedded directly into CSS is compatible with Chrome and Edge browsers, but unfortunately does not render correctly in Firefox

I'm having an issue with my code that displays icons. The GitHub icon isn't showing up on Firefox, but it works fine on Chrome and Edge. Surprisingly, the Google icon is working across all browsers! .github-icon { background-image: url("data ...

Central Player Component

Do you need help with centering text and a player on your WP site? Check out my website Here is the code I am currently using: <div class="listen_section"> <div class="container"> <div class="row"> <div class ...

I am trying to figure out how to style each box individually, but I'm running into some confusion. There are three different classes to choose from, with the child class

Struggling to style the ten boxes individually? Renaming each class of the box child didn't work as expected? Wondering how to select and style each box with a unique background color? Also facing issues with displaying the logo image on the navigatio ...

The nb-install mixin is not recognized

While working with angular5, I encountered the 'No mixin named nb-install' error when running npm start or serve Module build failed: undefined ^ No mixin named nb-install Backtrace: stdin:13 in E:\mrb_bugfixes& ...

Issue with Firefox: Click event not fired when resize:vertical is set while focusing

Issue: Firefox is not registering the first click event when a textarea has the following CSS: textarea:focus { resize: vertical; } Check out the demo: http://jsbin.com/wuxomaneba/edit?html,css,output The fix for this problem is straightforward - ju ...

Setting the height of children within an absolutely-positioned parent element

I am facing an issue with adjusting the size of children elements based on their parent. The scenario is as follows: HTML <div class="video"> <div class="spot"> <img src="..." alt=""> <button>x</button> </div ...

Improving the functionality of multiple range slider inputs in JavaScript codeLet me

Is it possible to have multiple range sliders on the same page? Currently, all inputs only affect the first output on the page. Check out an example here: http://codepen.io/andreruffert/pen/jEOOYN $(function() { var output = document.querySelectorAl ...

Design the appearance of page buttons distinct from select buttons

I am currently working on styling my paging buttons differently from the select buttons. However, the selector I am using for the select buttons is also being applied to the paging buttons: .gridView tr td a{} /* The gridView class has been assigned to th ...

Mozilla Firefox's webpage controls adapt according to the type of authentication being used

On my .NET MVC web page, I have 3 radio buttons for selecting a value on a form. However, in a specific test environment with two authentication methods (user/password or certificate), the radio buttons mysteriously change to checkboxes when the page loads ...

The drop-down links vanish into the depths of the webpage's body

Can someone assist with my drop-down menu issue for the link "services"? The link disappears behind the page content when I try to modify it. Any help would be appreciated, thank you! This is the CSS: .bodycontent { margin: 0 25% 0 25%; ...

Ways to ensure that the height of the second row in the second column matches that of the first column

My current layout design is causing an issue where the lower green box extends beyond the total height of the entire box. I've provided a rough version of my code on codepen. Using the Bulma framework, my goal is to align the height of the left column ...