vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Nicer poll bars - css (https://vborg.vbsupport.ru/showthread.php?t=305467)

billstelling 12-04-2013 11:00 PM

Nicer poll bars - css
 
1 Attachment(s)
I miss adding the images for the poll bars we had before. Even then it was a pain to code in and you had to up graphics to get the job done.

I put together a little coding to make it really simple to do and only takes about a minute to do.


To use this mod, add this code to additional css.
Code:

.pollbar1, .pollbar2, .pollbar3, .pollbar4, .pollbar5, .pollbar6  {
    top: 4px;
          border-radius: 3px 3px 3px 3px !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-color: transparent !important;
    background: -moz-linear-gradient(center top , rgb(218, 107, 19) 0%, rgb(253, 125, 22) 20px) repeat scroll 0% 0% transparent !important;
        background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgb(218, 107, 19)), color-stop(20px, rgb(253, 125, 22))) !important;
        background: -webkit-linear-gradient(top, rgb(218, 107, 19) 0%, rgb(253, 125, 22) 20px) !important;
        background: -o-linear-gradient(top, rgb(218, 107, 19) 0%, rgb(253, 125, 22) 20px) !important;
        background: -ms-linear-gradient(top, rgb(218, 107, 19) 0%, rgb(253, 125, 22) 20px) !important;
        background: linear-gradient(top, rgb(218, 107, 19) 0%, rgb(253, 125, 22) 20px) !important;
        filter: progid:dximagetransform.microsoft.gradient(startColorstr='#da6b13', endColorstr='#fd7d16', GradientType=0) !important;
        position: relative;
    -webkit-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
        -moz-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
        box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
}

Go to the stylvars for the theme, click the go button on the right and then check the box that says "Hide Variables". Pick "polls' in the list and set the "Poll Bar Height" to what you want, I used 6px and set "Poll Bar Margin" to 0.4em. Set the colors for the poll bars to the start color you set for the gradient if you changed it. I used #fd7d16.

You can set the colors for the gradient by adjusting the red code.

You can set the level of shadow by adjusting the dark orange code.

The blue is to bring them down and centered with the text for the poll item.

If you want a different one for each bar, use the same code, change to the colors you want, and remove the extra descriptors.
Code:

.pollbar1, .pollbar2, .pollbar3, .pollbar4, .pollbar5, .pollbar6  {
With each one just change pollbar1 to the number for that bar.

https://vborg.vbsupport.ru/external/2013/12/34.png
full size
Enjoy. ;)


Update:

Colored poll bars.

https://vborg.vbsupport.ru/external/2013/12/35.png

Code:

