Improved 'resize' directive