A method for analyzing the x-ray scattering of a stack of phospholipid membranes at the solid-liquid interface in excess water is presented. It is argued that bilayers near the substrate fluctuate less significantly than the ones away from it and, therefore, make a larger contribution to the specular reflection at the low index Bragg peaks. But the diffuse scattering due to thermal fluctuations corrupts the Bragg peaks at high angles so that the specular contribution is not clearly observable. In the midst the specular reflection and the diffuse scattering cannot be separated easily and must be analyzed simultaneously. The height-difference correlation function derived from a modified Caillé theory enables one to simulate the longitudinal and the transverse scans in the same theoretical framework to yield more reliable structural parameters. The theoretical apparatus is successfully applied to the experimental data on DOPC membranes.