Put a div & span in the -Tag
-
Hi Tobias,
want to tell you that tablepress is awesome, makes life so much easier ??
But i′ve got a question too ??I want to make a cross-table an added my table via the import function from a .CSV. That worked perfectly.
I just set the “first-row is the tableheader” off (so only have a tbody, but not a thead), because I don′t need a tableheader and all rows got to look the same way.
Now I want to rotate the text in row-1 for 270° (= -90°).The Code HTML Code looks like:
<table id="tablepress-12" class="tablepress tablepress-id-12"> <caption style="caption-side:bottom;text-align:left;border:none;background:none;margin:0;padding:0;"> </caption> <tbody class="row-hover"> <tr class="row-1 odd"> <td class="column-1"></td> <td class="column-2">SPALTE 1 Titel</td> <td class="column-3">SPALTE 2 Titel</td> <td class="column-4">SPALTE 3 Titel</td> </tr> <tr class="row-2 even"> <td class="column-1">ZEILE 1 Titel</td> <td class="column-2">12</td> <td class="column-3">28</td> <td class="column-4">32</td> </tr> <tr class="row-3 odd"> <td class="column-1">ZEILE 2 Titel</td> <td class="column-2">11</td> <td class="column-3">4</td> <td class="column-4">25</td> </tr> </tbody> </table>
Can you maybe tell me if it′s possible to add some code into the function.php, that adds a <div> and <span> Tag into the <th>-Tag of all tablecells (maybe even only into the first-row), so it would look like this:
<table id="tablepress-12" class="tablepress tablepress-id-12"> <caption style="caption-side:bottom;text-align:left;border:none;background:none;margin:0;padding:0;"> </caption> <tbody class="row-hover"> <tr class="row-1 odd"> <td class="column-1"><div><span></span></div></td> <td class="column-2"><div><span>SPALTE 1 Titel</span></div>/td> <td class="column-3"><div><span>SPALTE 2 Titel</span></div></td> <td class="column-4"><div><span>SPALTE 3 Titel</span></div></td> </tr> <tr class="row-2 even"> <td class="column-1">ZEILE 1 Titel</td> <td class="column-2">12</td> <td class="column-3">28</td> <td class="column-4">32</td> </tr> <tr class="row-3 odd"> <td class="column-1">ZEILE 2 Titel</td> <td class="column-2">11</td> <td class="column-3">4</td> <td class="column-4">25</td> </tr> </tbody> </table>
Would be great if you have an idea…
- The topic ‘Put a div & span in the -Tag’ is closed to new replies.