Steps: 1. Loosen and remove the door trim with a pry bar. Be sure to wear safety goggles while hammering or prying to protect your eyes from splinters and other flying debris (figure A).
2. Use the pliers to pull out old nails, or just hammer them through the trim piece, so the piece can be reused.
3. Sometimes the side and top trim pieces will be connected by a nail that runs diagonally through the pieces. If you come across this, just slip a hacksaw blade into the gap and cut through the nail (figure B).
4. Align the doorframe with a level.
5. Drill pilot holes to anchor the frame and nail the frame to the stud. Place nails in studs at six points along the frame, staggering them on opposite sides. Start with the stud nearest the latch, since that's where the door's most stressed (figure C). Remember, always wear safety glasses while drilling and hammering.
6. Check the door frequently during the process, making sure it's opening and closing properly.
7. Sink the nail heads with a nail set (figure D).
8. Put the trim back in place and align it with a level.
9. Reattach the trim with nails. Sink the nail heads and cover them with putty.