improved css, calculate actual panel height