The value returned by offsetWidth contains width, padding and border-width.
So the width fixed element should substract the padding and border-width.