auto-adjust sidebar