Forum


Replies: 8   Views: 4998
Error css
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 nikkyb8  · 22-11-2013 - 10:15

Hello,

I have aproblem withthebackgroundcolorandaddingcssfile

Here is myexample:

I have avariablewiththis:<tableclass="table1"style="height:21px;"width="214"><thead><tr><td>hello</ td></ tr> </thead> </ table>

And in mycssfileIhave this:

.table1td{

border: 1pxsolid #ABABAB;

}

.{table1



border-collapse: collapse;

background-color: white;



}

.table1tr{



height:25px;

}

.table1theadtd{

background-color: #EEEEEE;



}

The file iscreatedeverything workswellexceptthe formattingof the table,thetext backgroundturnsblack....



exemple :



http://fr.tinypic.com/r/29bfr4w/5



Thank's for help


Posted by jorgelj  · 22-11-2013 - 14:13

Hello,



We're going to check it, but I see:



. {table1



border-collapse: collapse;

background-color: white;



}



that '{' must be after .table1


Posted by nikkyb8  · 22-11-2013 - 14:23

This doesnot come from..


Posted by jorgelj  · 25-11-2013 - 09:25

Hello,



Please attach a full example and a script we can run to check it.



Regards.


Posted by nikkyb8  · 26-11-2013 - 11:07

Hi,



 



<?php

    session_start();



include ('class/connect.php');

require_once ('class/connect.class.php');



require_once 'docx/classes/CreateDocx.inc';



$docx = new CreateDocx();

$contenu = "<style>";

$contenu .= file_get_contents ('css/tinymce.css');



 // .table1 tr td { border:3px solid black; } .table1 { border-collapse:collapse; color:#6B506B; border:1px solid #2E638E; } </style> ";

$contenu .= " </style> ";



$customLayout = array(

                    'width' => '11906',

                    'height' => '16838',

                    'numberCols' => '1',

                    'orient' => 'portrait',

                    'code' => '9',

                    'marginTop' => '1017',

                    'marginRight' => '1001',

                    'marginBottom' => '1417',

                    'marginLeft' => '1001',

                    'marginHeader' => '308',

                    'marginFooter' => '708',

                    'gutter' => '0'      

                );

$docx->modifyPageLayout('custom', $customLayout);





    $contenu .= '<table style=\"height: 21px;\" width=\"384\"><tbody><tr><td style=\"color: white; text-align: center; background-color: black;\">test fond</td><td></td><td></td></tr></tbody></table><table class=" table1" style="height: 21px;" width="197"><thead><tr><td>entete</td></tr></thead><tbody><tr><td>fond 2</td></tr></tbody></table>';

    $contenu = htmlspecialchars_decode($contenu);

    $docx->embedHTML($contenu);



$docx->createDocxAndDownload('/tmp/'.$_SESSION["pseudo"].'_'.$_SESSION["utilisateur_id"].'/'.time().'ee');//we send the resulting document to the browser





.CSS :



.table1 td { border:1px solid #ABABAB; } .table1 { border-collapse:collapse; background-color:white; } .table1 tr{ height:25px; } .table1 thead td{ background-color:#EEEEEE; }



.Withthis:table1theadtd{background-color: #EEEEEE;}

the cellshouldbe coloredand notpart of the text...



Thank's


Posted by jorgelj  · 27-11-2013 - 09:15

Hello,



We're going to check it and fix any issue.



Regards.


Posted by nikkyb8  · 27-11-2013 - 09:24

Ok thank's


Posted by nikkyb8  · 07-12-2013 - 18:55

Hi,



Did you find an issu ?



Thank's