- [Voiceover] In this movie, I'll show you how to
align and distribute selected objects according to
the relative position of those objects,
as well as to the absolute position of a key object.
And this is the kind of thing you're going to find yourself
doing all the time inside Illustrator.
The thing is it works a lot differently here
then it does inside other programs.
So, obviously I need to align these squares
that are at the top, and the bottom,
as well as the sides of the art board.
But, because the art board is now a larger size
I can't align to the art board,
I need to align with respect to squares themselves.
And so I'm just going to partially marque these four squares
over here on the right hand side in order to select them.
And then because I want to adjust their vertical locations,
I'll go ahead and click on vertical distribute center.
Problem is that goes ahead and upsets the balance of things,
and that's because I still have
align to art board turned on.
To get the results I'm looking for
I need to switch to align to selection.
After which point I'll go ahead and press control Z,
or command Z on the Mac in order to undo that mistake,
and then I'll go ahead and click on
vertical distribute center once again.
Or really I can click on any of the vertical distribute
options because after all my squares are all the same size,
in order to distribute them as we're seeing here.
Now what I want to do is align these
objects into a perfect column,
and you can do that using one of the
horizontal alignment options.
But, notice if I click horizontal align right,
I'm going to mess things up because that's going to move
all the squares so that they're aligned with
the right most square, which is this guy here.
That's not what I want so I'll press control Z,
or command Z on the Mac to undo that change.
If I were to click horizontal align center,
that's going to average the horizontal position
of all those squares, also a mistake of course.
So, I'll undo that one.
And finally because these two guys right here,
the ones that are in the proper location
are to the left of the other two squares,
all I need to do is click on horizontal align left
in order to move all the squares into the proper position.
All right, now I'll go ahead partially marque
the bottom most squares here.
And this time because I want to distribute them horizontally
I'll move over to this option horizontal distribute center,
or really any of the horizontal distribute options
are going to do in my case.
And now because I want to align these guys that are lower
to the ones that are in the proper locations
which are in the highest positions,
I can go ahead and click on vertical align top
in order to move all the squares into the proper alignment.
Next I'll partially marque the left hand squares,
and I'll go ahead and click vertical distribute center,
or what have you.
And, because these two guys the ones that are in the
right position are to the right of the ones that are in
the wrong position I'll go ahead and click
horizontal align right to move
everything where it needs to be.
So, we've been lucky so far but this approach is
not going to work for the top squares,
and that's because we have one square that's
lower than the ones that are in the proper position,
as well as one that's higher.
All right so I'll start by clicking
horizontal distribute center to
distribute the width of the squares.
And then notice if I click vertical align top,
I end up moving the shapes upward
to the wrong location so I'll undo that.
If I click vertical align bottom that moves everybody down
into the wrong location and if I undo that,
and then click vertical align center you can see that
averages the positions of all four of the squares,
which again is not going to produce the right effect.
And so instead what you need to do is
establish one of the squares as a fixed key object.
And so to do that I'll go ahead and undo once again,
and all you need to do is click on the key object.
So any time you click on a selected object
with a black arrow tool you're going to give it
a heavy outline as we're seeing right there.
So all that is, by the way, is a click.
You don't have to shift click,
or double click, or anything like that.
Just click on any selected object
and it'll get a heavy frame.
Now what that means is that object is
going to be the fixed key object,
and everybody else is going to move into alignment with it.
I certainly don't want it to be this guy
so I'll click on this square instead.
And what I want you to notice if I click again
on this key object right here, then it turns off.
So clicking on a selected object makes it a key object,
clicking on it again turns that key feature off.
I also want you to notice the appearance of this
icon right here notice when it's set to align to selection
it appears as a dotted boundary
with four tiny arrowheads inside of it.
Whereas if I click on this square
in order to change it to a key object,
the icon changes to a key and when I hover over it
it says align to key object.
And now I can click on any one of these
vertical alignment icons it doesn't matter which,
in order to make all of the squares
move into alignment with that key object.
Now, this is a really powerful feature,
but it can be a little bit bewildering as well,
because there will be times where you just
have a bunch of things selected and then
you'll just accidentally click on something
and all of a sudden it lights up.
And, in my case I'm lighting up all four
of the central squares because they're grouped together.
But, if that ever happens to you just know you can
get rid of that function as well as the heavy outline
just by clicking on it once again.
And of course if you have a key object at work
and then you deselect your artwork,
then that key object function is going to go away.
And that is how you both align and distribute
selected objects according to the relative position of
those objects as well as the absolute position
of a key object here inside Illustrator.