0 Replies Latest reply on Feb 19, 2015 1:24 AM by julkjen

    scaling height also scales width

    julkjen Level 1

      var hoyde = sym.$('vannbeholder_vann').height();

      var newHoyde = hoyde-((hoyde/2)*opacityLevel);

       

      sym.$('vannbeholder_vann').css('height', newHoyde);


      I'm using the above code to shrink an svg image in my project, I only want to shrink the height, and keep the width - but this code shrinks them both together


      What am I doing wrong?


      My project is responsive on width - is that why it's messing up?

      Any way to work around that?