  In this paper, we study relative deformations of maps into a family of
K\"ahler manifolds whose images are divisors. We show that if the map satisfies
a condition called semiregularity, then it allows relative deformations if and
only if the cycle class of the image remains Hodge in the family. This gives a
refinement of the so-called variational Hodge conjecture. We also show that the
semiregularity of maps is related to classical notions such as Cayley-Bacharach
conditions and d-semistability.
