Turn snapping on or off
Snapping is an effect where an object is attracted to a guide, grid, or another anchor point, similar to a small gravitational field that tugs at anchor points in objects as you drag them around your page. If guide snapping is selected, when you drag an object near a guide, each anchor point in that object moves to align itself with the guide. Snapping is a great way to align one or more objects on your page.
To enable Snap to Grid
You have several ways to enable snapping.
On the View menu, click Snap to Grid (or press CTRL+SHIFT+').
If the page grid is not currently visible, choosing this command selects it.
To enable Snap to Points
To make anchor points on all visible objects snappable, on the View menu, click Snap to Points (or press CTRL+ALT+').
To enable Snap to Guides
To make ruler guides and object guides snappable, on the View menu, click Snap to Guides (or press CTRL+SHIFT+;).
To enable Snap to Pixels
On the View menu, click Snap to Pixels (or press CTRL+ALT+;).
When creating or moving shapes, the shapes will snap to a pixel grid at intervals that correspond to the current document resolution settings.
Snapping to pixels can be used together with Snap to Grids and Snap to Guides. The result is that the closest point is snapped to the nearest pixel grid around the grid line or guide line.
The snapping feature snaps only the anchor points of objects to gridlines, guides, or other anchor points. You can also snap the bounding box of paths to gridlines. However, in neither case can you snap the edges of objects (such as the outside edge of a stroke).
When snapping is enabled, you can disable it temporarily by holding down the S key on your keyboard when you drag an object.
When you drag paths or the anchor points of paths, different marks appear on-screen to show how the snapping is being performed. An "X" is displayed wherever a moving anchor point or bounding box handle is snapped to a grid corner, another anchor point, or a guide. Where it is snapped to a vertical gridline, a red vertical bar is displayed. When snapped to a horizontal gridline, a red horizontal bar is displayed.
Snapping is also effective when you draw out new paths with the drawing tools (with the exception of the Paintbrush tool, which ignores snapping). For example, if you select the Rectangle tool or the Pen tool, and then drag near a grid or guide line, the rectangle automatically snaps to that point.