question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove table/cell border

See original GitHub issue

Hi,

how do you completely remove any table/cell borders? Currently this is our setup:

doc.autoTable(columns, rows, {
styles: {
cellPadding: 0,
rowHeight: 10,
fillStyle: 'S',
halign: 'center',
valign: 'middle',
fontStyle: 'bold', 
lineWidth: 0.01,
fontSize: 10,
textColor: 0,
},
margin: [68, 0, 0, 140] ,
tableWidth: width / 2 - 4,
bodyStyles: {
lineColor: [0, 0, 0, 0]
},
drawHeaderRow: function() {
return false;
},
beforePageContent: function(data) {
doc.addImage(imgData, 'JPEG', 0, 0, width, height);
}
});

The above seems to work with mac/ios safari and ff but mac chrome adds a thin white border. Tried also with: lineWidth: 0.00, lineWidth: 0.0, lineWidth: 0,

What we need to achieve is have a background image with the table but no table backgrounds or borders.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
hitolonencommented, Oct 19, 2016

Yes and same thing with mac chrome showing the thin white border but mac ff and safari not showing it. Code:

doc.autoTable(columns, rows, {
    theme: 'plain',
    styles: {
        cellPadding: 0,
        rowHeight: 10,
        fillStyle: 'S',
        halign: 'center',
        valign: 'middle',
        fontStyle: 'bold',
        lineWidth: 0.01,
        fontSize: 10,
        textColor: 0,
    },
    margin: [68, 0, 0, 140],
    tableWidth: width / 2 - 4,
    bodyStyles: {
        lineColor: [0, 0, 0, 0]
    },
    drawHeaderRow: function () {
        return false;
    },
    beforePageContent: function (data) {
        doc.addImage(imgData, 'JPEG', 0, 0, width, height);
    }
});
0reactions
simonbengtssoncommented, Oct 19, 2016

Oh! My bad, updated the readme with the latest version now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to remove td border with html? - Stack Overflow
To remove borders between cells, while retaining the border around the table, add the attribute rules=none to the table tag.
Read more >
Apply or remove cell borders on a worksheet - Microsoft Support
To cancel a selection of cells, click any cell on the worksheet. Click Home > the Borders arrow > Erase Border, and then...
Read more >
Easy Ways to Style HTML Tables (and remove the borders)
Table with no outside border ... Note: you can use “border: none;” or “border: 0px;”. Either way it results in the outside border...
Read more >
Remove Borders From HTML Table | Delft Stack
We can set the border property to none to remove the border from an HTML table. The property is short-hand of different border...
Read more >
How do you Hide a Cell Border? - HTML & CSS - SitePoint
I have a table that has merged rows but also regular, unmerged rows/cells. I set this style... td { margin: 0px; padding: 5px;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found