remove header and footer attributes if header/footer has no size