3

My element has a CSS rule applied to it giving it left: 0%. When I access that element with JS and use el.style.left, I get an empty string. When I use window.getComputedStyle(el), it gives me a pixel value. How can I access the actual "0%" that the CSS has set it to? I need to be able to read this.

I'm only using left as an example though....same goes for all the other CSS properties on the element. How can I see them?

temporary_user_name
  • 35,956
  • 47
  • 141
  • 220

0 Answers0