This paper discusses the variational structure of the line contact problem between an elastic medium and a fluid. The equations for the deformation in the elastic material, and for the flow of the viscous fluid are assumed to be determined from an elastic energy E and a power functional P respectively. Then it is shown that a variational formulation of the combined system can be given: apart from the equations in the interior of both media also the equations expressing balance of forces on the separating boundary are obtained from the power functional Image . To that end time dependent deformations are to be considered for which the velocity in the elastic medium vanishes and for which the acceleration of particles on both sides of the common boundary is equal. This general result is employed in the rest of the paper to a typical problem from elastohydrodynamic lubrication theory. The flow of the lubricant allows a basic variational formulation by assuming it to be dominated by viscous dissipation. The complicated resulting expressions are simplified considerably by imposing the common restriction to small deformations and by exploiting the characteristic length scales of the problem. These approximations are performed directly into the governing power and energy functional. The formulation of the approximated system becomes a genuine variational principle and produces correctly the differential expressions. Moreover, it generates in a natural way efficient numerical methods to calculate the deformation of and the pressure at the free boundary if the time variable is discretized.