Stretch table in landscape layout Printer Friendly

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
sangnandar
User
Posts: 980

Stretch table in landscape layout Printer Friendly

Post by sangnandar »

Can I stretch table so it will fit landscape layout in Printer Friendly?

Bootstrap class table can do that, so I suppose it can be done with normal table either.
My case:
I create a table (small one) in $header='<html table>';
I use bootstrap for the html table.
The $header table fit any paper width given in Printer Friendly.
But the normal table below the $header is not.
It's kinda ugly though.

Thanks.


sangnandar
User
Posts: 980

Post by sangnandar »

My code goes like this:

$header = '
<table class="table table-bordered">
<tr>
<td style="width:100%">
<td style="white-space:nowrap;">
First td strecth and second td shrink

But this code doesn't work (List-Custom Template Header)
<table class="ewTable ewTableSeparate">
<thead>
<tr class="ewTableHeader">
<td style="width:100%;">
<td style="white-space:nowrap;">

Moreover if I change to this
<table class="ewTable ewTableSeparate">
<thead>
<tr class="ewTableHeader">
<td style="width:5000px;"> //bad definition.
<td style="white-space:nowrap;">
It does work, first td stretch and second td shrink, fit them all in landscape layout.


Post Reply