Center table name and description
-
Hey there,
I’d like to display the table name and description under each table like this:
Earnings: Monthly income by region in 2020.
I managed to define both components as inline elements, however, now I cannot center them under the table, because they lack a wrapping element. This is my current CSS definition:
.tablepress-table-name { font-size: .7em; font-weight: bold; display: inline; } .tablepress-table-name:after { content: ': '; } .tablepress-table-description { font-size: .7em; display: inline; }
Unfortunately, the table name is defined as a h2 caption (block element) and there is no wrapper around name and description.
Would it be possible to wrap all elements that are displayed before and after tables in wrapper elements for semantic reasons, so that they can be styled more easily? E.g. introduce
.tablepress-table-before
and.tablepress-table-after
wrappers that have no style on default, but wrap around name and description, depending on whether they are positioned above or below of the table.Get what I mean?
Kind regards,
Bernd
- The topic ‘Center table name and description’ is closed to new replies.