KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

CSS formating columns in a table, color, text aligne etc #2661

Open Francois DISSAIT opened this topic on on May 7 - 2 comments

Francois DISSAIT commented on May 7

Hello, I have a problem I can't solve. I a table, I want one of the columns in red color and right aligned. I cannot enter the two statements : color and text_align in the "cssStyle", only one works : or text is green, or text is right justfied, but not the two ... green AND right justified . Here is my view file :

<?php
Table::create(array(
    "dataSource"=>$this->dataStore('stocks'),
	
	"sorting"=>array(
		"Article"=>"asc",
					),
	"columns"=>array(
        "Article"=>array(               
			 "label"=>"Article"
						),
		"Stock"=>array(				
            "label"=>"Stock",
			"cssStyle"=>"text-align:right"
							),
       	"Rentres"=>array(
            "label"=>"Rentres",	

"type"=>"number", "cssStyle"=>"color:green", "cssStyle"=>"text-align:right"

							),
		"Poids"=>array(
			"label"=>"Poids",				
			"cssStyle"=>"text-align:right"
					),
					),
	  "cssClass"=>array(
        "table"=>"table-bordered table-striped table-hover"
						)
	
));
?>
KoolReport commented on May 9

You try:

"cssStyle"=>"text-align:right;color:green"

Let us know if it works.

Francois DISSAIT commented on May 13

OK, thanks a lot, it works FD

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed
solved

None