Main image: use document.body.clientWidth

document.width is super old and was deprecated years ago. It no longer
works and returns undefined.