This course will be retired on January 6, 2020. We recommend "Adobe Illustrator for Web Design" for up-to-date content.
Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Start a free Basic trial
to watch this video
Moving, aligning and distributing objects.
Related Links
-
0:01
[Deep Dive]
-
0:03
[Creating an icon: Aligning Objects with Mat Helme]
-
0:06
Illustrator allows us to take two or more objects in the line
-
0:10
or distribute them with just a click of a button.
-
0:13
Let's take a look at the aligning functionality in illustrator
-
0:17
and center our icon in the middle of the canvass.
-
0:21
With our icons file open, let's lock up our layers and hide them.
-
0:25
Then create a new layer labeled objects.
-
0:32
Next, create four separate circles with the ellipse tool
-
0:36
and give them all different colors using the Swatch Panel.
-
0:40
You can easily duplicate them again
-
0:42
by holding the alt key and dragging each shape out.
-
1:13
With all of our circles randomly spread across the screen,
-
1:17
let's make sure we have our aligns panel open as well.
-
1:21
You can do this by going to window, align, or by using the shortcut key shift F7.
-
1:33
Now let's go ahead and hide our Layers panel and our Swatches panel
-
1:41
and just focus on the align panel for now.
-
1:44
By using command minus we'll zoom out of the artboard just a bit.
-
1:51
Let's go ahead and grab all of our objects
-
1:53
by using the shortcut key command A
-
1:56
and align all of these objects to the middle of the artboard.
-
2:00
When doing this, the first thing we want to do
-
2:02
is to make sure we're aligning to artboard
-
2:05
because we have several options when it comes to aligning.
-
2:09
In the align panel, in the top right drop down, select show options
-
2:15
and now we have this option at the bottom right, this is align to.
-
2:21
Now right now, by default it's on align to artboard and that's exactly what we want.
-
2:27
So again, with all of the objects selected and with align to artboard selected,
-
2:35
let's go ahead and align them horizontally to the center.
-
2:40
Now you can see they've kept the same vertical position
-
2:44
but their horizontal position has now aligned to the middle of the artboard.
-
2:50
Now if we want to align it to the left of the artboard,
-
2:53
we can select all of them from the align panel where it says horizontal align left,
-
3:00
we can select it and see all the objects aligned to the left
-
3:02
and the same goes for the right.
-
3:06
Now let's go ahead and spread our objects out again
-
3:09
randomly across the canvas,
-
3:13
select them all again by hitting command A,
-
3:17
and let's align them to the top of the artboard.
-
3:20
We can do that by the vertical align on top
-
3:23
and then to the bottom and to the middle--great.
-
3:28
Now if I want to align them to a specific object, I can do that as well.
-
3:36
Select them all and on the align to drop down, let's align them to a key object.
-
3:44
Right now, it's grabbing this purple circle.
-
3:50
So when we align to the vertical alignment center,
-
3:55
it's going to align all of these objects in the center of this one object
-
4:02
even though it's not aligned to the center of the artboard.
-
4:06
It's just aligning it to the single object.
-
4:13
Now again let's spread this back out.
-
4:20
Select them all on the align to drop down.
-
4:23
Let's align to key object
-
4:28
and select the dark green circle and next work says align to objects.
-
4:35
Let's select horizontal align center
-
4:37
and now you can see all of the circles are aligned to the dark green circle.
-
4:41
Now directly below align objects, we have distribute objects.
-
4:48
Distribute objects distributes the objects equally among the artboard
-
4:54
if the align to artboard is selected.
-
4:56
So by selecting all of the objects and then selecting vertical distribute
-
5:03
it then distributes from their centerpoint across the artboard equally.
-
5:13
And again, if we do a horizontal distribute,
-
5:16
it then distributes them across the artboard equally from their centerpoints.
-
5:22
Now if we want to distribute specific spacing between each object
-
5:29
and this comes in handy if you say laying out a user interface,
-
5:34
say for a menu and you want 40 pixels between each one of the buttons,
-
5:39
and instead of you know measuring it out from the ruler which you can do,
-
5:45
but here's a quicker way.
-
5:46
So select all of the objects, go to align to key object, and then
-
5:56
then let's plug in 40 pixels into the distribute spacing input area
-
6:02
and let's distribute this horizontally at 40 pixels.
-
6:08
Now you can't really tell because they're not all aligned.
-
6:10
So let's align them to the middle of the artboard
-
6:15
and now you can see there's 40 pixels between each object.
-
6:19
If we were to group all of these, they would be treated as one object.
-
6:25
So if wanted to center all of these circles as one group,
-
6:30
we can do that by selecting them all by hitting command A,
-
6:33
grouping them by selecting command G, make sure we're aligning to artboard,
-
6:40
and let's align to the center horizontally and vertically which we're already are.
-
6:47
That's how you align them all to the center. Now let's apply this to the icon.
-
6:56
Let's go ahead and delete our objects layer,
-
7:02
make our icon layer visible, and unlock it.
-
7:05
Select our icon and it's already group together as one object.
-
7:14
Make sure we're aligning to artboard
-
7:17
and let's center it inside of the artboard.
-
7:22
Perfect.
You need to sign up for Treehouse in order to download course files.
Sign up