# How to center a graphic inside a framed cell without using another cell

Below is a gif of the situation I am having.

First, notice I am working inside a framed cell. Within this cell I placed two graphics. The first (on top) is left aligned. The second, is centered. However, using the center justification in the formatting tools does not work. So I created another cell within the framed cell and then centered inside that cell.

There are a couple problems with this method. First, the cell becomes highlighted whenever I rotate the graphic. This is an eye sore. Second, because this is a cell it takes on the characteristics of inline cells, which I don't always want depending on what I am centering.

I'd like to center the object without creating a cell inside the framed cell. Can you think of an easy way to do this? I'd like to avoid creating a separate style in the stylesheets because I don't always know ahead of time whether the cell will have a centered item.

Ideas?

• Look at Pane. It supports explicit sizing and centering. Also you can turn off that background highlighting for cells or styles. – b3m2a1 Aug 30 '17 at 6:42
• I see. The cell was created using the "Frame" button in the Writing Assistant Palette. It's just a cell property. – Michael McCain Aug 30 '17 at 6:43
• Yeah I know how that goes. One thing you can do is to set Background -> None for the style "InlineCellEditing". That'll hide the background for you for all inline cells in the notebook. I think it's possible on a cell-by-cell basis though. Let me look into that. – b3m2a1 Aug 30 '17 at 6:47
• I'm now not sure if it's possible on a cell-by-cell basis. You can change inline cell styles, but the editing style may always be the same. – b3m2a1 Aug 30 '17 at 6:54
• I didn't give a thorough look at it, so I would also give a look at what you can do by playing with those sorts of styles. Look at FrontEndExecute@FrontEndFindFileOnPath["Core.nb", "StyleSheetPath"]` and see what you can dredge up. You can hopefully change the inline editing style for a specific inline cell style and so you could embed a cell of a different style. Alternatively make that cell deployed. You can still rotate the graphic but can't enter it, so the editing thing shouldn't show up. – b3m2a1 Aug 30 '17 at 7:03