# 是否可以为用户标题添加彩色徽章背景？

**URL:** https://meta.discourse.org/t/is-it-possible-to-add-a-colored-badge-background-to-a-user-title/38523
**Category:** Support
**Created:** [2016 年1 月 26 日 18:11 UTC](https://meta.discourse.org/t/is-it-possible-to-add-a-colored-badge-background-to-a-user-title/38523 "2016-01-26T18:11:18Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### 作者： ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### 发布日期： [2017 年8 月 26 日 22:27 UTC](https://meta.discourse.org/t/is-it-possible-to-add-a-colored-badge-background-to-a-user-title/38523/12 "2017-08-26T22:27:05Z")

</div>

You can do it only for **primary** groups.

Change “DevTeam” with the name of your primary group and customize colors and other things as you wish:

> [@Primary group class not available on usercard and user page](https://meta.discourse.org/t/primary-group-class-not-available-on-usercard-and-user-page/32417/2):
>
> I change the custom group in a primary group. Now I can see the id group-DevTeam And this is the code now: .username.DevTeam a { background: #C30303; padding: 3px 6px; line-height: 1; border-radius: 2px; display: inline-block; color: #FFF; } .username.DevTeam { max-width: initial !important; } .username.DevTeam .fa.fa-shield { display: none; } .username.DevTeam::after, .user-main .fa.fa-shield::before, #user-card .fa.fa-shield::before { content: 'Dev…

---

_[View the full topic](https://meta.discourse.org/t/is-it-possible-to-add-a-colored-badge-background-to-a-user-title/38523)._
