Fastening of cover or lid to box