Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I change the background color of a cell like in

enter image description here

the colored cells become slightly indented and their line spacing is increased.

How can I change the cell background color while keeping the other cell layout elements fixed?

share|improve this question
Robinaut, I see you Accepted my answer. Thanks; I'm glad it was helpful. I notice that you did not vote for it however; are you aware that you can both vote for and Accept an answer? – Mr.Wizard Mar 10 '13 at 18:00
up vote 2 down vote accepted

If you use the Option Inspector and set CellFrameMargins to 0 you will get the closer spacing.
You could do this at the Style Sheet level to avoid repetition of effort.

I don't know if there is a cleaner or simpler way.

Mathematica graphics

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.