Refactoring to support overflow: hidden issue.