Table header text and spacing/wrapping
-
I’m confused and struggling to get a header of tables working correctly. I would like the header text (which is in first cell) to either span some or all columns via css and also control the width of the first column. Whatever I seem to try doesn’t work!
The other issue is that the header text in the first cell, despite not having any white spacing etc seems to use excessive space even when “auto width” of the column.So, at present, if you look at the linked page, the first table “Colts Cup” has extra space to make the column wider – this space doesn’t exist in the underlying data. The issue is the same for all the other headings of tables. If I make the column narrower, the text wraps well before I would expect it to.
The most relevant bit of css is below so if you can advise how to stop the extra space AND how to get the text to span all columns successfully that would be really appreciated
/* header – white background with green text */
.tbl-hertscomp thead th,
.tbl-st-1 tfoot th {
background-color: #ffffff !important;
color: #005e30 !important;
word-wrap: none !important;
}/*first cell in header- green background with white text */
.tbl-hertscomp th:first-child {
border: solid 1px;
background-color: #005e30 !important;
color: #ffffff !important;
}/*first cell in data (comp round) – bold and right border */
.tbl-hertscomp td:first-child {
border-right-style: solid !important;
border-right-width: 1px !important;
border-right-color: #005e30 !important;
font-style: bold !important;
}`The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.