Liquid-phase electron microscopy (LPEM) is capable of imaging nanostructures and processes in a liquid environment. The spatial resolution achieved with LPEM critically depends on the thickness of the liquid layer surrounding the object of interest. An excessively thick liquid results in broadening of the electron beam and a high background signal that decreases the resolution and contrast of the object in an image. The liquid thickness in a standard liquid cell, consisting of two liquid enclosing membranes separated by spacers, is mainly defined by the deformation of the SiN membrane windows toward the vacuum side, and the effective thickness may differ from the spacer height. Here, we present a method involving a pressure controller setup to balance the pressure difference over the membrane windows, thus manipulating the shape profiles of the used silicon nitride membrane windows. Electron energy loss spectroscopy (EELS) measurements to determine the liquid thickness showed that it is possible to control the thickness precisely during an LPEM experiment by regulating the interior pressure of the liquid cell. We demonstrated atomic resolution on gold nanoparticles and the phase contrast using silica nanoparticles in liquid with controlled thickness.