# CSS隐藏群组成员页面中的“发布”和“查看”列，第三版

**URL:** <https://meta.discourse.org/t/css-to-hide-the-posted-and-seen-columns-in-the-group-member-page-take-3/263887>\
**Category:** Development\
**Tags:** css\
**Created:** [2023年五月4日 21:47 UTC](https://meta.discourse.org/t/css-to-hide-the-posted-and-seen-columns-in-the-group-member-page-take-3/263887 "2023-05-04T21:47:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoelZaslofsky](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joelzaslofsky/32/158556_2.png) [@JoelZaslofsky](https://meta.discourse.org/u/JoelZaslofsky)\
**Post date:** [2023年五月4日 21:47 UTC](https://meta.discourse.org/t/css-to-hide-the-posted-and-seen-columns-in-the-group-member-page-take-3/263887/1 "2023-05-04T21:47:23Z")

</div>

关于此论坛帖子（2023 年 2 月）的后续跟进：

> [@CSS to hide the Posted and Seen columns in the group member page, take 2](https://meta.discourse.org/t/css-to-hide-the-posted-and-seen-columns-in-the-group-member-page-take-2/253888):
>
> Following up on this forum thread from March 2021: The CSS to hide the “Posted” and “Seen” columns from the group detail member lists in desktop view now hides the Accept and Deny buttons when a group is set to have to request to join. Here’s the CSS that needs to be modified or replaced. /\* Remove "Posted" and "Seen" columns from group-detail member lists \*/ .group-members { th { &:nth-child(5), &:nth-child(6) { display: none; } } td { &:nth-child(4), &:nth-…

截至 3.1.0.beta4，之前提供的自定义 CSS 解决方案已不再适用于隐藏群组成员列表中的“已发布”和“已查看”列。

位于 https://[yourdiscourseforumurl].com/g/[YourGroupName] 的“添加”、“已发布”和“已查看”列可能不再是表格，这就是为什么以前基于表格的 CSS 不再适用的原因。

但我不是编码员，这就是我向您——智慧的 Discourse Meta 阅读者——求助的原因。 🙂

**如何隐藏“已发布”和“已查看”列** ，这些列在我们的社区中最多是无关紧要的，更有可能让所有看到它们的人感到困惑？

---

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [2023年五月4日 23:10 UTC](https://meta.discourse.org/t/css-to-hide-the-posted-and-seen-columns-in-the-group-member-page-take-3/263887/2 "2023-05-04T23:10:53Z")

</div>

我们目前在该表上没有很好的类名，我将添加一些，并在合并后跟进如何隐藏这些列（希望这足以避免第四次尝试）。

---

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [2023年五月5日 13:26 UTC](https://meta.discourse.org/t/css-to-hide-the-posted-and-seen-columns-in-the-group-member-page-take-3/263887/3 "2023-05-05T13:26:44Z")

</div>

好的，您需要升级 Discourse 以在此处添加一些类名：[DEV: add class names to group directory table (#21393) · discourse/discourse@f705e6d · GitHub](https://github.com/discourse/discourse/commit/f705e6d367997f074a8e6a34aa51d6a7c36694b3)

完成之后，您就可以执行以下操作：

```scss
.group-members {
  grid-template-columns: 3fr minmax(min-content, 1fr);
  [class*="--last-posted"],
  [class*="--last-seen"] {
    display: none;
  }
}

```

---

<div class="post-metadata">

**Author:** ![JoelZaslofsky](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joelzaslofsky/32/158556_2.png) [@JoelZaslofsky](https://meta.discourse.org/u/JoelZaslofsky)\
**Post date:** [2023年五月5日 14:22 UTC](https://meta.discourse.org/t/css-to-hide-the-posted-and-seen-columns-in-the-group-member-page-take-3/263887/4 "2023-05-05T14:22:34Z")

</div>

你真棒，Kris。谢谢！
