  (Abridged) We present an imaging and spectroscopic survey of galaxies in
fields around QSOs HE0226-4110, PKS0405-123, and PG1216+069. The fields are
selected to have ultraviolet echelle spectra available, which uncover 195 Lya
absorbers and 13 OVI absorbers along the three sightlines. We obtain robust
redshifts for 1104 galaxies of rest-frame absolute magnitude M_R-5log h <~ -16
and at projected physical distances rho <~ 4 h^{-1} Mpc from the QSOs.
HST/WFPC2 images of the fields around PKS0405-123 and PG1216+069 are available
for studying the optical morphologies of absorbing galaxies. Combining the
absorber and galaxy data, we perform a cross-correlation study to understand
the physical origin of Lya and OVI absorbers and to constrain the properties of
extended gas around galaxies. The results of our study are (1) both strong Lya
absorbers of log N(HI) >= 14 and OVI absorbers exhibit a comparable clustering
amplitude as emission-line dominated galaxies and a factor of ~ 6 weaker
amplitude than absorption-line dominated galaxies on co-moving projected
distance scales of r_p < 3 h^{-1} Mpc; (2) weak Lya absorbers of log N(HI)<13.5
appear to cluster very weakly around galaxies; (3) none of the absorption-line
dominated galaxies at r_p <= 250 h^{-1} kpc has a corresponding OVI absorber to
a sensitive upper limit of W(1031) < 0.03 A, while the covering fraction of OVI
absorbing gas around emission-line dominated galaxies is found to be kappa ~
64%; and (4) high-resolution images of five OVI absorbing galaxies show that
these galaxies exhibit disk-like morphologies with mildly disturbed features on
the edge.
