1

I want to show three columns in printed page .It works in browser but when i did print preview, it displays only two columns in print preview page.

html

<div class="container main">
<div class="main_inner">
    <div class="row" >
          <div class="col-md-12" >
        <div class="col-md-3">
            <img src="../img/logo.jpg">
        </div>
        <div class="col-md-6">

            <h2>
                <center><b><?php echo   $row['municipality_address'];?> नगरपालिका</b></center>
            </h2>
            <h3>
                <center><b>नगरकार्यपालिकाको कार्यालय</b></center>
            </h3>
        </div>
        <div class="col-md-3">
            <div class="border_box"></div>
        </div>
    </div>
        <b></b>
    </div>

css

.main{
margin-top: 10px;
border: 5px solid #00bfff;
}
.main_inner{
margin: 50px;
margin-top: 150px;
margin-bottom: 80px;
}

I want to display like this page in printed page.

Expected page

But it looks like this in print preview.

Real page

Siong Thye Goh
  • 3,518
  • 10
  • 23
  • 31
Prabina
  • 127
  • 8

1 Answers1

2

To keep the border_box not to come down at any occasion try making the division that contains the image,text,border_box (col-md-12) as flex by including

<div class="col-md-12">

to

<div class="col-md-12" style="display:flex;">

and it wont come down when you try to print it too

I have attached a link to the codepen

And after adding that the border_box doesnt come below too. I hope this is what you are looking for

image

strek
  • 1,190
  • 1
  • 9
  • 19
  • I have other issue as well. Can I ask you? @XxSTREKxX – Prabina Aug 18 '19 at 16:12
  • @Prabina you are not supposed to ask questions inside question. https://meta.stackexchange.com/questions/39223/one-post-with-multiple-questions-or-multiple-posts instead update and create a seperate question – strek Aug 18 '19 at 16:30
  • Can I ask another question and tag link to you? @XxSTREKxX – Prabina Aug 18 '19 at 16:37
  • @Prabina Just post question so that anyone can answer – strek Aug 18 '19 at 16:38
  • Please help me. https://stackoverflow.com/questions/57636023/unable-to-insert-data-from-dynamically-created-add-remove-fields-in-database-usi?noredirect=1#comment101724845_57636023 @XxSTREKxX – Prabina Aug 24 '19 at 08:05