Notifications
Clear all

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

7 Posts
2 Users
1 Likes
187 Views
amitkool21
Posts: 46
Topic starter
(@amitkool21)
Trusted Member
Joined: 3 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.

wpForo Version
2.0.7
WordPress Version
6.0.2
6 Replies
Tutrix
Posts: 871
(@tutrix)
Noble Member
Joined: 3 years ago

@amitkool21

Example 😉 

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

Trusted Member
Posts: 46

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: 871
(@tutrix)
Noble Member
Joined: 3 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
(@amitkool21)
Joined: 3 years ago

Trusted Member
Posts: 46

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: 3 years ago

Noble Member
Posts: 871

@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
(@amitkool21)
Joined: 3 years ago

Trusted Member
Posts: 46

That's wonderful, Thanks again @tutrix 

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

 

Thanks again 🙂