Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hidden-xs hiding div on print in Bootstrap

enter image description hereIn MVC project, we are using bootstrap.

There is need to hide div for xs devices and have to show at time of print and desktop.

Code is in below as:

<div class="hidden-xs">
    --Content--
</div>

But it is hiding div at time printing to window.

like image 447
Manveer Singh Avatar asked Jan 18 '26 03:01

Manveer Singh


1 Answers

<div class="hidden-xs print-visible"> content </div> 
@media print{
  .print-visible{
       display: block !important;
   }
}

Add a additional user defined class to hidden-xs div(as above) and in your style sheet add the above rule. Hope it fixes your issue.

like image 99
thevarunraja Avatar answered Jan 20 '26 20:01

thevarunraja