그래서 저는이 거대한 데이터 테이블을 가지고 있고 legal
크기 용지 에 인쇄 할 때 모두 맞추고 싶습니다 . 지금 내가 가진 것은 종이 크기 뿐인데 내용이 맞지 않습니다
내 CSS
코드 는 다음과 같습니다 .
@page {
size: legal;
}
@page :left {
margin: 0.5cm;
}
@page :right {
margin: 0.5cm;
}
그리고 여기 내 table
:
<div class="table-responsive">
<table border="1" style="table-layout: fixed;" align="center">
<caption class="center">PERSONAL</caption>
<tr>
<th align="left">NAME: </th>
<td colspan="3"><input type="text" name="full_name" size="37" value="<?php echo $full_name; ?>" disabled></td>
<th colspan="1" align="left">MOBILE: </th>
<td><input type="text" name="phone_number" size="11" value="<?php echo $phone_number; ?>" disabled></td>
<th align="left">RANK: </th>
<td><input type="text" name="crew_rank" size="10" value="<?php echo $crew_rank; ?>" disabled></td>
</tr>
<tr>
<th align="left">DATE OF BIRTH: </th>
<td><input type="text" name="date_of_birth" size="17" value="<?php echo $date_of_birth; ?>" disabled></td>
<th align="left">AGE: </th>
<td><input type="text" name="age" size="5" value="<?php echo $age; ?>" disabled></td>
<th align="left">TELEPHONE NUMBER: </th>
<td><input type="text" name="telephone_number" size="11" value="<?php echo $telephone_number; ?>" disabled></td>
<th align="left">VESSEL: </th>
<td><input type="text" name="vessel" size="10" value="<?php echo $vessel; ?>" disabled></td>
</tr>
<tr>
<th align="left">PLACE OF BIRTH: </th>
<td colspan="3"><input type="text" name="place_of_birth" size="37" value="<?php echo $place_of_birth; ?>" disabled></td>
<th colspan="1" align="left">RELIGION: </th>
<td><input type="text" name="religion" size="11" value="<?php echo $religion; ?>" disabled></td>
<th align="left">JOINING DATE: </th>
<td><input type="text" name="joining_date" size="10" value="<?php echo $joining_date; ?>" disabled></td>
</tr>
<tr>
<th align="left">CITIZENSHIP/CIVIL STATUS</th>
<td><input type="text" name="citizenship" size="17" value="<?php echo $citizenship; ?>" disabled></td>
<td colspan="2"><input type="text" name="civil_status" size="16" value="<?php echo $civil_status; ?>" disabled></td>
<th colspan="1" align="left">SSS No.</th>
<td colspan="1"><input type="text" name="sss_number" size="11" value="<?php echo $sss_number; ?>" disabled></td>
<th align="left">JOINING PORT: </th>
<td colspan="2"><input type="text" name="joining_port" size="10" value="<?php echo $joining_port; ?>" disabled></td>
</tr>
<tr>
<th align="left">SHOES/BOILER SUIT SIZE</th>
<td><input type="text" name="shoe_size" size="17" value="<?php echo $shoe_size; ?>" disabled></td>
<td><input type="text" name="boiler_size" size="5" value="<?php echo $boiler_size; ?>" disabled></td>
<th align="left">HT/WT</th>
<td><input type="text" name="ht" size="19" value="<?php echo $ht; ?>" disabled></td>
<td><input type="text" name="wt" size="11" value="<?php echo $wt; ?>" disabled></td>
<th>LAST VESSEL: </th>
<td><input type="text" name="last_vessel" size="10" value="<?php echo $last_vessel; ?>" disabled></td>
</tr>
<tr>
<th align="left">ADDRESS: </th>
<td colspan="7" align="center"><input type="text" name="address" size="111" value="<?php echo $address; ?>" disabled></td>
</tr>
</table>
참고 : 모든 데이터를 포함하지 않았습니다. table
표가 단일 페이지에 맞을 수 있다고 가정하면 인쇄 매체 쿼리를 사용할 수 있습니다.
@print{
.table-responsive:{
height:95%;
}
}
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다