Notifications
Clear all

Not solved - Random Pole Colors aren't Cool

3 Posts
2 Users
1 Reactions
85 Views
Posts: 13
Topic starter
(@treybiker)
Eminent Member
Joined: 7 months ago

Hi, all, my last post was marked solved but they didn't seem to understand my question/request. Changing the background color of the poles is easy with CSS (what they instructed me to do), but I want to choose the colors of the pole results AFTER they have votes.

Currently, every time I open the pole to see the results, there is a different ugly color representing the votes, none of which match my theme. It's never even the same color because the wpForo addon alternates the colors every time the page is opened or refreshed. This is such a great plugin with a lot of flexibility, but I can't imagine anyone would want their poles to have a color randomizer control what colors are used... none of which match the site's theme. 

Can this please be updated to allow us to customize the pole RESLUTS' colors? At the very least, make it to where the pole result colors match the wpForo forum color we set in the fourms/categories setting.

2 Replies
Astghik
Posts: 6223
Admin
(@astgh)
Illustrious Member
Joined: 7 years ago

Hi,

You can use CSS code similar to the examples provided below:

To change the background for the first row:

#wpforo #wpforo-wrap .wpf-poll.wpf-poll-result .wpforo-tr:first-child .wpf-poll-bar {background: #4a0303 !important;}

This one for the second one: 

#wpforo #wpforo-wrap .wpf-poll.wpf-poll-result .wpforo-tr:nth-child(2) .wpf-poll-bar {background: #4a0303 !important;}

Simply adjust the nth-child value to target the desired row and set the color accordingly.

The red-marked value can be changed as you like.

Insert the code in the Custom CSS code textarea located in the following tab: 

For the Single Board Forum:

  • Dashboard > wpForo > Settings > Colors & Styles

Multi-Boards Forum:

  • Dashboard > EN > Settings > Colors & Styles tab
  • Dashboard > FR > Settings > Colors & Styles tab
Reply
1 Reply
(@treybiker)
Joined: 7 months ago

Eminent Member
Posts: 13

@astgh PERFECT!

I used even/odd as below in case others choose to do so.

 

#wpforo #wpforo-wrap .wpf-poll.wpf-poll-result .wpforo-tr:nth-child(odd) .wpf-poll-bar {
background: green !important;
}
 
#wpforo #wpforo-wrap .wpf-poll.wpf-poll-result .wpforo-tr:nth-child(even) .wpf-poll-bar {
background: blue !important;
}
Reply
Share:
Scroll to top