Automatically center text in a layer

RB
Posted By
Richard_Bugdal
Jan 28, 2004
Views
1775
Replies
7
Status
Closed
Is there a way to automatically center text or objects within a layer? For example…I have a 6" square image layer of red. Have second "text layer" with text typed in white…and want to center the text automatically within the 6" square.

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

SF
Scott_Falkner
Jan 28, 2004
You could create the text layer by dragging a text box, like in Illustrator, insead of just clicking. Set the alignment to cenred and Bob’s you uncle. You can copy the text and paste it into the new one.

To keep the existing layer, link the layers you want alligned in the layers paleete, switch to the move tool (V) and click the centre allignment icon in the options bar.
JM
John_Mensinger
Jan 28, 2004
OR…

With the text layer active, Select > Select All, (Ctrl+A), then Edit > Cut, (Ctrl+X), and Edit > Paste, (Ctrl+V).

OR…

Choose View > Rulers, (Ctrl+R), then drag guides, one horizontal and one vertical out and set them each halfway across the canvas so that they intersect at the center, (hold down Shift while you drag and the guides will snap to the ruler marks; release at 3" across and 3" down in this case). Choose the move tool and drag your layer…the center will snap to the guides’ intersection.
Y
YrbkMgr
Jan 28, 2004
want to center the text automatically within the 6" square.

Be on your text layer. Select|All, click on the move tool. Look at the options bar at the top.

Peace,
Tony
C
cyberseano
Feb 26, 2004
Select All method is ok if he wants to align the text with the ENTIRE document.

What he is asking is VERY simple.

1.) Select the layer that has the 6" red square.
2.) Click the LINK button next to the text layer you want to be centered with the 6" red square.
3.) Make sure you have the MOVE tool selected and then up top, click on "Align Horizontal Centers"
You’re DONE!!

NOTE: If you want, you can also click on "Align Vertical Centers"

Now you’re text layer is perfectly centered to the 6" red square layer.
Y
YrbkMgr
Feb 26, 2004
Select All method is ok if he wants to align the text with the ENTIRE document

If you do what I suggested, the Align Center button in the options bar will center the text relative to the selection: the entire image.

You do NOT need to link layers.
C
cyberseano
Feb 26, 2004
Yep, glad that was pointed out yet AGAIN…

I was answering the question he was asking in the first place.

He want’s to center align his text with the pixels within a layer. In this case a 6"x6" red square. We don’t know where he has this 6" red square located in relationship to the rest of the canvas.

If his whole .psd is 12"x12" and the 6"x6" red square is on it’s own layer and lets say it’s somewhat in the upper left corner, then he WILL HAVE TO LINK the text to the layer he want’s to center the text with. In this case it’s the 6"x6" worth of red, opaque pixels.

When you use the Alignment tools, it does NOT align things to the layer itself. Instead, it aligns things to the outer edges of the most opaque pixels within those layers.
Y
YrbkMgr
Feb 26, 2004
You do not have to link. All you need to do is to select the red square. If it fills the entire canvas, and there’s NO indication that it doesn’t, you Select|All. If it’s on it’s own layer, you Control Click the layer containing the red square.

Then you click on the move tool, and align the layer with the buttons at the top, or using Layer|Align to Selection|Center Horizontal/vertical.

You do not need to link any layers for alignment, based on what the original post says.

it aligns things to the outer edges of the most opaque pixels within those layers.

It will align to the selection. Try it.

That’s one really cool thing I do with photoshop everyday. The fact that the alignment can be relative to the selection means that you only need to select the area to which you are aligning, and then be on the layer to be aligned, and use the buttons on the toolbar.

Don’t get me wrong, your way works, and I don’t want to sound argumentative, even though my previous posts in this thread have been reasonably brief; I’m simply pointing out that you can align relative to selection quite easily in photoshop, without linking layers.

Peace,
Tony

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

Related Discussion Topics

Nice and short text about related topics in discussion sections