CSS with attr for resposible table
-
Hi again!
The responsive code that worked for me was the following:
@media only screen and (max-width: 760px),(min-device-width: 768px) and (max-device-width: 1024px) { .tablepress { width: 100%; } .tablepress thead,th,td,tr { display: block; } .tablepress td { border: none; border-bottom: 1px solid #ccc; position: relative; padding-left: 50%; } .tablepress td:before { position: absolute; top: 6px; left: 6px; width: 45%; padding-right: 10px; white-space: nowrap; content: attr(data-column); color: #000; font-weight: bold; } }
I prefer its result than the resposible tables extension. But there is an issue. I need each TD cell has a special attributee data-column (please, see the CSS code above) who will receive the corresponding TH title, like:
<td class="column-1" data-column="Name">
Is there a way to enter this (filter, action or hook)?
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘CSS with attr for resposible table’ is closed to new replies.