How to sew a centered zipper
This is your standard zipper, generally used for closures that run down the back or front of a garment. It is also used for bags, pillows and more.
Place the zipper in position on the garment and mark the fabric at the bottom of the zipper at the metal stopper. Next, machine baste the zipper opening closed using a long stitch length, sew a backstitch at your mark, and continue sewing down the seam with a regular stitch length. This will leave you with a sewn seam and a basted seam at just the zipper opening.
With the zipper basted in place, turn the fabric over to the right side. Then, starting at the top of the zipper and using a zipper foot, sew down one side of the zipper, turn and sew across the bottom of the zipper, and sew up the other side of the zipper. You can backstitch a few times across the bottom for added strength. Your final stitch lines should be about 1/4" from the basted seam.