tuoKsft

by Kirubel Girma

HTML

<div class='print-button' id="prnt_btn01">
  <div><img src="" class="prnt">Print This page(s)</div>
</div>

<div class="book">

  <div class="page">
    <div class="tuoHeader">
      <img src="https://i.ibb.co/YZs600S/Group-359-2x.png" alt="" class="tuoLogo">
      <img src="https://i.ibb.co/VTX4r5p/Group-741.png" alt="" class="tuoValimg">
    </div>
    <div class="tableContainer">
      <table class="blueTable">
<thead>
<tr>
<th>&nbsp;</th>
<th>head2</th>
<th>head3</th>
<th>head4</th>
<th>head5</th>
</tr>
</thead>
<tbody>
<tr>
<td>cell1_1</td>
<td>cell2_1</td>
<td>cell3_1</td>
<td>cell4_1</td>
<td>cell5_1</td>
</tr>
<tr>
<td>cell1_2</td>
<td>cell2_2</td>
<td>cell3_2</td>
<td>cell4_2</td>
<td>cell5_2</td>
</tr>
<tr>
<td>cell1_3</td>
<td>cell2_3</td>
<td>cell3_3</td>
<td>cell4_3</td>
<td>cell5_3</td>
</tr>
<tr>
<td>cell1_4</td>
<td>cell2_4</td>
<td>cell3_4</td>
<td>cell4_4</td>
<td>cell5_4</td>
</tr>
<tr>
<td>cell1_5</td>
<td>cell2_5</td>
<td>cell3_5</td>
<td>cell4_5</td>
<td>cell5_5</td>
</tr>
<tr>
<td>cell1_6</td>
<td>cell2_6</td>
<td>cell3_6</td>
<td>cell4_6</td>
<td>cell5_6</td>
</tr>
<tr>
<td>cell1_7</td>
<td>cell2_7</td>
<td>cell3_7</td>
<td>cell4_7</td>
<td>cell5_7</td>
</tr>
<tr>
<td>cell1_8</td>
<td>cell2_8</td>
<td>cell3_8</td>
<td>cell4_8</td>
<td>cell5_8</td>
</tr>
<tr>
<td>cell1_9</td>
<td>cell2_9</td>
<td>cell3_9</td>
<td>cell4_9</td>
<td>cell5_9</td>
</tr>
<tr>
<td>cell1_10</td>
<td>cell2_10</td>
<td>cell3_10</td>
<td>cell4_10</td>
<td>cell5_10</td>
</tr>
<tr>
<td>cell1_11</td>
<td>cell2_11</td>
<td>cell3_11</td>
<td>cell4_11</td>
<td>cell5_11</td>
</tr>
<tr>
<td>cell1_12</td>
<td>cell2_12</td>
<td>cell3_12</td>
<td>cell4_12</td>
<td>cell5_12</td>
</tr>
<tr>
<td>cell1_12</td>
<td>cell2_12</td>
<td>cell3_12</td>
<td>cell4_12</td>
<td>cell5_12</td>
</tr>
<tr>
<td>cell1_12</td>
<td>cell2_12</td>
<td>cell3_12</td>
<td>cell4_12</td>
<td>cell5_12</td>
</tr>
</tbody>
</table>
    </div>
  </div>

  <div class="page">
  </div>

</div>

CSS

body {
   width: 100%;
   height: 100%;
   margin: 0;
   padding: 0;
   background-color: #f3f3f3;
   font: 12pt "Tahoma";
   overflow: scroll;
 }

 * {
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
   -moz-box-sizing: border-box;
 }
 
 /*additional css*/
 .tuoHeader {
   display: flex;
   justify-content: space-between;
   align-items: center;
   height: 20mm;
   width: 100%;
   padding-left: 8.4mm;
   padding-right: 8.4mm;
   background: #DD983C;
 }

 .tuoLogo {
   width: 17mm;
   height: 6.4mm;
 }
 
 .tuoValimg {
   width:51.48mm;
   height:6.6mm;
 }
 
 .tableContainer {
   flex: 1;
   background: red;
   
     padding: 8.4mm;

 }
 
 table.blueTable {
  background-color: #FFFFFF;
  width: 100%;
  text-align: left;
  border-collapse: collapse;
}
table.blueTable td, table.blueTable th {
  padding: 3px 2px;
}
table.blueTable tbody td {
  font-size: 13px;
}
table.blueTable tr:nth-child(even) {
  background: #EFEFEF;
}
table.blueTable thead {
  }
table.blueTable thead th {
  font-size: 15px;
  font-weight: bold;
  color: #000000;
}
table.blueTable tfoot td {
  font-size: 14px;
}
table.blueTable tfoot .links {
  text-align: right;
}
table.blueTable tfoot .links a{
  display: inline-block;
  background: #1C6EA4;
  color: #FFFFFF;
  padding: 2px 8px;
  border-radius: 5px;
}



 
 .print-button {
   display: table;
   align-items: center;
   border: 1px solid #2196F3;
   border-radius: 5px;
   cursor: pointer;
   position: absolute;
   height: 2em;
   width: 12em;
   margin: 0 auto;
   top: .2em;
   left: 0em;
   right: 0em;
   bottom: 0em;
 }

 img.prnt {
   width: 1.2em;
   height: 1.2em;
   margin-right: .6em;
   vertical-align: middle;
   background-image: url(https://i.ibb.co/G0F5BnQ/printing-tool.png);
   background-size: cover;
   background-repeat: no-repeat;
 }

 .print-button:hover>div>img {
   background-image: url(https://i.ibb.co/zSjxCzY/printing-tool-1.png) !important;
 }

 .print-button:hover>div {
   background: #2196F3;
   color: white...

JavaScript

function print() {
  window.print()
}

document.getElementById("prnt_btn01").addEventListener("click", print)