Notifications
Clear all

Style [Solved] How to change the colour of a Spoiler Title

7 Posts
2 Users
1 Reactions
464 Views
Posts: 52
Topic starter
(@amitkool21)
Trusted Member
Joined: 5 years ago

Hello,

 

As the topic says, How can we change the colour of a Spoiler Title ? 

For Example :

Spoiler
Hello
This is an example

How to change the colour of Spoiler Title Hello, Because If we change it with the formatting buttons, the whole Spoiler section gets hidden.

Thank You.

6 Replies
Tutrix
Posts: 1302
(@tutrix)
Noble Member
Joined: 4 years ago

@amitkool21

Example 😉 

#wpforo #wpforo-wrap .wpf-spoiler-wrap .wpf-spoiler-title {
  color: #ff0000;
}
1 Reply
(@amitkool21)
Joined: 5 years ago

Trusted Member
Posts: 52

Thanks @tutrix 

It worked flawlessly, But what if we want to change the colour of 3 spoilers in a post with different different colours ?

Tutrix
Posts: 1302
(@tutrix)
Noble Member
Joined: 4 years ago

@amitkool21

#wpforo #wpforo-wrap .wpf-spoiler-wrap .wpf-spoiler-title {
 color: #ff0000;
}
#wpforo #wpforo-wrap .wpf-spoiler-wrap:nth-of-type(2n) .wpf-spoiler-title {
 color: #ff9900;
}
#wpforo #wpforo-wrap .wpf-spoiler-wrap:nth-of-type(3n) .wpf-spoiler-title {
 color: #17a2b8;
}
3 Replies
(@amitkool21)
Joined: 5 years ago

Trusted Member
Posts: 52

Thanks again @tutrix 

That's a nice workaround. But there's a problem, Suppose I create an another topic in forums and need different colour on second spoiler and if I change it in custom css, then all the spoilers in other topics will also change.

Tutrix
(@tutrix)
Joined: 4 years ago

Noble Member
Posts: 1302

@amitkool21 

you can add the Post ID

example Post ID 14

#wpforo #wpforo-wrap #post-14 .wpf-spoiler-wrap .wpf-spoiler-title {
color: #ff0000;
}
#wpforo #wpforo-wrap #post-14 .wpf-spoiler-wrap:nth-of-type(2n) .wpf-spoiler-title {
color: #ff9900;
}
#wpforo #wpforo-wrap #post-14 .wpf-spoiler-wrap:nth-of-type(3n) .wpf-spoiler-title {
color: #17a2b8;
}
(@amitkool21)
Joined: 5 years ago

Trusted Member
Posts: 52

That's wonderful, Thanks again @tutrix 

But it would be awesome if the developers could implement this small feature in forum update.

 

Thanks again 🙂