Simplified slider layout code.