The Casimir-Lifshitz force F (C−L) between planar objects when one of them is stratified at the nanoscale is herein investigated. Layering results in optical interference effects that give rise to a modification of the optical losses, which, as stated by the fluctuation-dissipation theorem, should affect the Casimir-Lifshitz interaction. On these grounds, we demonstrate that, by nanostructuring the same volume of dielectric materials in diverse multilayer configurations, it is possible to access F (C−L) of attractive or repulsive nature, even getting cancelled, at specific separation distances.