Copy link to clipboard
Copied
just created a dynamic button with rounded corners the text inside the button though is not centered its noticeable and i can't seem to change where the text sits in the button
1 Correct answer
founded,
Whichever way you have seen it, you can do it in one of the following ways, in either/all cases keeping the live (editable) Type (maybe simpler/better/more errorproof); you can make fine adjustments by eye with the transform effect if needed (goes for any solution).
A: In an existing box:
1) Tick Use Preview Bounds in Edit>Preferences>General;
2) Select the live Type with the (normal) Selection Tool and Effect>Path>Outline Object.
That will give you a Bounding Box that fits tightly round the
...Explore related tutorials & articles
Copy link to clipboard
Copied
Exactly how dod you create it. And of course: please show.
Is it not centered vertically? THat can't ever happen. You will need to apply a transform effect to the box to shift it.
Copy link to clipboard
Copied
Hi Moniika i have followed the tutorial and applied in the fill and effect the effect is shape options- round rectangle this is how to create a button right? you can see the text is not allighned
Copy link to clipboard
Copied
Apply a transform effect to the box in the appearance panel to move it a little up. You don't need to "Use preview bound"
Copy link to clipboard
Copied
founded,
Whichever way you have seen it, you can do it in one of the following ways, in either/all cases keeping the live (editable) Type (maybe simpler/better/more errorproof); you can make fine adjustments by eye with the transform effect if needed (goes for any solution).
A: In an existing box:
1) Tick Use Preview Bounds in Edit>Preferences>General;
2) Select the live Type with the (normal) Selection Tool and Effect>Path>Outline Object.
That will give you a Bounding Box that fits tightly round the live Type, and will ensure centring (both directions) and keeps doing so when you edit.
But if you need it as non outlined text in PDF you will have to remove the effect:
3) With the live Type selected, in the Appearance palette click the Reduce to Basic Appearance button.
That will bring it back to normal plain Type.
Obviously, you will need to untick Use Preview Bounds for other purposes, but you can just tick that again when you need to edit (some of) the Type if needed to keep it in place; that may not be necessary because the changes will (mostly, and only if no letters exceed the hitherto vertical bounds) be in the horizontal direction.
B: In a custom made static or automatically adapting box:
1) With the normal Type Tool create the text as live Type; you may wish to choose Align Center in the Window>Paragraph palette (bundled with the Character palette where you set the font and size);
2) In the Window>Appearance palette flyout click Add New Fill, then drag that fill down below Characters in the main Appearance palette and click it to have it selected; it will be highlighted;
3) Set the desired background colour (white), you may use the Window>Color palette or something else;
4) Effect>Convert to Shape>Rectangle (or Rounded Rectangle), then either:
4a) Click Absolute and set a predetermined size, or:
4b) Click Relative and set the width and height to be added to the live Type; you may try different values in Preview to see how it works.
This will give you the text as live Type so you can edit it (you may add text, even more lines), and it will stay centred on the background. If you choose 4a), you must keep the text inside, adjusting the font size if needed; if you choose 4b), the background will adapt to the text.
Copy link to clipboard
Copied
thanks dude. this has driven me mad for the last hour its one hell of a work around crazy illustrator allows dynamic buttons but this method is the only way to produce them accurately!!!!!! very annoying. many thanks
Copy link to clipboard
Copied
You are welcome, founded.
As you may have guessed or (not) noticed, I mishit the Send button so post #3 went off unfinished so I had to amend it by adding the second option (set) which may be preferable in terms of flexibiliy and simplicity.
The fine adjustments by eye may be relevant in some cases in much the same way as overshooting (also sideways as in the letters ID).
Overshoot (typography) - Wikipedia
By the way, I believe that the explanation part should be corrected: it compensates for inaccuracies in human visual perception>it compensates for accuracies in human visual perception: what looks right is right.
Copy link to clipboard
Copied
I found a simpler way: once you created the dynamic button, just select the bottom fill (that is used for rectangle) and add from the smae panel, an effect: Distort & Transform -> Transform, and here, in the "Move" section, give a vertical value that you like to center the box to the text. That's it!
Copy link to clipboard
Copied

