Change Poll Bar Colors
#11
impressive nice tutorial clever yaldaram Big Grin
Reply
#12
(2011-11-12, 04:27 AM)Yaldaram Wrote: This only covers the polls on showthread pages. If you guys need to change the poll colors on Poll pages, then let me know. I'll update the first post.

Hello Yaldaram,

Did you ever update this. I also have poll on index and it's not showing any color

Reply
#13
Apologies, I completely forgot this thread. I've to go now for University I'll surely update this in after few hours.
For adding these colors on Poll results page, I've updated the first post.
Reply
#14
is it possible (and maybe easier) to add color into one poll bar (preselected when i create a poll into a post)?
Reply
#15
This user has been denied support. This user has been denied support.
Awesome,need this. thanks friend.
Reply
#16
Thank You.
Reply
#17
I made the changes above, and the bars are now colored with the % shown inside the bars, but now all bars are the same length including the colored part of the bar. I have retraced my steps, but I don't see what I have done wrong. I'm using the default template.

Also, is there any way to edit the number of decimal places? I would rather have 40.6% not 40.67%

I'm horribly rusty at CSS, but I kept messing around with the showthread_poll_resultbit code and I finally got it to work, only better:

<td class="{$optionbg}">
<div style="width:400px;">
</div>
<div style="background-color: #fff; border: 1px solid black; width:{$percent}%; margin-top: 1px; font-size: 12px;">
<div style="background-color: {$pollbg}; color: #000000; font-weight:bold; max-width:100%; &nbsp; width:{$percent}%; height:16px;">
&nbsp;&nbsp;&nbsp;{$percent}%
</div>
</div>
</td>
Reply
#18
Most commonly issue arises if "Codepress" is turned ON.

AdminCP > Preferences > Turn on / off Codepress > should be turned OFF

Turning ON this setting most probably add &nbsp; like characters while pasting the code copied from somewhere.
Reply
#19
Cool . Do it for calendar too?
[Image: 468x60_bf4brasil_site_zpsd7eefd7f.png]
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)