Change figure elements into div elements