Fasten the box
Clamp the remodeling box to the wall. Connect the new dimmer wires as directed by the manufacturer (Figure A). Fold the wires gently into the box. Screw the dimmer to box, replace the cover plate, turn on the power and test the device.
Read more: http://www.familyhandyman.com/electrical/wiring-switches/how-to-install-dimmer-switches/view-all#ixzz3Qfz5lEXc