2 Replies Latest reply on Sep 13, 2011 6:47 AM by peter minneapolis

    How to center 1-2 characters in a small text box?

    Moxie Cat

      I have a text box that is .4 cm high by .3 cm wide. In the box is a number, either one or two digits, in 8 pt type. The text box has a black background, while the character text is white.

       

      I am trying to get the number to be centered in the box, both vertically and horizontally. But no matter what settings I try, there always seems to be too much space either under the number or on its right side. This is especially obvious, given the white-character-on-black-background appearance.

       

      In text frame options, I have the inset spacings all set to 0, vertical justification is "align-center," and first baseline is "cap height." The number itself has its paragraph set to "center." Text frame is set to "align-center" in the control palette.

       

      Is there another setting I am missing? I'm ready to just start tweaking by using baseline shift and similar. But I'm wondering if I'm missing a specific setting that should be used to perfectly center a character (or two) in a text box.

       

      All help appreciated. Thanks.

        • 1. Re: How to center 1-2 characters in a small text box?
          peter minneapolis Level 4

          Moxie Cat wrote:

           

          I have a text box that is .4 cm high by .3 cm wide. In the box is a number, either one or two digits, in 8 pt type. The text box has a black background, while the character text is white.

           

          I am trying to get the number to be centered in the box, both vertically and horizontally. But no matter what settings I try, there always seems to be too much space either under the number or on its right side. This is especially obvious, given the white-character-on-black-background appearance.

           

          In text frame options, I have the inset spacings all set to 0, vertical justification is "align-center," and first baseline is "cap height." The number itself has its paragraph set to "center." Text frame is set to "align-center" in the control palette.

           

          Is there another setting I am missing? I'm ready to just start tweaking by using baseline shift and similar. But I'm wondering if I'm missing a specific setting that should be used to perfectly center a character (or two) in a text box.

           

          All help appreciated. Thanks.

          Centering this way works for objects, but text often fails to look centered,because the full text height and width is part of the calculation. Perhaps including a narrow space character on the left, that's set above the baseline, or to a larger point size, or whose size is adjusted to greater width and height, will influence the calculation suitably.

           

          HTH

           

          Regards,

           

          Peter

          _______________________

          Peter Gold

          KnowHow ProServices

          • 2. Re: How to center 1-2 characters in a small text box?
            Peter Spier Most Valuable Participant (Moderator)

            I often find it's necessary to add a small amount of top inset to the frame for visually vertical centering text without descenders. The horizontal centering may be influenced by whehter the type is using proportional or tabular figures. I'd expect better results, I think, with proportional, but it would be worth checking.