Thanks for coming to, the world's #1 resource for all things InDesign!

The Truth About Cell Styles

Robert wrote:

“How can I get a table cell to do only what it is told to do? I select a whole row, I apply a cell style that creates a 2 pt stroke on the bottom of the cells. I then select the 5th of 10 columns and apply a cell style to create a vertical stroke on the right hand side of this column. The second applied style made a piece of the horizontal stroke disappear. When I re-apply the 1st cell style, my vertical stroke goes away. Is there away to configure my cell styles to ‘ignore’ the other 3 cell edges and only focus on what I’ve ‘asked’ it to do?”

The short answer is “sadly, no.” To do what’s described you’d have to make a third cell style that applies both the bottom and right strokes, and then use it to style the cells where rows and columns using your other cell styles intersect.

The other thing that would work is to select the row with the bottom stroke style and break the link to the style before applying the right stroke style.

That way, the bottom strokes are overrides, and can be ignored when you apply the new style. This method will probably give you the look you need in the least amount of time, but I hate unstyling stuff. It feels like it’s always going to come back to haunt me down the line.

So why doesn’t it work to just apply one cell style after the other? It comes down to the meaning of “ignore” in the context of cell styles. Every style is based on another style. Every cell style applies a combination of its own attributes and those it inherits from what it was based on (either [None] or another cell style).

So when you create a new cell style that seems to ignore certain attributes, they’ll actually be inherited from the style you’re basing on.

You could argue that the dialog box is a little deceptive. If you select the top and side strokes, it sure looks like they’re being ignored.

But look back at the previous screen shot. It clearly states that this cell style is [None] + a bottom stroke weight of 5 pts. There’s the rub. Manually applied formatting (aka local overrides) are what cell styles can ignore when you apply them. That’s why the Break Link to Style method works here.

So, I have no perfect solution to the dilemma posed in the question, but at least maybe it’s clearer now what’s going on when attributes are ignored in a cell style.

Mike Rankin

Mike Rankin

Editor in Chief of, InDesign Magazine, and Author of courses on InDesign and Illustrator. Husband. Dad. Dog walker.
Mike Rankin

Latest posts by Mike Rankin (see all)

  • - November 30, -0001
Related Articles

