Skip to main content
ori manor
Inspiring
July 3, 2023
Answered

How to create cell style just for fills?

  • July 3, 2023
  • 1 reply
  • 353 views

Hi

I have a table where some of the cells have borders and some not. I want to create a cell style for the color, but it also affecting the borders. So, cells that had no borders now get borders, and it's not what I want.

 

I want to create a cell style that will only affect the fill of the cell, but will retain it's existing border settings.

Is it possible?

 

Thanks

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

Try this: with no table or cell selected, select the None cell style and clear any overrides that might be appled to it. (clear any + flag, that is).

 

Create a new style from None and name it appropriately (Hot Pink Fill, etc.)

 

Then in that style, under Fills and Strokes, all the fields should be blank, which usually means "don't change" or (in CSS terms) "inherit what's there." Set your fill color there but don't touch any other field. Save.

 

That should apply the fill without changing any other characteristic — strokes, spacing, etc.

1 reply

James Gifford—NitroPress
Legend
July 3, 2023

Try this: with no table or cell selected, select the None cell style and clear any overrides that might be appled to it. (clear any + flag, that is).

 

Create a new style from None and name it appropriately (Hot Pink Fill, etc.)

 

Then in that style, under Fills and Strokes, all the fields should be blank, which usually means "don't change" or (in CSS terms) "inherit what's there." Set your fill color there but don't touch any other field. Save.

 

That should apply the fill without changing any other characteristic — strokes, spacing, etc.

ori manor
ori manorAuthor
Inspiring
July 3, 2023

You are a genius!

Thanks, it worked like magic.

James Gifford—NitroPress
Legend
July 3, 2023

Not sure about genius, not on a pre-holiday Monday anyway, but it's basic to how InDesign manages defaults. To set a default, you make a change (font size, color, stroke, etc.) with no object selected, and that is then the default for all operations until you change it again. (That is, if you set a red 1pt stroke with no object on the layout selected, everything afterward will get that red stroke.)

 

The opposite of that is the blank fields in any style setting. Amost none have a "clear" or "inherit" or "blank" setting, so you have to start with a carefully cleared style and set only the aspects you want to change. If you touch a field, it will set to something in the list and can't be cleared again without starting over.

 

Glad it worked — in some cases this approach doesn't.