mercredi 13 avril 2016

Applying class to all children of an element

I'm wondering if it's possible (without using JS) to state that all children of tr.myRow have a certain class. I'm trying to use W3.CSS and I want every <td> element to be w3-border class. Now the code has to look like this:

<table class="w3-table">
    <tr>
        <td class="w3-border">A</td>
        <td class="w3-border">B</td>
        <td class="w3-border">C</td>
    </tr>
</table>

which is not elegant.

I would appreciate any hints




Aucun commentaire:

Enregistrer un commentaire