Get width in pixels from element with style set with %?
document.getElementById('banner-contenedor').clientWidth
You want to get the computed width. Try: .offsetWidth
(I.e: this.offsetWidth='50px'
or var w=this.offsetWidth
)
You might also like this answer on SO.