Every professional design application lets you set guides to help you align objects in your document. Alignment is one of the design principles that make any design just feel right. It brings cohesiveness into the layout. In Illustrator, there are two basic ways to use guides in your documents:
- Create an ad-hoc guide when you need to align several objects to a certain plane.
- Pull several guides out to create a layout grid.
By default, guides are “magnetic.” Dragging an object will cause it to snap to a guide once it gets within a certain pixel distance (4.1). This ensures that your objects will line up exactly as you want them. Alternatively, dragging a guide to a selected object will snap the guide to that object.
4.1. The drag cursor changes to white when an object has snapped to a guide.
Guides will be helpful in the mockup for aligning graphic elements. You’ll explore Illustrator’s guides by first creating a new document for the mockup:
- Choose File > New. In the dialog box, choose the Web profile.
- Select 1024 x 768 as the artboard size and click OK to create the document.
This size represents the target display resolution you’ll use for this mockup.
Now that you have a document open, it’s time to create some guides. In order to create guides, you’ll need to make sure your rulers are visible. If they aren’t showing at the top and left side of the document window, choose View > Rulers > Show Rulers (R/Ctrl+R).
- Click and drag a guide from the ruler onto the artboard.
If you didn’t get the guide in just the right spot, undo the guide placement by doing one of the following:
- Press Z/Ctrl+Z to undo the guide placement and try again.
- Move the guide into place by selecting it and dragging until you have it positioned correctly. If you are unable to move the guide, it may be locked. Choose View > Guides > Lock Guides (;[semicolon]/Ctrl+Alt+; [semi-colon]) to unlock the guides. Selecting this menu option toggles the lock state on or off.
- To remove a guide, simply select it and press Delete (make sure the guide is unlocked).
- If you no longer need any guides in your document, or need to start over, remove them all at once by choosing View > Guides > Clear Guides.
Making Guides from Objects
Another awesome feature is the ability to make any vector object on the artboard into a guide. This is really helpful if you need to align objects at strange angles. This feature has a practical use:
- Click and drag with the Line tool (\) and draw a line on the artboard.
- Select the line and choose View > Guides > Make Guides (5/Ctrl+5).
You object is instantly turned into a guide, taking on all current attributes you have set for your guides (such as snapping behavior, visibility, lock state, and color). This is a great way to align objects already on your artboard to an angle without having to measure (4.2).
4.2. Snapping an object to a custom guide
You can also convert any guide—whether you pulled it from a ruler or created it from an object—into an object:
- Make sure that guides are unlocked (; [semicolon]/Ctrl+Alt+; [semi-colon]). You won’t be able to select them otherwise.
- Select the guide you want to convert and choose View Guides > Release Guides (5/Ctrl+Alt+5).
The guide is now an object, selected and ready for you to work with.
Using Alignment Tools
Besides allowing you to snap and align objects to guides, Illustrator also provides powerful alignment features accessible via the Align panel (Shift-F7). This panel (4.3) helps to align objects to an axis or position as well as distribute them across a distance. A few of the more commonly used alignment features can also be accessed in the Control panel when you have more than one object selected.
4.3. The Align panel
The buttons in the top row of the Align panel align objects by their edges and centers along the horizontal and vertical axes. The buttons provide a graphical representation of how Illustrator will align the selected objects.
The buttons in the bottom row of the panel distribute objects across a distance based on the axis or edge that the user has chosen. This is very different from aligning objects. Instead of lining them up along a single edge or center, Illustrator will equally space the objects from the edge or center you clicked.
You can make a couple of extra options (4.4) visible by choosing Show Options from the Align panel menu. The first of these options, Distribute Spacing, distributes objects across a distance by putting an equal amount of space (which can be user-specified) between them.
4.4. Align Panel extra options
The second button houses the Align To options. These options allow you to choose how objects will align in the following ways:
- To the selection (the default behavior): The selection in this option represents the area in which all selected objects are contained. For example, if you have four rectangles and you want to align all of their left edges, clicking the align left button would move all but the leftmost rectangle.
- To the artboard: This option aligns objects to centers or edges of the artboard itself. This alignment method is best used when you want to center a single object or a selection of objects on the artboard.
- To a key object: This option allows you to select an object to which all other objects in the selection will align. This method is best used when the object you want to align to needs to stay in place.
To designate an object in your selection as the key object, perform the following steps:
- Select all objects (including the one that will be the key object) you want to align either by dragging a selection box around them or by Shift-clicking each object.
- Set the key object for the selection by clicking it.
The key object is always indicated by a bold selection outline (4.5).
4.5. The key object is indicated by a bold selection outline.