title: How to create progressbar for counting votes
body: <p>I would like to create a YouTube like progressbar for counting votes</p>
  
  <p><a href="https://i.stack.imgur.com/05Cds.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/05Cds.png" alt="enter image description here"></a></p>
  
  <p>where the total votes ("likes" plus "dislikes") is the total width of the bar, and the total score ("likes" minus "dislikes") is the green part.
  Now, the width of the bar must be always 100%, meaning that, it doesn't matter if total votes are 500 or 1000, that number must always be 100%, and then I need to convert that green part from a fixed number to a percentage, so, if the total votes are 1200 (100%) and the likes are 850 (green part), I need to transform those 850 likes to a percentage, I don't really know how to explain, but I hope someone can get the idea and help me.</p>