# Finding CSS selectors for page layout, user groups

**URL:** https://meta.discourse.org/t/finding-css-selectors-for-page-layout-user-groups/397044
**Category:** Development
**Tags:** css
**Created:** [February 25, 2026, 7:34pm UTC](https://meta.discourse.org/t/finding-css-selectors-for-page-layout-user-groups/397044 "2026-02-25T19:34:35Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![stephtara](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephtara/32/517827_2.png) [@stephtara](https://meta.discourse.org/u/stephtara)
#### Post date: [February 25, 2026, 7:34pm UTC](https://meta.discourse.org/t/finding-css-selectors-for-page-layout-user-groups/397044/1 "2026-02-25T19:34:35Z")

</div>

Continuing the discussion from [Discourse Doc Categories](https://meta.discourse.org/t/discourse-doc-categories/322376/157):

> [@Discourse Doc Categories](https://meta.discourse.org/t/discourse-doc-categories/322376/157):
>
> I’m going to look more closely into the different selectors for part of the Discourse page layout. I imagine there’s a reference somewhere.  
> I can’t remember if I asked the question or not before, but is there a way to apply a CSS rule according to group or TL the user belongs to?

ℹ Below is an answer added to OP before making Steph the topic owner. – @ToddZ

* * *

I don’t know if there’s an overall reference, but the browser’s Inspect tool can help dig them up: [Making custom CSS changes on your site: Finding the right CSS selectors](https://meta.discourse.org/t/making-custom-css-changes-on-your-site/168101#p-836623-finding-the-right-css-selectors-4)

Some selectors are listed in [A little help with a CSS selector?](https://meta.discourse.org/t/a-little-help-with-a-css-selector/356153/6):

- `is-staff`
- `is-admin`
- `is-moderator`
- `is-new-user`
- `group--primary_group_name`

And the [CSS Classes for Current User's Groups](https://meta.discourse.org/t/css-classes-for-current-users-groups/226068) component gives the `<body>` tag classes for the logged-in user that you could target, like:

```plaintext
class="chat-enabled group-trust_level_0 group-trust_level_1 group-trust_level_2 group-trust_level_3" ... etc.

```

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [February 25, 2026, 7:45pm UTC](https://meta.discourse.org/t/finding-css-selectors-for-page-layout-user-groups/397044/2 "2026-02-25T19:45:28Z")

</div>

> [@ToddZ](#):
>
> And the `<body>` tag contains classes for the logged-in user that you could target, like:

Does this happen by default now? I thought you need to install [CSS Classes for Current User's Groups](https://meta.discourse.org/t/css-classes-for-current-users-groups/226068) for that.

---

<div class="post-metadata">

### Author: ![stephtara](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephtara/32/517827_2.png) [@stephtara](https://meta.discourse.org/u/stephtara)
#### Post date: [February 25, 2026, 7:46pm UTC](https://meta.discourse.org/t/finding-css-selectors-for-page-layout-user-groups/397044/3 "2026-02-25T19:46:32Z")

</div>

oh wow, this looks like it’s going to allow me to do a bunch of things I’m thinking of (even if it’s going to require quite a little work on my side… at least it’s possible!!)

---

<div class="post-metadata">

### Author: ![ToddZ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toddz/32/328350_2.png) [@ToddZ](https://meta.discourse.org/u/ToddZ)
#### Post date: [February 25, 2026, 8:00pm UTC](https://meta.discourse.org/t/finding-css-selectors-for-page-layout-user-groups/397044/4 "2026-02-25T20:00:00Z")

</div>

Whoops, yes, appears you need the component. Editing the post.

---

<div class="post-metadata">

### Author: ![stephtara](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephtara/32/517827_2.png) [@stephtara](https://meta.discourse.org/u/stephtara)
#### Post date: [March 12, 2026, 5:35am UTC](https://meta.discourse.org/t/finding-css-selectors-for-page-layout-user-groups/397044/5 "2026-03-12T05:35:18Z")

</div>

I’m a bit confused, why am I suddenly the topic owner of something I didn’t write?

---

<div class="post-metadata">

### Author: ![ToddZ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/toddz/32/328350_2.png) [@ToddZ](https://meta.discourse.org/u/ToddZ)
#### Post date: [March 12, 2026, 5:39am UTC](https://meta.discourse.org/t/finding-css-selectors-for-page-layout-user-groups/397044/6 "2026-03-12T05:39:48Z")

</div>

I goofed, Steph. I really should have moved the subject a different way, and in trying to fix it I made things more confusing. I’ll see if we can revert that.

---

<div class="post-metadata">

### Author: ![stephtara](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephtara/32/517827_2.png) [@stephtara](https://meta.discourse.org/u/stephtara)
#### Post date: [March 12, 2026, 5:43am UTC](https://meta.discourse.org/t/finding-css-selectors-for-page-layout-user-groups/397044/7 "2026-03-12T05:43:19Z")

</div>

Ah, no worries! Will go back to catch my last hour of sleep while you try and shuffle things around!
