• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Contributor ,
Oct 01, 2023 Oct 01, 2023

Copy link to clipboard

Copied

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.

TOPICS
How to

Views

520

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 01, 2023 Oct 01, 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

...

Votes

Translate

Translate
Community Expert ,
Oct 01, 2023 Oct 01, 2023

Copy link to clipboard

Copied

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:

 

JamesGiffordNitroPress_1-1696187421731.png


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 01, 2023 Oct 01, 2023

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 01, 2023 Oct 01, 2023

Copy link to clipboard

Copied

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

RobertTkaczyk_0-1696190697711.png

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

 

RobertTkaczyk_0-1696192221014.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 01, 2023 Oct 01, 2023

Copy link to clipboard

Copied

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

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

paragraph frame.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

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:

 

Screen Shot 37.png

 

Copy>Paste in Place>Select All>Group

 

Screen Shot 39.png

 

 

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

 

Screen Shot 40.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

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...


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

I’m not seeing an alignment problem:

 

Screen Shot 1.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

With a zero border, as I noted. But if you're trying to combine border widths:

JamesGiffordNitroPress_0-1696268920343.png

1 pt frame, expanded to 3pt left and right, left with a zero cap and the right with a square cap. Both can be adjusted away, but it's one more step.

 

Not knocking the method you describe — it's quick and clever. But it only works seamlessly with a zero border and with grouping, at which point all of the limitations of implementing this seemingly simple graphic need get quite annoying. 🙂

 

Especially when this —

JamesGiffordNitroPress_0-1696269358797.png

— is just a few menu clicks away, and completely seamless and automatic for adjustment, scaling, reuse, duplication etc.


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

I’m aligning my stroke to the inside:

 

Screen Shot 6.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

Ah... overlooked that. One nit squashed. 🙂


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2023 Oct 02, 2023

Copy link to clipboard

Copied

LATEST

And here it is in action:

Video shows BatchMode - but this Rule is of course available in the free version - you just need to do one object at a time.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines