I have some JavaScript code that moves a style and I need it to set the margin top with a percentage with JavaScript to move a div with the += but it uses pixels and I need it to be the same across screens eg. screen size. how can I do that with JavaScript ill give my code below the other stuff that isn't needed isn't shown;
cowY += 10;
cow.style.marginTop = "0%";
cow.style.marginTop = cowY;
cow.style.marginTop = `${cowY}%`
maybe?