Make Poll Result Bars Multiple Colors

Just add this CSS to the end of your templates default.css

 

/******************** Poll Module Result Bar Colors Begin *******************/
div.pollResultStatsRow:nth-child(5n+0) {
background-color: #3498db !important;
}
div.pollResultStatsRow:nth-child(5n+1) {
background-color: #e74c3c !important;
}
div.pollResultStatsRow:nth-child(5n+2) {
background-color: #1bc5a4 !important;
}
div.pollResultStatsRow:nth-child(5n+3) {
background-color: #9b59b6 !important;
}
div.pollResultStatsRow:nth-child(5n+4) {
background-color: #e67e22 !important;
}
/******************** Poll Module Result Bar Colors End *******************/

 

Feel free to change the colors, or to add more.  The css to repeat should be obvious.  Change the above css to reflect how many different colors you want to cycle through.  xn is the counter where x = the number of colors you will use, and it is common to all the different child selectors.  Then increment the counter as shown above until you have the css for all the colors.

 

 

pollsHome.png · 50.6K · 369 views
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 20 Oct 2015

If your template does not have a default.css file, use the attached.

 

If it does not exist, create the folder: /templates/tmpl_YourTemplate/css, and upload default.css to that location

default.css · 620B · 134 downloads
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 20 Oct 2015

Excellent work!

Already implemented with positive feedback!

 

Thanks, your like the Grinch.. lmao

Mean and at the same time there is a hidden do good side!

All joking aside, one GREAT improvement!

ManOfTeal.COM an OpenRCT2 Gaming Community
Quote · 20 Oct 2015

Here's css that sequences through 11 colors. Bars also have a box shadow.

 

/******************** Poll Module Result Bar Colors Begin *******************/
div.pollResultStatsRow:nth-child(11n+0) {
background-color: #e74c3c !important;
}
div.pollResultStatsRow:nth-child(11n+1) {
background-color: #e67e22 !important;
}
div.pollResultStatsRow:nth-child(11n+2) {
background-color: #f1c40f !important;
}
div.pollResultStatsRow:nth-child(11n+3) {
background-color: #2ecc71 !important;
}
div.pollResultStatsRow:nth-child(11n+4) {
background-color: #3498db !important;
}
div.pollResultStatsRow:nth-child(11n+5) {
background-color: #9b59b6 !important;
}
div.pollResultStatsRow:nth-child(11n+6) {
background-color: #c0392b !important;
}
div.pollResultStatsRow:nth-child(11n+7) {
background-color: #d35400 !important;
}
div.pollResultStatsRow:nth-child(11n+8) {
background-color: #2980b9 !important;
}
div.pollResultStatsRow:nth-child(11n+9) {
background-color: #27ae60 !important;
}
div.pollResultStatsRow:nth-child(11n+10) {
background-color: #7f8c8d !important;
}
div.pollResultStatsRow {
-webkit-box-shadow: 5px 5px 6px 1px rgba(0,0,0,0.75);
-moz-box-shadow: 5px 5px 6px 1px rgba(0,0,0,0.75);
box-shadow: 5px 5px 6px 1px rgba(0,0,0,0.75);
}
div.poll_block div.pollAnswerBlock, div.poll_block div.pollAnswerBlockView {
    background-color: #ecf0f1 !important;
}
/******************** Poll Module Result Bar Colors End *******************/

Before

After

StdPoll.png · 22.2K · 328 views
ColorPoll.png · 36.2K · 321 views
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 21 Oct 2015

Much appreciated, thank you!

7.3.4 with responsive UNI
Quote · 21 Oct 2015

very nice, thanks!

http://www.boonex.com/market/posts/paansystems - your resource for Dolphin Pro
Quote · 21 Oct 2015

nice!!

Always remember that the future comes one day at a time.
Quote · 21 Oct 2015

Thanks :) indeed very nice work :)

Proud Hosted by Zarconia.net
Quote · 21 Oct 2015

Thanks works like a charm

Quote · 9 Apr 2017