Thanks to the image provided in the last comment (as of today) in the question, I better understand the need.
Your frame is a text frame. I was misled by the initial screenshot, thinking the frame contained an image, which effectively creates two nested frames.
You have two options.
#Playing with paragraph style properties
Text inside a frame is formatted by Frame Contents paragraph style unless you forced another paragraph style. Caption is formatted by Text which is another paragraph style. There is therefore no interference between the entities.
Customise Frame Contents with a right-click on its name (in the side stylepane) and Modify
.
In the Borders
tab, create the border with Properties Merge with next paragraph (which groups all consecutive identically styled paragraphs as a whole border-wise) and use Padding to set the distance between text and border.
The other parameters of the paragraph style, notably Indents & Spacing
allow you to position the paragraph between the margins and consequently the border.
Of course, remove the border around the frame.
#Creating a nested frame
In case your text is formatted according to several paragraph styles, it is nearly impossible to get a unified border around all paragraph. In this case, proceed differently.
- Create the frame and add the caption. Eventually, delete the empty paragraph before the caption.
- Add a frame anchored to the caption.
- Enter your text inside the inner frame.
- Adjust dimensions and properties of both frames until you’re satisfied.
- Add a border only to the inner frame.
This procedure is less user-friendly than the first one and requires more manual adjustment unless you decide for fixed frame dimensions (at least width) which can be stored into a frame style.
Tip: frame styles are not as “reactive” as the other styles. To see the effect of a change, you need sometimes (but not always) to assign another style to the frame and reassign the original style.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.