Paragraph spacing background color

D

Drew

I'm using tables in my word document and one of the cells has a background
color. Inside that cell I'm using a style that has paragraph spacing before
and after the text. The problem is that when it creates this spacing, it's
always white. So I have these white bands above and below the text due to my
background color in that cell.

Is paragraph spacing useless on anything other than white or is there a way
to make this transluscent? or even make it the same as my background color?

Thanks!
 
S

Suzanne S. Barnhill

It would appear that you have applied the shading to the text rather than to
the cell. Try again, making sure that "Cell" rather than "Text" is selected
under "Apply to."

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
D

Drew

Nope... but good try :) I'm actually using styles to do this. And it's
simple to repro:

1. Create a new word doc
2. on the Insert tab, create a table with at least one cell
3. set the background of that cell to some color (e.g. beige)
4. Type some sample text in the box
5. Set the style of that text to "Title". this will create an underline, big
text, colored blue, with spacing beneath it.
6. Observe the white bar that appears below the text.
 
S

Suzanne S. Barnhill

This is an entirely different issue. The Title style has a border (not an
underline), and Spacing Above/Below on bordered styles is always outside the
border. Moreover, in Word 2003 this affects Spacing Above even when there is
only a bottom border.

I do consider this a bug, but, as a workaround, instead of a border for the
style, you could either use an underline or apply a border to the cell.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
D

Drew

I can actually make the problem go away if I edit the style, edit the
paragraph options, and reduce the spacing before/after to 0. This is the same
for other styles that don't have borders (e.g. emphasis). So I don't think it
has anything to do with the border itself, but maybe it's an indirect factor?
i haven't figured it out yet, but the Spacing setting definitely manipulates
the symptoms.
 
D

Drew

actually, i stand corrected. it doesn't happen with emphasis, i just tried it
again. It must have been a carry over from the last style applied when i
tested this last time. So i tried it with another style, normal, and the
paragraph spacing didn't affect it.... i'm stumped.
 
D

Drew

ok, i see now :) I was able to edit the Title style, use the spacing (which
initially gave me the spacing) and then removed the border (which made the
spacing go away).

So I agree with you. this is a bug. Even if it was outside the border, and I
would expect it to be, it shouldn't color it white.
 
S

Suzanne S. Barnhill

The border is the entire cause of the issue. Remove the border, and you can
add Space Before/After to your heart's content.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
L

Lene Fredborg

In the article “Table cell shading – white space – troubleshooting†found at
http://www.thedoctools.com/index.php?show=wt_cell_shading, I have described
different types of settings that result in white space in table cells. The
border problem is not among the ones I have described (I think I should add
it to the article) – I don’t think I have tried using a bordered style in a
table so I have not seen the problem until I read this thread.

I made some testing and found the results described below (same result in
Word 2003 and 2007). I also consider the white spacing a bug. As the
description below shows, not only the combination of space before/after and
paragraph border(s) matters – the number of lines and/or paragraphs may also
affect the result (I have not tested and described all possible
combinations). As you said, Suzanne, the solution to this problem is to
remove the border(s).


My test results:
In a table cell with cell (or table) shading, if you apply a style with
space before and after + border(s) to text as specified below, white space
will appear as follows:

Ex. 1A. Style with border below, paragraph with 1 line of text:
Space before appears as white space.
Space after appears as white space.

Ex. 1B. Style with border below, paragraph with 2 or more lines of text or
more than 1 paragraph:
Space before is shaded correctly.
Space after appears as white space.

Ex. 2A. Style with border above, paragraph with 1 line of text:
Space before appears as white space.
Space after appears as white space.

Ex. 2B. Style with border above, paragraph with 2 or more lines of text or
more than 1 paragraph:
Space before appears as white space.
Space after is shaded correctly.

Ex. 3. Style with border above and below, paragraph with 1 or more lines of
text:
Space before appears as white space.
Space after appears as white space.

Ex 4A: Style with left border, paragraph with 1 or more _lines_ of text:
Space before is shaded correctly.
Space after is shaded correctly.

Ex 4B: Style with left border, 2 or more _paragraphs_:
Space before is shaded correctly.
Space after appears as white space

Ex 5A: Style with right border, paragraph with 1 line of text:
Space before appears as white space
Space after appears as white space

--
Regards
Lene Fredborg - Microsoft MVP (Word)
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 
S

Suzanne S. Barnhill

Thanks for the additional testing, Lene. I'd forgotten about your exhaustive
article about white space, but this will certainly be a good addition to it.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top