apply overflow property when it is needed