COL and COLGROUP get captured by CAPTION in SafariI was finding myself unable to tell Safari to set the background color of COL and COLGROUP. The problem turned out to be the CAPTION element, which the HTML-spesification tells us must follow immediately after the TABLE start tag, as in this example:
| Placeholder text on red(!) background. | Placeholder. Column width to be just 10em(!) |
if this column is not dark green, the test has failed |
Since the background colors have been set only by styling the col tags, and because Safari gets so confused by the caption, Safari shows no background colors in this table - exept in the caption itself. And this also cause the cells to grow in width, the more text you fill into them ... (Without the placeholder texts, the entire table would simply collapse - like the screenshot from Safari to the right here shows.) Simply put: To use the CAPTION element according to the specs hinders Safari from using col and colgroup as selectors.
The workaround I know about, is to place the CAPTION below the col and colgroup tags, like this:
|
if this column is not dark green, the test has failed |
However, this will cause the doc to not validate.