Adding CSS styles by RowAttrs

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

Adding CSS styles by RowAttrs

Post by sticcino »

this:
$this->RowAttrs["style"] = "background-color: #8fbc8f";
or
$this->RowAttrs["style"] = "color: red";

doesn't appear to be working?


arbei
User
Posts: 9772

Post by arbei »

Note that your styles may not override the default styles, you may Inspect HTML element and test your own CSS styles first. You may need to add !important.


DGarza
User
Posts: 139

Post by DGarza »

sticcino wrote:

$this->RowAttrs["style"] = "background-color: #8fbc8f";
or $this->RowAttrs["style"] = "color: red";
doesn't appear to be working?

You can try with this:

$this->YourColumnName->CellAttrs["style"] = "background-color: #8fbc8f";

Or this:

$this->RowAttrs->appendClass("cssclassname");


Post Reply