Support » Plugin: YOP Poll » Vote button customization

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author YOP

    (@yourownprogrammer)

    Hello

    Yes, it is possible to style the vote button.
    You will need to edit the poll template you are using and on CSS Section look for this line

    #yop-poll-vote-%POLL-ID% div button {

    This is where you can place your custom width.

    Best
    YOP Team

    Hello,

    I’m using the white template and believe I’ve found the correct code area. It’s the last code in the template.

    <div id = "yop-poll-vote-%POLL-ID%" class = "yop-poll-footer">
    	<div>%POLL-VOTE-BUTTON%</div>
    	<div id = "yop-poll-results-%POLL-ID%">%POLL-VIEW-RESULT-LINK%</div>
    	<div>%POLL-TOTAL-ANSWERS-LABEL%</div>   <div>%POLL-TOTAL-VOTES-LABEL%</div>
    </div>

    Could you tell me what I would change about this to make the button 40px wide for desktop view and for smartphone view, it would need be as wide as the container is? I have the poll in the right sidebar and all other items with buttons in that sidebar go full width when viewing on the smartphone.

    Plugin Author YOP

    (@yourownprogrammer)

    Hello

    Edit the poll template you are using (YOP Poll->Templates) and on the CSS Section add the code below

    #yop-poll-vote-%POLL-ID% div button {
    width: 100%
    }

    Best
    YOP Team

    • This reply was modified 1 year, 8 months ago by  YOP.

    Well this does work to a point. It raises a bigger issue for me in that my theme defines the sidebar as a percentage. Currently set to 25%. But the Poll Template defines the template width in pixels. Can I change this to a percent?

    If not, I’ve figured out that 275px for the poll widget template does provide full vote button coverage but only for the desktop. In smartphone view mode, the button is about 20% to short.

    Can we cover the widget template width to a percentage? I’m thinking that may allow it to work for both desktop & smartphone mode.

    Or can you suggest another solution? Check out https://arlinstitute.org/support with your desktop & iPhone to see what I’m talking about.

    Thanks!

    I edited the poll template and replaced the px figure with 100% figuring it would be full width for the container it is in. That does make it go wide for both computer and smartphone. But still not as wide as the other plugins.

    So I changed it to 110% and then it’s too wide on the right hand side. Left hand is still anchored short compared to the other items in that right sidebar.

    OK, I took out some of the padding on the poll container and think it matches up now. Thanks!

    Ren

    (@localcause)

    How can I left-align the vote submit button?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Vote button customization’ is closed to new replies.