gallery set p to div