We present a family of relativistic fluid spheres using the Karmarkar criterion along with the Pandey–Sharma condition. Ranges of n and m for well-behaved solutions depend on the mass and radius of the compact star model. As an example, we have chosen Vela X-1 (M=1.77M⊙,R=9.56km) for complete analysis of the solutions. For the same star, the well-behaved ranges are 1<n<5 and 3<m<13. However, beyond these limits, either the transversal sound speed becomes imaginary or violates the causality principle. Further, the critical part of our solution is that corresponding to every nonzero positive even value of m yields zero values of all the physical quantities.