Jump to content

How do we target 'Pinned' topics in CSS?

Featured Replies

Posted

I am ideally wanting to change the background color of pinned topics. How would I go about this?

I tried adding this to extra.css to no avail:

 

[data-ipstooltip title="Pinned"] .ipsDataItem  {
	background: orange!important;
}

 

There's no real way to target the entire row as you are attempting to do I'm afraid.

What you would need to do is first edit the HTML template that generates the rows to set a new property or CSS class or similar on the row if the topic is pinned, and then use that in your CSS.

jQuery can be used.

$( 'i.fa-thumb-tack' ).closest( 'li.ipsDataItem' ).css( 'backgroundColor', 'red' );

 

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.