Skip to main content
Inspiring
October 1, 2023
Answered

How to apply color to only 2 edges of a graphic box

  • October 1, 2023
  • 5 replies
  • 1240 views

I have a rectalinear graphic box filled with light grey.

How do I change the right and left edges of the box from no color to black?

 

Thanks in advance.

This topic has been closed for replies.
Correct answer James Gifford—NitroPress

There's not any simple way, unfortunately.

 

If you can apply the box to a paragraph, you can use Paragraph Border to get pretty fancy with the borders and fill.

 

If you want to use one Table Cell, you also have quite a bit of control over the appearance.

 

But a plain text or graphics frame... it's pretty much one border all the way around. A bit of a hack is to superimpose two frames, one with no border or thin borders, one with thick borders, and position and size the first over the other to mask out the top and bottom frames:

 

5 replies

rob day
Community Expert
Community Expert
October 2, 2023

Hi @Michael J B , If you Direct Select (white selection tool) the side of a frame, you can Copy, then Paste in Place to effectively clone the frame’s edges (see @Scott Falkner ’s reply). Give the clones a stroke, and Group the clones and frame:

 

 

Copy>Paste in Place>Select All>Group

 

 

 

Now using the Selection tool the frame can be resized and the side strokes will travel with the frame:

 

James Gifford—NitroPress
Legend
October 2, 2023

This is a great shortcut (and for a moment I was wondering how I'd ever forgot/overlooked it!)... but:

  • It is just a quick way to lay a separate stroke in place, which will be a separate element until grouped or such. That is, it's not actually modifying the source frame itself.
  • The stroke length will not match the other sides (either zero length change, or if  squared ends is chosen, not matching the adjacent sides), and thus require manual (preferably numerical) adjustment. That is, it only works seamlessly if the adjacent sides are zero-width, as in the example.

 

If the user wants to use the stroke-overlay method, though, this does cut a couple of fussy first steps.

 

I for one find it odd that ID has no facility for adjusting the borders independently on the (common and simple) frames, but has elaborate controls for Paragraph Borders and Cell Borders. There can't be that much structural/code difference between them...

rob day
Community Expert
Community Expert
October 2, 2023

I’m not seeing an alignment problem:

 

Willi Adelberger
Community Expert
Community Expert
October 1, 2023

You can use a paragraph style where you can define text frames. Each side can come with different stroke settings and corners like round corners. 

Willi Adelberger
Community Expert
Community Expert
October 2, 2023

Look here a paragraph frame with a single command. It is very simple to afford:

rob day
Community Expert
Community Expert
October 2, 2023

Hi @Willi Adelberger , I don’t think @Michael J B is using a text frame, so a Paragraph Border might not work.

 

The creation of a grouped frame could be scripted. I can post an example if anyone is interested.

Robert at ID-Tasker
Legend
October 1, 2023

Something like this - easy: OK, looks like it's not exactly what you are looking for... but maybe will help others:

No single cell Tables, no anchoring, embedding, grouping, etc. - all naturell.

 

 

Scott Falkner
Community Expert
Community Expert
October 1, 2023

Can you show what you mean? It sounds like you want a stroke on only the left and right sides of a rectangle. That is not possible. You would need to add two strokes and group them with the frame. You can usea one-cell table, which can have independent strokes set for the sides.

James Gifford—NitroPress
Legend
October 1, 2023

There's not any simple way, unfortunately.

 

If you can apply the box to a paragraph, you can use Paragraph Border to get pretty fancy with the borders and fill.

 

If you want to use one Table Cell, you also have quite a bit of control over the appearance.

 

But a plain text or graphics frame... it's pretty much one border all the way around. A bit of a hack is to superimpose two frames, one with no border or thin borders, one with thick borders, and position and size the first over the other to mask out the top and bottom frames: