KoolReport's Forum

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

Setting class to table th? #113

Open zenon opened this topic on on Sep 19, 2017 - 1 comments

zenon commented on Sep 19, 2017

Hi KoolReport,

How to give each th a class, so as to enable me to set a fixed column width? I will use it with the table-layout: fixed so that all tables width are aligned.

So far, with table-layout: fixed; and white-space: nowrap; , all columns widths are equal. However, some texts in some columns overflow to the next columns. Hence, I want to set the width so that the texts fits each column, not overflow. And I also want each row to be one line only (used white-space property).

Appreciate your help.

Thanks a lot.

KoolReport commented on Sep 19, 2017

Hi,

You can do:

Table::create(array(
    "columns"=>array(
        "my_column"=>array(
            "cssStyle"=>"width:100px;white-space:nowrap"
        )
    )
));

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

None