is now part of CreativePro.com!

Clever Workaround for Round Corners Combined with Inset Spacing

17

A while ago I had a client who was automating his InDesign projects using an XML-based workflow. He was extremely happy with the speed and ease his text stories were flowing into InDesign. But after a while he realized he actually needed to give those stories a proper layout. And the design he had in mind seemed to give him problems.

This is what he was trying to achieve:

bvdw-wrong

So he created a separate text frame and coloured frame for every story. The frame has a background colour and rounded corners.

Of course he would have been a lot more productive if he’d combined the background frame with the text frame. But when he tried that option he needed to keep the text away from the edges so he used the inset spacing option (found under Object > Text Frame Options) to keep the text away from the edges. Unfortunately this didn’t give him the desired result. As you can see in the image, combining high value rounded corners with inset spacing doesn’t really work as planned:

bvdw-problem

So because of this he needed a different plan of action. So how do we solve something like this? What we need is a text frame with a background colour, rounded corners, proper inset spacing, and it needs to resize automatically depending on the length of the story.

An Alternative Method

Step1: create a regular text frame by using the Type tool.

bvdw-step1

Step2: fill it up with placeholder text.

PS: Are you tired of the regular lorem ipsum placeholder text? Why not try Gangsta ipsum, Bacon ipsum or Riker ipsum? I’ll choose Bacon ipsum this time.

Step3: give your text frame a fill colour by either using the Swatches or Color panel. Personally, I’m a Swatches panel guy.

bvdw-step3

Step4: give the object a thick stroke by using the Stroke panel, say 30pts. Then change the Join option to Round Join which will give you a rounded corner effect. Now align the stroke to the outside of the object which will expand the rounded join effect even more. This way the stroke effect is actually acting as both inset spacing and rounded corners.

bvdw-step4

Of course, you then want to give the stroke the same colour as the fill colour.

Step5: To give the text frame a variable height you can use the Auto-Size function (in CS6 and later). First select the text frame using the Selection tool and then choose Object > Text Frame Options. (Tip: you can get there faster by pressing Command/Ctrl-B, or by Option/ALT+double-clicking on the frame with the Selection tool!). Now click the Auto-Size tab and choose an option from the Auto-Sizing list. Here I’ll choose Height only and click the topmost icon in the options that become active. Now your text frame will have a variable height and will expand/contract automatically depending on the amount of text:

bvdw-done

And there you have it, just the way the client wanted it! Remember that you can now save these options as an Object Style in case you need future updates of this object.

Bart Van de Wiele is a LinkedIn Learning author and public speaker currently working as a Principal Solutions Consultant at Adobe. Visit his website at bartvdw.com.
  • Keith Gilbert says:

    Very sneaky Bart! Way to think outside the (rounded-corners) box.

  • Kelly Vaughn says:

    Nice trick! If you need a version of this that works with rounded corners just at the bottom, I came up with something similar using paragraph rules. https://documentgeek.blogspot.com/2010/05/hey-rounded-cornersquit-messing-with-my.html

  • Boris Rommer says:

    Kelly Vaughn,

    paragraph rules have no rounded corners, it requires other settings.

  • Furry says:

    Boris, they do if you use rules both above and below the text and set one of them to Japanese dots, then adjusting their offsets so they fall on top of each other.

    • Boris Rommer says:

      Furry,
      In Kelly’s example, I can not recognize Japanese dots…
      If we use dots, we need only one rule, but the colors for points and gaps must be the same.

      • Jeff Hentosz says:

        Guys, you can make a single round-ends rule by creating a new Stroke Style (Stroke panel flyout menu). Just make a custom dash with the “Length” and “Pattern Length” the same — doesn’t matter how long — and set caps to rounded. Note that you have to set the Pattern Length first, then the Length. The second one auto-readjusts the first one.

        Kelly may have left out a step?

  • Hi there, why not just use Corner Options on the text frame? Or doesn’t that work well with the XML stuff?

    • @Regula: In the second image in the article above, you can see that the rounded-corner rectangle (plus inset) causes the first line of text to be indented at the beginning and the end. It does not have anything to do with XML. It is just a problem with insets and rounded edges.

  • Adam says:

    Another quick fix:
    As long as your text box inset amount (ie. 0.5″) matches your rounded corner amount (ie. 0.5″)
    you shouldn’t have any problems with your first line of text getting indented either.

    • Frans van der Geest says:

      Exactly, that’s what I always use, at least the same off set as corner value, an old ‘trick’ to prevent problems

  • Bob Rubey says:

    Enough about the excellent workaround. Bart forgot a yummy Ipsum, Cupcake! https://cupcakeipsum.com/

  • Uwe laubender says:

    @Bart ? If you look closely at your last screen shot, you will notice that the decenders of the last line is cut! This is because the surrounding stroke of the text frame is obscuring the contents (text) if the text frame is minimized.
    A not so clever solution?

    Uwe

  • Fatos says:

    And, if you still need this box to have a stroke around it (different color than the background), make a new stroke style. I started from thin – thin style, made the inside “thin” 0%, and outside “thin” 3%, with the gap color same as background color of the text box.

  • Is there any way to edit the roundness of the corners?

    I see just one setting with no further specification for that.

  • Pedro says:

    Very Clever. Tks for the tip. Ir”s jist what i was looking for…

    Pedro

  • >