# 如何添加 id 或 class 以便修改元素？

**URL:** <https://meta.discourse.org/t/how-to-add-an-id-class-to-something-so-i-can-modify-it/117558>\
**Category:** Support\
**Created:** [2019年五月13日 07:36 UTC](https://meta.discourse.org/t/how-to-add-an-id-class-to-something-so-i-can-modify-it/117558 "2019-05-13T07:36:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dylanh724](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dylanh724/32/119642_2.png) [@dylanh724](https://meta.discourse.org/u/dylanh724)\
**Post date:** [2019年五月13日 07:36 UTC](https://meta.discourse.org/t/how-to-add-an-id-class-to-something-so-i-can-modify-it/117558/1 "2019-05-13T07:36:57Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/3X/2/b/2b2baa8af14d3c4a845adc5053924c141a1d178b.png)

In the profile, I want to remove the highlighted field:

![](https://global.discourse-cdn.com/meta/original/3X/e/c/ecac787fd2d052e1748ff3cb4e7098ea90308463.png)

I can hide the value, but not the label because there’s no id/class.

Anyone know what to do?

This is necessary [because of this privacy bug](https://meta.discourse.org/t/last-post-stat-considers-private-messages/117541)

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2019年五月13日 07:43 UTC](https://meta.discourse.org/t/how-to-add-an-id-class-to-something-so-i-can-modify-it/117558/2 "2019-05-13T07:43:58Z")

</div>

You don’t need to. Target it as the “nth item of type {x}”. As long as the number of items isn’t shifting around, this is safe.

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2022年九月15日 11:41 UTC](https://meta.discourse.org/t/how-to-add-an-id-class-to-something-so-i-can-modify-it/117558/4 "2022-09-15T11:41:59Z")

</div>


