Bootstrap 3 - print layout and break after each grid column


Andy

If you use this example ( see here : http://www.bootply.com/93816 )

<div class="container">
  <div class="row">
    <div class="col-md-6">Column1</div>
    <div class="col-md-6">Column2</div>
  </div>
</div>

When you do a print preview of the resulting page, it seems to cause the columns to stack/break (as if the floats were removed) instead of showing them in the usual grid layout.

I've looked at various parts of @media printbootstrap.css but can't see anything related to it div.

Does anyone know how to avoid this?

Andy

Bojangles' comment put me in the right direction, so I'll answer my own question.

Using http://getbootstrap.com/css/#grid-options "xs" size grid column for "Extra Small Device Phone (<768px)" Bootstrap prints as expected.

<div class="container">
  <div class="row">
    <div class="col-xs-6">Column1</div>
    <div class="col-xs-6">Column2</div>
  </div>
</div>

Related


Bootstrap 3 - print layout and break after each grid column

Andy If you use this example ( see here : http://www.bootply.com/93816 ) <div class="container"> <div class="row"> <div class="col-md-6">Column1</div> <div class="col-md-6">Column2</div> </div> </div> When you do a print preview of the resulting p

Add scrollbar to each column in CSS grid layout

sudden rust I want to scroll individually on each column of a grid layout. Currently, I'm developing a mobile-only web application. I want to use different grid layouts for portrait and landscape. The portrait orientation is just one column, with each element

Print Bootstrap grid layout with custom styles

John Du I was using Bootstrap Grid and doing layout. I want to print the exact same layout as shown on the webpage, and the layout doesn't change. I've tried adding custom CSS code using some sort of print method using javascript, but these are all in vain. He

Bootstrap 3 layout breaks grid

Darignac I have a small problem in Bootstrap and I don't know how to fix it. Imagine the following 12-column layout: <div class="container"> ... several other row definitions... <div class="row"> <div class="col-xs-12 col-sm-12">A</div>

Bootstrap 3 - print layout and break after each grid column

Andy If you use this example ( see here : http://www.bootply.com/93816 ) <div class="container"> <div class="row"> <div class="col-md-6">Column1</div> <div class="col-md-6">Column2</div> </div> </div> When you do a print preview of the resulting p

Add scrollbar to each column in CSS grid layout

sudden rust I want to scroll individually on each column of a grid layout. Currently, I'm developing a mobile-only web application. I want to use different grid layouts for portrait and landscape. The portrait orientation is just one column, with each element

Add scrollbar to each column in CSS grid layout

sudden rust I want to scroll individually on each column of a grid layout. Currently, I'm developing a mobile-only web application. I want to use different grid layouts for portrait and landscape. The portrait orientation is just one column, with each element

CSS Layout for Responsive 3 Column DIV Grid

William K I need a responsive grid for a 3 column page layout. Of all the suggestions I've found, none have all the requirements. It's better to start with no CSS examples and build from scratch. Require: Must be compatible with https://maxcdn.bootstrapcdn.com

3 column grid layout left blank

trunk I have a website that uses a 3 column layout for its product pages. However, since yesterday the layout has changed and now I am left with gaps like this between the columns: I found this post describing the same problem as mine: Responsive 3-column grid

Print Bootstrap grid layout with custom styles

John Du I was using Bootstrap Grid and doing layout. I want to print the exact same layout as shown on the webpage, and the layout doesn't change. I've tried adding custom CSS code using some sort of print method using javascript, but these are all in vain. He

Wordpress Loop Posts in Bootstrap 3 Grid Layout

lower case I'm using Bootstrap 3 in Wordpess and I'm having trouble getting my archived posts to display on the page in grid format. My WordPress loop code is... <?php if ( have_posts() ) : ?> <?php $args=array( 'post_type' => 'artist', 'post_status' => 'publ

Bootstrap grid 3 items at 33% each

Sven I have a problem with Bootstrap's grid system. I get three columns, each col-XX-4 and a second pixel that I resize the window with three elements with a ratio of pixels smaller than 100% of the available width (930px in this case). It's disturbing because

Create a two column grid layout in Bootstrap

Facebook Facebook logo Sign up for Facebook to connect with Mohammad Dayyan I am trying to create a two column grid as shown in the image below: For this, I wrote the following code: <div class="row"> <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 conten

Bootstrap/CSS: Layout issue in 3 column layout

username I'm using Bootstrap 3 and have full width rows of 3 col-lg-4, each column with an icon, a header and a subheader. But now I want to have the icon and text side by side like this: Initial HTML: <div class="cover-container"> <div class="row"> <div

Bootstrap/CSS: Layout issue in 3 column layout

username I'm using Bootstrap 3 and have full width rows of 3 col-lg-4, each column with an icon, a header and a subheader. But now I want to have the icon and text side by side like this: Initial HTML: <div class="cover-container"> <div class="row"> <div

Simple grid layout in Bootstrap 3?

Matt Gibson I'm using Bootstrap 3's grid system (for the first time) to prototype a site. One of the pages should end up being laid out like this: My initial markup followed these lines (I added s to the group element to make it a block of grid content. <div>)

Create a two column grid layout in Bootstrap

Facebook Facebook logo Sign up for Facebook to connect with Mohammad Dayyan I am trying to create a two column grid as shown in the image below: For this, I wrote the following code: <div class="row"> <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 conten

How to break out of 12 column grid with Bootstrap 4 Flexbox grid?

system addict I was very excited when I heard that bootstrap 4 will use flexbox in the grid system. I think this will deploy the fast and useful element resizing that flexbox is known for. However, it only seems to add some (major) functionality to the current

Bootstrap 3 layout breaks grid

Darignac I have a small problem in Bootstrap and I don't know how to fix it. Imagine the following 12-column layout: <div class="container"> ... several other row definitions... <div class="row"> <div class="col-xs-12 col-sm-12">A</div>

Print Bootstrap grid layout with custom styles

John Du I was using Bootstrap Grid and doing layout. I want to print the exact same layout as shown on the webpage, and the layout doesn't change. I've tried adding custom CSS code using some sort of print method using javascript, but these are all in vain. He

Bootstrap 3 - print layout and break after each grid column

Andy If you use this example ( see here : http://www.bootply.com/93816 ) <div class="container"> <div class="row"> <div class="col-md-6">Column1</div> <div class="col-md-6">Column2</div> </div> </div> When you do a print preview of the resulting p

Add scrollbar to each column in CSS grid layout

sudden rust I want to scroll individually on each column of a grid layout. Currently, I'm developing a mobile-only web application. I want to use different grid layouts for portrait and landscape. The portrait orientation is just one column, with each element

Add scrollbar to each column in CSS grid layout

sudden rust I want to scroll individually on each column of a grid layout. Currently, I'm developing a mobile-only web application. I want to use different grid layouts for portrait and landscape. The portrait orientation is just one column, with each element

CSS Layout for Responsive 3 Column DIV Grid

William K I need a responsive grid for a 3 column page layout. Of all the suggestions I've found, none have all the requirements. It's better to start with no CSS examples and build from scratch. Require: Must be compatible with https://maxcdn.bootstrapcdn.com

Print Bootstrap grid layout with custom styles

John Du I was using Bootstrap Grid and doing layout. I want to print the exact same layout as shown on the webpage, and the layout doesn't change. I've tried adding custom CSS code using some sort of print method using javascript, but these are all in vain. He

Bootstrap/CSS: Layout issue in 3 column layout

username I'm using Bootstrap 3 and have full width rows of 3 col-lg-4, each column with an icon, a header and a subheader. But now I want to have the icon and text side by side like this: Initial HTML: <div class="cover-container"> <div class="row"> <div

Simple grid layout in Bootstrap 3?

Matt Gibson I'm using Bootstrap 3's grid system (for the first time) to prototype a site. One of the pages should end up being laid out like this: My initial markup followed these lines (I added s to the group element to make it a block of grid content. <div>)

Create a two column grid layout in Bootstrap

Facebook Facebook logo Sign up for Facebook to connect with Mohammad Dayyan I am trying to create a two column grid as shown in the image below: For this, I wrote the following code: <div class="row"> <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 conten

Bootstrap 3 layout breaks grid

Darignac I have a small problem in Bootstrap and I don't know how to fix it. Imagine the following 12-column layout: <div class="container"> ... several other row definitions... <div class="row"> <div class="col-xs-12 col-sm-12">A</div>