If you can fancy a quick 'n easy solution, then spray-on carpet adhesive might be a way to go.
Cut the fabric to the rough shape of the outside of the box, and then follow the instructions on the spray can.
Trim the fabric corners tight to the corners of the box, or mitre and fold over, envelope style, and stick the overlap down with more of the same adhesive.
Make sure you are 100% happy with the fabric choice though, once it's stuck on with that stuff, it's never coming off.