CSS Table Borders

csshtml-table

A table has the following attributes and associated CSS:

<table border="0" cellspacing="0" cellpadding="2" class="noborder">

.noborder { border: 0px; }

Yet it displays with a white border of 1px. Google Chrome Inspector shows there is an associated style in a "user agent stylesheet", with CSS of:

table { display: table; border-collapse: separate; border-spacing:
2px; border-color: gray; }

but this is not a white border. What CSS is generating the white border?

Best Answer

This CSS rule in your style.css is making the border

th,td {
border: 1px solid;
padding: 8px;
}