Forum


Replies: 8   Views: 7031
Setting fixed width to first column in an html table
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by davelavinsky  · 21-12-2017 - 16:44

I see - I've been checking the PDF output so far, not the DOCX output.

$html .= "
<style type='text/css'>
.tbl-summary { border-collapse:collapse; }
.tbl-summary thead tr th,
.tbl-summary thead tr td,
.tbl-summary tbody tr td
{
    border:1px solid #000000;
    padding:5px;
    text-align:center;
    width:100px;
}
.tbl-summary tbody tr td:first-child
{
    text-align:left;        
}
</style>
";    


$html .= "<table class='tbl-summary' style='font-size:12px'>";
$html .= "<thead>
            <th width='250'></th>
            <th>FY 1</th>
            <th>FY 2</th>
            <th>FY 3</th>
            <th>FY 4</th>
            <th>FY 5</th>
          </thead>
          ";

$html .= "<tbody>";