Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

border-collapse is not working in flying-saucer?

In flying-saucer, border-collapse is not working if I use fs-paginate-table for the same table.

Does anybody know any workaround on this?

like image 576
NkS Avatar asked Oct 03 '22 03:10

NkS


1 Answers

Use :

table {
  border-spacing: 0;
}

Example:

table{-fs-table-paginate:paginate;}
td{border:1px solid red}

enter image description here

table{-fs-table-paginate:paginate;border-spacing:0}
td{border:1px solid red}

enter image description here

The result is not exactly the same (as the TD's borders don't merge), but it can be fixed by setting borders only on one side of the TD.

#t4{-fs-table-paginate:paginate;border-spacing:0}
#t4 td{border-width:0 1px 1px 0;border-color:red}
#t4 tr.firstrow td{border-top-width:1px}   /* Assuming first TR has class firstrow */
#t4 td.firstcol{border-left-width:1px}     /* Assuming first TD of each line has class firstcol */

enter image description here

like image 90
obourgain Avatar answered Oct 17 '22 09:10

obourgain