Apply css positionbefore image loads