YOP Poll
[resolved] Styling the results bars (2 posts)

  1. _JamesW
    Posted 2 years ago #

    Hi, I would like to remove the inline stylesheet which is added before a poll, and do the styling in my own stylesheet. Where possible I would like to use css classes to apply consistent styles to all my polls, rather than inline styles which target specific elements.

    Firstly, can I do this? I can make a new template and clear the css section. This will get rid of the rules, but leave an empty style tag. Is there a way to stop the style from being added at all?

    Secondly, how can I style the answer result bar? The elements that make it up don't have any usable css identifiers, which makes it very difficult to target them from a normal stylesheet. I'd like to add some useful identifiers, but the results bar doesn't seem to be something I can change from the template.



  2. YOP
    Plugin Author

    Posted 2 years ago #

    Hi James,

    Each poll has an unique ID so when the poll is displayed every element includes that ID in the html ids or classes so you can't apply a single stylesheet.

    Please view this topic as well:


    Regarding your last question, edit your template and you can use .yop-poll-results-bar-%POLL-ID% to style the results bar.


    YOP Team

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic