Use max-height instead of height for popup window