If you design the lid within an assembly containing the box you can simply offset the geometry to create the nesting feature. This assumes the box geometry uses the same entities for all the various sizes. And it also assumes the various box sizes are configurations of the base size. The assembly would then also have a configuration for each size and the lid in each assembly configuration would fit the box.