smart size of modalbox while tabbing