# グループ詳細ページでアクティビティまたはメッセージタブを非表示にするCSS

**URL:** <https://meta.discourse.org/t/css-to-hide-the-activity-or-messages-tabs-on-the-group-detail-page/101447>\
**Category:** Product Support\
**Created:** [2018 年 11 月 6 日午後 6:53 UTC](https://meta.discourse.org/t/css-to-hide-the-activity-or-messages-tabs-on-the-group-detail-page/101447 "2018-11-06T18:53:27Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
**Post date:** [2021 年 11 月 5 日午前 3:33 UTC](https://meta.discourse.org/t/css-to-hide-the-activity-or-messages-tabs-on-the-group-detail-page/101447/10 "2021-11-05T03:33:49Z")

</div>

HTML の上部を確認してください。各ページには、`\u003cbody\u003e` タグに追加される一意のクラスが存在します。

例えば、`/messages` ページでは、以下のような表示になります。

![unique page class in browser inspect tools](https://global.discourse-cdn.com/meta/original/3X/3/a/3ad2bdbfb474b45f67069275d3f182d7ba64a6b9.png)

このクラスは他のページでは追加されず、メッセージページでのみ追加されます。

Discourse は SCSS を使用しているため、以下のようにセレクタをネストできます。

```scss
// /messages ページのスタイル
.user-messages-page {
  // ユーザーのアバター/名前/ユーザー名を非表示
  .user-profile-names,
  .user-profile-avatar {
    display: none;
  }
}

```

通常の CSS でも問題ありません。

---

_[View the full topic](https://meta.discourse.org/t/css-to-hide-the-activity-or-messages-tabs-on-the-group-detail-page/101447)._
