I'd like to highlight titles in my text like this:

enter image description here

I'm doing that by adding a blue rectangle behind the text, but every time I change the text which is 16 pages long I have to go and move the placement of all these title boxes. Can I add it so that its attached to that line of text?


3 Answers 3


Turns out you can do this (sort of) using appearance attributes. The caveat is the lines of text have to be their own text elements rather than a character selection.

How to make the boxes

  1. Open the appearance panel, Window > Appearance
  2. Double click Characters to access the character appearance
  3. Set the Fill to your foreground color
  4. Click Type to get back to the text element
  5. Add New Fill (bottom left hand corner of the the panel)
  6. Set the new fill to your background color
  7. With the new Fill selected, Add New Effect > Convert to Shape > Rectangle...
  8. Set the Rectangle to whatever you want, as long as size is relative it will reflow to your text.

You should have something like this,

Finshed Sample

It also works accross lines,

Two line Sample

Here's my appearance settings for the text elements. Note you may have to drag the Characters layer above the newly created Fill layer.

Appearance Panel Settings

Pro Tip(s)

  • You can save as a Graphic Style to apply it to any element and synchronise any changes you make to the style.
  • You can do other cool effects with this like capsules using different shapes (e.g. Rounded Rectangle)

Capsule Sample

  • 2
    Excellent first answer, Ben! Welcome to GD.SE!
    – Vicki
    Commented Dec 17, 2015 at 0:58
  • 2
    Thanks @Vicki! Figured I read enough Stack Exchange articles I should write some answers when I know them :)
    – Brynn
    Commented Dec 17, 2015 at 1:33
  • Hey all, I have a workaround to if you are having line-height issues when applying this effect. For me, there was a much larger portion of the rectangle showing on the bottom because by default it is aligning to lowercase letters (I was using uppercase). So, if you want to use uppercase and have it vertically aligned properly, go to your character panel and click the Small Caps button.
    – CU3ED
    Commented Jul 7, 2020 at 17:36
  • 1
    @Tom This should be selected as the correct answer. Commented Jul 24, 2020 at 17:00

As far as I know, this is impossible in Illustrator, since it's meant for vector-related work. Possible workaround would be doing it in inDesign, using styles. Chceck THIS link Good luck!

  • Probably sensible, I have absolutely no idea how to use indesign though.
    – Tom
    Commented Mar 15, 2015 at 17:18

I agree, I don't think this is possible in AI. Quite easy to do in InDesign, and you will be better off in the short- and long-term learning even the very basics of InDesign if you're working with multi-page documents. Using Illustrator is only going to cause you headaches (like the one you're posting about here). The time you spend learning a few simple thing in InDesign will be well worth it! And honestly, many of the tools/commands/functions in ID are very similar to AI. There are also many free tutorials all over the web that can get you up and running in very short time.

Good luck!

  • I wish you could have written an answer for inDesign that is what I am looking for!
    – lharby
    Commented Jun 19, 2018 at 17:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.