Add normal table tag CSS to tabulator table

188 views Asked by At

I have few css files that has classes to be added for table tags like <table>, <th>, <tr>, <td>. I have created a table using tabulator but it gets rendered using tags. Is there a way I can add my custom CSS to tabulator div tag based table??

1

There are 1 answers

0
Oli Folkerd On

Tabulator is far more advanced than a standard HTML table, so there is no way that it can be built using table tags. Instead it is built using a series of div's with classes that define their purpose and styling.

The Styling Documentation includes a full list of classes used for the table.

So it is simply a matter of switching out your tags in your CSS for classes.

So for example, this:

table{
    border:2px solid black;
}

Would become:

.tabulator{
    border:2px solid black;
}

The following are a list of the classes corresponding to a html table:

  • table - .tabulator
  • tr - .tabulator-row
  • td - .tabulator-cell
  • th - .tabulator-col