# Evidenziare argomento in evidenza?

**URL:** https://meta.discourse.org/t/highlight-pinned-topic/33588
**Category:** Support
**Created:** [22 Settembre 2015, 3:54pm UTC](https://meta.discourse.org/t/highlight-pinned-topic/33588 "2015-09-22T15:54:08Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![SidV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sidv/32/119460_2.png) [@SidV](https://meta.discourse.org/u/SidV)
#### Post date: [22 Settembre 2015, 3:54pm UTC](https://meta.discourse.org/t/highlight-pinned-topic/33588/1 "2015-09-22T15:54:08Z")

</div>

Hello my friends, how could I highlight the title of pinned thread?

I mean:

 ![](https://global.discourse-cdn.com/meta/original/3X/0/d/0dcca09dfc202083f320c65763148c1b0d435d86.png)

I need something like that (of course thats an image to example)

Thank for your advices.  
Regards

---

<div class="post-metadata">

### Author: ![purldator](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@purldator](https://meta.discourse.org/u/purldator)
#### Post date: [22 Settembre 2015, 6:35pm UTC](https://meta.discourse.org/t/highlight-pinned-topic/33588/2 "2015-09-22T18:35:29Z")

</div>

I was going to suggest you use your browser’s developer tools to capture the CSS class but I did not find anything that screams “pinned” when I checked it for myself.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [22 Settembre 2015, 6:59pm UTC](https://meta.discourse.org/t/highlight-pinned-topic/33588/3 "2015-09-22T18:59:12Z")

</div>

I’ve used this to target the icon  
`div.topic-statuses span.topic-status i.fa.fa-thumb-tack`  
But as CSS doesn’t have “parentNode” I think you may need to use JavaScript

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [22 Settembre 2015, 7:05pm UTC](https://meta.discourse.org/t/highlight-pinned-topic/33588/4 "2015-09-22T19:05:23Z")

</div>

Maybe `.has-excerpt` will work to get the parent row.

---

<div class="post-metadata">

### Author: ![SidV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sidv/32/119460_2.png) [@SidV](https://meta.discourse.org/u/SidV)
#### Post date: [22 Settembre 2015, 9:07pm UTC](https://meta.discourse.org/t/highlight-pinned-topic/33588/5 "2015-09-22T21:07:49Z")

</div>

> [@simon](#):
>
> Maybe .has-excerpt will work to get the parent row.

Excuse my ignorance but my knowledge of CSS are limited, how could highlight the text from there?

Could you tell me an example please? 😊

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [22 Settembre 2015, 9:29pm UTC](https://meta.discourse.org/t/highlight-pinned-topic/33588/6 "2015-09-22T21:29:42Z")

</div>

I think, but I’m not sure, that the only items in the topic list that have the class `.has-excerpt` are the pinned topics. You could try adding this to the admin\>customize\>css/html area

```css
.list-container .has-excerpt .title {
    display: inline-block; // makes it easier to position
    background: yellow; // gives the title a yellow background
}
// gives the pin icon a yellow background and pads it out to match the title
.has-excerpt .topic-status {
    display: inline-block;
    background: yellow;
    padding: 15px;
}

```

If you figure out how to use the developer tools in your web browser you can play around with it until it works.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [22 Settembre 2015, 10:14pm UTC](https://meta.discourse.org/t/highlight-pinned-topic/33588/7 "2015-09-22T22:14:33Z")

</div>

I just tried this

```plaintext
tr.has-excerpt td.main-link a { 
  background-color: #FF0; 
}

```

which seems close, but not quite

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

---

<div class="post-metadata">

### Author: ![SidV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sidv/32/119460_2.png) [@SidV](https://meta.discourse.org/u/SidV)
#### Post date: [26 Settembre 2015, 10:55pm UTC](https://meta.discourse.org/t/highlight-pinned-topic/33588/8 "2015-09-26T22:55:28Z")

</div>

Thanks very much.

Now we’ve got this:

 ![](https://global.discourse-cdn.com/meta/original/3X/7/7/779cf0b0b7c08d6f4ae3b810cef4d2cd5f6a4264.png)

Css code:

```
.list-container .has-excerpt .title {
    background: rgba(255,230,0,0.5);
    padding: 0px 5px !important;
    margin: -3px 0px;
    line-height: 1.7;
    border-radius: 20px;
    display:inline-block;
}

```

Thanks again !

---

<div class="post-metadata">

### Author: ![Json\_Blob](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/json_blob/32/119534_2.png) [@Json\_Blob](https://meta.discourse.org/u/Json_Blob)
#### Post date: [22 Settembre 2018, 2:28am UTC](https://meta.discourse.org/t/highlight-pinned-topic/33588/9 "2018-09-22T02:28:48Z")

</div>

Is this added as a component in current design? The current design doesn’t have a CSS/HTML area in the customize menu of the admin section so i’m not sure where I should plop the code chunk above.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [22 Settembre 2018, 10:36am UTC](https://meta.discourse.org/t/highlight-pinned-topic/33588/10 "2018-09-22T10:36:13Z")

</div>

Yes, you can add it as a component so long as your component is included in your current theme.

---

<div class="post-metadata">

### Author: ![Json\_Blob](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/json_blob/32/119534_2.png) [@Json\_Blob](https://meta.discourse.org/u/Json_Blob)
#### Post date: [22 Settembre 2018, 4:08pm UTC](https://meta.discourse.org/t/highlight-pinned-topic/33588/11 "2018-09-22T16:08:51Z")

</div>

Hrm, not sure what I’m missing here in the translation. can you take a peek at this?

 ![Capture](https://global.discourse-cdn.com/meta/original/3X/0/7/0771741aac5042e48fd46de408dfc8f42f55aa13.png)

What do I need to do from here? I see the “Make theme” button, is that what I want? The warning message had me a little worried to click on it

---

<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: [8 Giugno 2024, 12:37pm UTC](https://meta.discourse.org/t/highlight-pinned-topic/33588/12 "2024-06-08T12:37:14Z")

</div>

Questo argomento è stato chiuso automaticamente dopo 3181 giorni. Non sono più consentite nuove risposte.
