Add before and after elements.