Removing Table Borders

From Edgar BV Wiki
Jump to navigation Jump to search

See https://drupal.org/node/93357 - the core adds table tops!!! So you need to specify somewhere in your CSS:

tbody {
  border-top: 0;
}

Other options you might want to look at are specifying the following file in your themename.info file

stylesheets[all][] = css/tables.css

tables.css

/* Tables */
table {
  border-collapse: collapse;
  border-width: 0;
  margin: 1em 0;
  width: 100%;
}
th {
  font-weight: 600;
  text-align: left;
}
th, td {
  border-width: 0;
  padding: 0.5em;
  vertical-align: top;
}
thead th:last-child,
tr td:last-child {
  border-right: 0;
}
table .form-item,
table p {
  margin: 0;
}
/**
 * Webkit work-around
 */
tr td:last-child {
  border-right: 0;
}