add function to calculate div height for flag list container div