css - JavaScript: Using marginLeft to position rating stars over image -
am using javascript plugin apply rating stars review. [fiddle] has of code. stars come in place of dropdown (the external resource isn't loading show in fiddle). stars showing fine on localhost, wanted position stars appear somewhere in middle (or maybe on image itself, wherever).
to effect, i'm making use of:
$(function() { var _elm=document.getelementbyid('example2'); _elm.style.marginleft = "150px"; $('#example2').barrating({ theme: 'fontawesome-stars', readonly: true, initialrating: 3 }); });
but stars not change position. how position stars then? completion, there no console errors.
the plugin setting example2 select display:none, changes on wont usefull.
you should apple css directly
.br-theme-fontawesome-stars .br-widget
for example can give it
margin-left:20px; margin-top:-50px;
but bellow image can give z-index
z-index:100;
and see changes on arrows.
the final result be:
.br-theme-fontawesome-stars .br-widget { height: 28px; white-space: nowrap; margin-left:20px; margin-top:-50px; z-index:100; }
fiddle - https://jsfiddle.net/omwpz0tw/12/
Comments
Post a Comment