Great Obedience Training Tool
It is important that your dog fit comfortably into the box, but making it too large will be a big mistake as it will create the exact issue you are trying to correct / prevent. If you have a puppy now, you may end up building a few boxes until the puppy becomes a dog. I did!
See: online dog training
The width of the box should be just a small amount wider than your dog as you can see in the diagram below.