Use offsetWidth instead of hardcoded value