Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How to have a placed object within a text box be centered vertically aligned with with text?

Contributor ,
Feb 01, 2023 Feb 01, 2023

Hi,

 

Could you please let me know how to make this yellow placed box (or any placed object) be vertically aligned with the center of the text in a text frame? Without the yellow box, the text is vertically centered in the text frame, but as soon as I paste the yellow box into the text frame, the text shifts to bottom aligment with the yellow box. I want to have the text remain vertically centered like when it was by itself.

Thanks for your help on this 🙂

 

1.jpg

TOPICS
How to
228
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 01, 2023 Feb 01, 2023

I created a text box, centered a word of type, and set the frame's vertical alignment to center.

 

I then created a little yellow box and anchored it to the front of the text, and then dragged it to a (smart guide) vertical centering with the text.

 

Result:

JamesGiffordNitroPress_1-1675279409105.png

 

Can you review how you created the elements and connected and positioned them? I suspect it's all in the Anchor Object settings, which might be Inline and pushing the text around. Possibly something incorrect in the Text Frame options as well?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 01, 2023 Feb 01, 2023

When you added the boxinto the line of text, it was, by default, aligned on the text baseline, same as your text; but now the height of the box is now the biggest "character" height, so ID centers the WHOLE line based on that, so what it's doing is correct. It would do the same thing if you changed/added one letter in that line and made it a much larger size.

Your Text Box Options > Baseline Options can change how this is calculated, but what you want is not possible without doing it a different way, like the suggestion from @James Gifford—NitroPress .

Screen Shot 2023-02-01 at 2.06.53 PM.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 01, 2023 Feb 01, 2023
LATEST

That's it. Pasting the box to the text line makes it Inline and causes all the offset you note.

 

Doing a manual anchor, as I suggested, uses "Custom [Anchor]" and allows them to align.

 

You can also go around three sides of the square and under Anchored Object, change the anchor method from Inline to Custom.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines