adds footer and overflow to subsections