adding rules for gallery on portrait view