Border around formatted text in Inkscape

I’m trying to create a block of text with formatting and I want to surround it with a border. I’ve tried the “Flow into frame” feature, but that removes formatting (I would like line breaks, spaces, bold, etc…).

Right now, I’m manually drawing a rectangle around it and aligning it (using the align and distribute functions). Is there a way to automate this and produce consistent results? My current technique does not guarantee even spacing from the border to text of multiple boxes like these.


Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Yes! Here is the end result:

end result

Step by step:

  1. Create some flowed text by using the text tool to first drag a rectangle and then type.


  1. Separately, create a rectangle roughly around the text (really, the rectangle can be anywhere)


  1. With the rectangle selected, chose “Path” > “Linked Offset”. Then grab the small diamond and drag it in to make a second, smaller rectangle.


  1. Select the text and the smaller rectangle and choose “Text” > “Flow into frame”. Then select the smaller rectangle and remove the stroke to make it invisible. Now the text will flow within the smaller (invisible) rectangle, which is dynamically linked to the shape of the larger (visible) rectangle.


  1. Then, if you like, you can add a small border radius on the visible rectangle and you get this nice looking result.

end result

  1. If you do need to modify the space between the text and the rectangle, you can carefully select it by grabbing it with the text and the subtracting the text from the selection, or you can drill down to it within the XML Editor. When you do get it selected, then you can adjust the margin as follows:


  1. Finally, group the text and the two rectangles, and you’re all set!

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x