.pollbar1  {
    top: 4px;
      border-radius: 3px 3px 3px 3px !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-color: transparent !important;
    background: -moz-linear-gradient(center top , #d3d3d3 0%, #eaeaea 20px) repeat scroll 0% 0% transparent !important;
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #d3d3d3), color-stop(20px, #eaeaea)) !important;
    background: -webkit-linear-gradient(top, #d3d3d3 0%, #eaeaea 20px) !important;
    background: -o-linear-gradient(top, #d3d3d3 0%, #eaeaea 20px) !important;
    background: -ms-linear-gradient(top, #d3d3d3 0%, #eaeaea 20px) !important;
    background: linear-gradient(top, #d3d3d3 0%, #eaeaea 20px) !important;
    filter: progid:dximagetransform.microsoft.gradient(startColorstr='#d3d3d3', endColorstr='#eaeaea', GradientType=0) !important;
    position: relative;
    -webkit-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
    -moz-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
    box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
}
.pollbar2  {
    top: 4px;
      border-radius: 3px 3px 3px 3px !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-color: transparent !important;
    background: -moz-linear-gradient(center top , #0e0eff 0%, #3535ff 20px) repeat scroll 0% 0% transparent !important;
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #0e0eff), color-stop(20px, #3535ff)) !important;
    background: -webkit-linear-gradient(top, #0e0eff 0%, #3535ff 20px) !important;
    background: -o-linear-gradient(top, #0e0eff 0%, #3535ff 20px) !important;
    background: -ms-linear-gradient(top, #0e0eff 0%, #3535ff 20px) !important;
    background: linear-gradient(top, #0e0eff 0%, #3535ff 20px) !important;
    filter: progid:dximagetransform.microsoft.gradient(startColorstr='#0e0eff', endColorstr='#3535ff', GradientType=0) !important;
    position: relative;
    -webkit-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
    -moz-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
    box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
}
.pollbar3  {
    top: 4px;
      border-radius: 3px 3px 3px 3px !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-color: transparent !important;
    background: -moz-linear-gradient(center top , #318000 0%, #40a600 20px) repeat scroll 0% 0% transparent !important;
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #318000), color-stop(20px, #40a600)) !important;
    background: -webkit-linear-gradient(top, #318000 0%, #40a600 20px) !important;
    background: -o-linear-gradient(top, #318000 0%, #40a600 20px) !important;
    background: -ms-linear-gradient(top, #0e0eff 0%, #40a600 20px) !important;
    background: linear-gradient(top, #318000 0%, #40a600 20px) !important;
    filter: progid:dximagetransform.microsoft.gradient(startColorstr='#318000', endColorstr='#40a600', GradientType=0) !important;
    position: relative;
    -webkit-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
    -moz-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
    box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
}
.pollbar4  {
    top: 4px;
      border-radius: 3px 3px 3px 3px !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-color: transparent !important;
    background: -moz-linear-gradient(center top , #d80030 0%, #ff0039 20px) repeat scroll 0% 0% transparent !important;
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #d80030), color-stop(20px, #ff0039)) !important;
    background: -webkit-linear-gradient(top, #d80030 0%, #ff0039 20px) !important;
    background: -o-linear-gradient(top, #d80030 0%, #ff0039 20px) !important;
    background: -ms-linear-gradient(top, #d80030 0%, #ff0039 20px) !important;
    background: linear-gradient(top, #d80030 0%, #ff0039 20px) !important;
    filter: progid:dximagetransform.microsoft.gradient(startColorstr='#d80030', endColorstr='#ff0039', GradientType=0) !important;
    position: relative;
    -webkit-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
    -moz-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
    box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
}
.pollbar5  {
    top: 4px;
      border-radius: 3px 3px 3px 3px !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-color: transparent !important;
    background: -moz-linear-gradient(center top , rgb(17, 119, 209) 0%, rgb(9, 88, 156) 20px) repeat scroll 0% 0% transparent !important;
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgb(17, 119, 209)), color-stop(20px, rgb(9, 88, 156))) !important;
    background: -webkit-linear-gradient(top, rgb(17, 119, 209) 0%, rgb(9, 88, 156) 20px) !important;
    background: -o-linear-gradient(top, rgb(17, 119, 209) 0%, rgb(9, 88, 156) 20px) !important;
    background: -ms-linear-gradient(top, rgb(17, 119, 209) 0%, rgb(9, 88, 156) 20px) !important;
    background: linear-gradient(top, rgb(17, 119, 209) 0%, rgb(9, 88, 156) 20px) !important;
    filter: progid:dximagetransform.microsoft.gradient(startColorstr='#da6b13', endColorstr='#09589c', GradientType=0) !important;
    position: relative;
    -webkit-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
    -moz-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
    box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
}
.pollbar6  {
    top: 4px;
      border-radius: 3px 3px 3px 3px !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-color: transparent !important;
    background: -moz-linear-gradient(center top , #970880 0%, #bd26a4 20px) repeat scroll 0% 0% transparent !important;
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #970880), color-stop(20px, #bd26a4)) !important;
    background: -webkit-linear-gradient(top, #970880 0%, #bd26a4 20px) !important;
    background: -o-linear-gradient(top, #970880 0%, #bd26a4 20px) !important;
    background: -ms-linear-gradient(top, #970880 0%, #bd26a4 20px) !important;
    background: linear-gradient(top, #970880 0%, #bd26a4 20px) !important;
    filter: progid:dximagetransform.microsoft.gradient(startColorstr='#970880', endColorstr='#bd26a4', GradientType=0) !important;
    position: relative;
    -webkit-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
    -moz-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
    box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
}


Davey-UK 12-05-2013 03:50 PM

Do you have a screen shot of what to expect with this edit?
Ta

billstelling 12-05-2013 04:00 PM

added.. I missed it when I wrote it up. I added it while you were posting.. :D

ckgb 12-14-2013 09:11 AM

How did you get the number of votes to display in the same orange?

Thanks

billstelling 12-15-2013 10:12 PM

poll #'s
Code:

#pollresults li .votes .numvotes {
    font-size: 11px;
    color: #fd7d16;
}

poll %
Code:

#pollresults li .votes {
    font-size: 11px;
    color: #0d0d0d;
}


ckgb 12-15-2013 11:24 PM

Thank you very much

billstelling 12-19-2013 05:43 AM

:)your welcome..

ckgb 02-11-2014 07:29 AM

Polls having 0 votes display semitransparent looking tiny bars. Where is the option to change color of he "zero vote" bars?

Thank you.

billstelling 04-16-2014 01:09 AM

in this part of the code..

Code:

    -webkit-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
    -moz-box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
    box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
}


ku-med 01-09-2015 01:54 PM

Looks cool! Thanks.


All times are GMT. The time now is 08:05 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01058 seconds
  • Memory Usage 1,776KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete