Use offsetWidth for calculating container width.

This solves an issue with jQuery's `outerWidth` method which breaks
on hidden objects with a % width in their style. offsetWidth simply
returns a 0 on those objects which suits our purpose just fine.