I did something similar with the top on my flip-top cart.  It is nice because it stops and you do not have to fiddle with lining up knobs or anything.  I added a sliding piece side so that all 4 corners are resting on the sides.  I also used window sash locks to make it all nice and tight.  All 4 corners look like this. 

--Nathan, TX. Hire the lazy man. He may not do as much work but that's because he will find a better way.