We present Newtonian and fully general-relativistic solutions for the evolution of a spherical region of uniform interior density ρi(t), embedded in a background of uniform exterior density ρe(t). In both regions, the fluid is assumed to support pressure. In general, the expansion rates of the two regions, expressed in terms of interior and exterior Hubble parameters Hi(t) and He(t), respectively, are independent. We consider in detail two special cases: an object with a static boundary, Hi(t) = 0; and an object whose internal Hubble parameter matches that of the background, Hi(t) = He(t).In the latter case, we also obtain fully general-relativistic expressions for the force required to keep a test particle at rest inside the object, and that required to keep a test particle on the moving boundary. We also derive a generalised form of the Oppenheimer-Volkov equation, valid for general time-dependent spherically-symmetric systems, which may be of interest in its own right.