20 Comments on “The Truth About Cell Styles

  1. I found the following solution by coincidence and it works for me:

    In principle – When you have applied your vertical stroke – select your entire table and select all horizontal stokes in the proxy image – in your stroke style palette choose something different without releasing your mouse – then select the desired stroke style again and realease your mouse.

    In my tables it does the trick.

    Nina Storm

  2. Nope – sorry, my problem is slightly different.
    I have grey horizontal strokes across each entire row, and as seperators of colored colums 2 pt white strokes vertical. As I apply the vertical strokes (no matter if it is by style or manual) the grey horizontal are cut by the seperator stroke. This problem is solved using the method described above.

    But if I have horizontal strokes of different pt size, only a manual apply of the vertical strokes will respect these – and only appear in the seperator stroke after doing the trick described.

    I think this behaviour follows the true nature of cell styles as you described Mike :-)

    Nina Storm

  3. I’d love to see an in-depth discussion of InDesign’s table formatting philosophy, assuming there is one. I use both InDesign and FrameMaker, and the latter’s approach to table styling is so elegant that I don’t understand why Adobe didn’t use that model with InDesign. In brief:

    In FrameMaker, a table tag contains all the information needed to format an entire table with a single click: title and heading/footing positions and styles, horizontal and vertical rules, body text styles, etc. Text styling is drawn from existing paragraph tags. Rule positions and weights are determined by the table tag. So changing text styles within a cell/column/row doesn’t affect the rules. Ruling can, however, be overridden if desired.

    In InDesign, a table tag (as far as I can tell) only specifies borders (and maybe shading). To format the table, you have to create and apply a collection of table cell styles. But the cell styles are based on existing paragraph styles, so you have to create them first. Why the redundant styles? Rules are determined by cell styles, so changing a text style within a cell/row/column can hose up the rules. Why is this a good idea? Also, only one cell style can be applied per cell. If you need two or more, you’ve got to override the cell style with a paragraph style. And I could go on.

    Short version: InDesign’s table formatting seems a muddled mess to me. Is there a grand plan in place that I’m missing?

  4. I teach and use both FrameMaker (since 1992) and InDesign (since version 1). While InDesign’s table and cell styles are more trouble to set up, they are much more powerful in the long run BECAUSE of cell styles.
    Not to mention being able to import specific worksheets or named regions of an Excel file; or being able to link to either of those.

    • I have tried everything I can think of to fix this! I am using a table in an e-pub. I have a table imported from Excel. I unmerged all the cells so that I could more precisely control what is on each of the pages. I have no borders on the original spreadsheet.
      When I imported (placed) the spreadsheet, there are borders on every cell and I cannot get them to turn off! In preview mode they don’t appear but when I export to epub they show up. can you suggest anything?

  5. I’m posting this separate, because it is a tip…

    I was showing a class how to set up a custom cell style to add a double line above a cell to indicate the total (think back to the old elementary math days…). A student asked if there was a way to automatically add the word “Total” to the cell. After thinking for a moment, I created a new (based-on) paragraph style with a numbering scheme. In the numbering section of the paragraph style, I typed in “Total: ” and took out the incremental number code. I linked the paragraph style to the above mentioned cell style, and presto–when applied, the word Total was inserted automatically when a number was entered.

  6. >>In InDesign, a table tag (as far as I can tell) only specifies borders (and maybe shading).

    InDesign’s table style can format (in a single click) table borders, row borders, column borders, and row/column shading. In addition, the table style can automatically apply cell styles to the header, footer, body cells, the first column of the body cells, and the last column of the body cells.

    FrameMaker can do that too, but what if you want to add the header style on internal rows of the table? You need to use custom ruling and shading. In InDesign, you simply apply the header cell style to the row.

    InDesign’s cell styles do NOT have to affect cell strokes, but they can if you want to. The default is “ignore”, which is the same as “as is”.

  7. Maybe it’s because I’ve never been very savvy about spreadsheets (and rarely use them), but I find tables in InDesign to be very confusing and complicated. Many times I just give up and do everything in tabs and draw the boxes and rules by hand. I wish it was a lot more intuitive.

  8. Just to reiterate some of the previous comments, which are very helpful. Cell styles are a bit like Character Styles, in that the fewer variables you specify, the more broadly they can be used. When creating a Cell or Character Style, I only modify the attributes that are absolutely needed. The rest are left “empty”. What variables you don’t specify, as pointed out earlier, will leave the default Table/Paragraph Style attributes as they are. This seems a little counter intuitive, but this approach makes Cell and Character Styles a much more effective feature in InDesign.

  9. @Aaron: You can create one or more cell styles, then apply them in a new table style definition. Then select that table style while nothing is selected in your document. Now, each time you create a table, it’ll get that table style.

  10. I have set up table styles to give my tables a .5pt blue border line for the outer border (frame) and all rows and columns – I have set the cell styles within the table style. But when I apply the Table Style it only converts the outer border and the first and last column and row, the others are ignored and remain in the wrong format. In these instances it also does not always convert the bottom border of the table. This means I have to go back and apply cell styles to each cell. Is there a way around this? Seems very clumsy.

  11. @Julie: Maybe select all the cells in the table and click the Clear Overrides in Selection button at the bottom of the Table Styles panel? (That would remove any local formatting on top of the cell/table styles.)

  12. I have encountered an issue with tables that has defied my ability to figure out.
    I have table with alternating row colors ( ok no problem so far)
    And row strokes set at 1 pt ( same as the entire table border)
    In InDesign everything looks fine (preview,high quality display) . When the document is converted to a pdf with either the direct export to pdf-high resolution or the postscript distiller method , viewed at 100%, the row strokes extend a bit beyond the perimeter table border like little sticks-And not on each and every table either . I have 60 or so tables and have created table styles for each of the 4 main types. Driving me nuts. Any ideas?

  13. @Lauren: It’s hard to know what’s going on, but does the problem go away if you zoom in or out? It may just be a screen redraw problem in acrobat or preview, or whatever you’re viewing it in?

  14. Hi David
    No it doesn’t change with view levels-which I thought at first given cousin photoshops propensity to have things look weird at odd numbered magnification.

    I have looked at it in every way I could think and still see them (in the pdf)
    Could it have something to do with a table options settings as in what strokes go above or below other strokes?
    Or does the table border need to be thicker than the row strokes to hide the row stroke ends?

  15. Hi David
    I think I may have figured it out and this may help someone else encountering this.
    I zoomed in at 1200% in my ID document and could see the ‘row stroke’ sticking out beyond the vertical column strokes just a bit.
    I went into table properties>Table setup>Stroke drawing order and where it had been “Best Joins” before changed it to “Column strokes in front”
    I won’t be able to tell for sure until I produce a pdf of this but the little ‘stick’ disappeared from the ID document.
    We’ll see how that works. I really never noticed that setting before. Who knew? ID continues to surprise and stretch my learning curve every day.

  16. This may not be the best place to ask this question but I’m trying to find an answer and came across this post in a Google search. I’m working on a project for work that another firm put together for us and the file is mostly made up of timetables. Given the ability to style tables how you want by using InDesign’s Table tool, I expected the tables to be actual tables – instead, the designer created them by using a text box for all the content (and just tabbed every line so it looked like columns) and coloured boxes and lines in place of cell shading and strokes. When I first opened the file and started playing around with it, I thought that was absolutely crazy! Why would you not use the Table tool to create a table? Is there something I’m missing? I don’t have any real school or background in graphic design so I’m wondering if it’s a designer thing and I just don’t get it.. but I think it would be a lot easier to just use the Table tool and style your rows and strokes etc. If I could get another graphic artist’s opinion on this, it would be awesome, as it has been driving me crazy!

    • The forums (click Forums in the nav bar above) are usually better for new discussions like this. But the quick answer to your question is: There’s always more than one way to do something. But you’re right: if you need row and column strokes (or fills), however, then making a Table inside a text story is probably going to be far easier.

Leave a Reply

Your email address will not be published. Required fields are marked *