A computer enclosure of an embodiment of the present invention includes a
chassis (30) and a hood (20). The chassis includes two side walls (32)
and a front wall (34). The side walls each define a number of receiving
holes (38) to slidably receive pins (28) of the hood. The front wall
defines a number of V-shaped notches (33). The hood forms a number of
retaining posts (24) corresponding to the notches of the chassis. Each
retaining post defines a slanted side face. When the hood is pushed
horizontally, the retaining posts and the notches cooperate to drive the
hood downwardly so that the hood tightly abuts against the chassis.