CSS selector for multiple sub-elements

Viewed 62961

Let's say I have this table:

<table class="live_grid">
    <tr>
        <td>
            <h3>Something!</h3>
        </td>
    </tr>
</table>

If I want to style the <h3> within the table, I can use this CSS selector:

.live_grid h3 {

}

This works fine. The trouble pops up if I want to style all headings in that table. I have tried this:

.live_grid h1,h2,h3,h4,h5,h6 {

}

This seems to match headings that are not within my table with the class of live_grid.

I'm sure this is a simple problem and right in front of me. Can you point out what I'm doing wrong?

9 Answers
Related