replace code element with div