# CSS for individual tables in a post

**URL:** <https://meta.discourse.org/t/css-for-individual-tables-in-a-post/87284>\
**Category:** Development\
**Tags:** css\
**Created:** [May 11, 2018, 6:01pm UTC](https://meta.discourse.org/t/css-for-individual-tables-in-a-post/87284 "2018-05-11T18:01:20Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**Post date:** [May 11, 2018, 6:38pm UTC](https://meta.discourse.org/t/css-for-individual-tables-in-a-post/87284/4 "2018-05-11T18:38:08Z")

</div>

If you can’t target them by id or class, by position? eg. instead of main-st → smith, main-st → second-house

What I generally do is go up the DOM until I find an ancestor element with an id, or in lieu of that a few elements with classes, and then go to the child element I want to target. If need be, a “first”, “last” or “nth” pseudo-class should do the job.

> **[Pseudo-classes - CSS | MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/Pseudo-classes)**
>
> A CSS pseudo-class is a keyword added to a selector that lets you select elements based on information that lies outside of the document tree, such as a specific state of the selected element(s). For example, the pseudo-class :hover can be used to...

---

_[View the full topic](https://meta.discourse.org/t/css-for-individual-tables-in-a-post/87284)._
