I have this element:
<div style="width: 100%; height: 10px;"></div>
I want to get it’s width in pixels. I just tried this:
document.getElementById('banner-contenedor').style.width
Which returns 100%. Is it possible to actually get the element’s width in pixels with JavaScript?
1 Answer