Do not add layout attributes for header or footer if size is zero