Skip to main content
Known Participant
May 11, 2010
Question

Why is the background color not applied in one case?

  • May 11, 2010
  • 6 replies
  • 1278 views

Hi,

I'm using RH 7 and WebHelp.

I apply a TableHeading style to the first row of my tables. The TableHeading style is supposed to fill the cells of the first row with a background color of blue, and the text is in white. It works fine except for one table. I think TableHeading style was not applied in the Word document when I imported this topic. I tried to apply the TableHeading style to the first row, and it says it is applied in the HTML. But, the background blue does not fill the cells.

Here is what I am trying to achieve:

Here is my problem table:

I can see in the HTML that the background color is not present in the code. Here is the code for the example that is correct:

<p class=TableHeading>Chapter</td>

<td style="border-left: none; border-right: solid #000000 1.0px; border-top: solid #000000 1.0px; border-bottom: solid #000000 1.0px;

          width: 279.4pt; padding: 0in 5.4pt 0in 5.4pt; background-color: #003399;"

bgcolor=#003399 width=279.4pt>

<p class=TableHeading>Description</td></tr>

<tr><td style="x-cell-content-align: top; border-left: solid #000000 1.0px; border-right: solid #000000 1.0px; border-top: none;

                   border-bottom: solid #000000 1.0px; width: 182.85pt; padding: 0in 5.4pt 0in 5.4pt;

                   padding-left: 0px; padding-top: 0px; padding-right: 0px;

                   padding-bottom: 0px;" valign=top width=182.9pt>

Here is the code for my problem table:

<p class=TableHeading>Activity</td>

<td style="border-left: none; border-right: solid #000000 1.0px; border-top: solid #000000 1.0px; border-bottom: solid #000000 1.0px;

          width: 168.0pt; padding: 0in 5.4pt 0in 5.4pt;" width=168pt>

<p class=TableHeading>Keyboard Shortcut</td></tr>

<tr style="x-cell-content-align: center;" valign=middle>

<td style="width: 374px; x-cell-content-align: top; border-left: solid #000000 1.0px; border-right: solid #000000 1.0px;

          border-top: none; border-bottom: solid #000000 1.0px; padding: 0in 5.4pt 0in 5.4pt;

          padding-left: 0px; padding-top: 0px; padding-right: 0px;

          padding-bottom: 0px;" valign=top width=374px>

Here is the code from the CSS:

}

p.TableHeading {
background-color: #003399;
punctuation-wrap: simple;
text-autospace: none;
font-size: 10.0pt;
font-weight: bold;
color: #ffffff;
font-family: Verdana, sans-serif;
margin-left: 3pt;
margin-right: 3.0pt;
line-height: 120%;
margin-top: 0pt;
margin-bottom: 0pt;
}
LI.p-TableHeading {
punctuation-wrap: simple;
text-autospace: none;
font-size: 10.0pt;
font-weight: bold;
color: #ffffff;
font-family: Verdana, sans-serif;
line-height: 120%;
}

Any suggestions?

Thanks,

Julie

I don't understand why the TableHeading style is not applying the background color for the one table. I'm guessing I could just add it to the code using the HTML editor. However, I wasn't sure if that was the best way to fix this problem or if I would create another problem.

This topic is closed to new replies. Start a new post to keep the conversation going.

6 replies

Willam van Weelden
Inspiring
May 11, 2010

Hi,

The background color in your problem table is applied to the paragraph and not to the table cell. The table cell uses a padding, so the background of the paragraph won't completely fill the table heading.

In the

element, behind padding: 0in 5.4pt 0in 5.4pt;, add background-color: #003399;. The tag now looks like this:


This won’t create another problem, but if you’ve linked the Word document, the changes in the topic will be overwritten when you update your topic. If you plan on updating this topic from Word, you better find a solution in word itself (table styles?).

Greet,

Willam

This e-mail is personal. For our full disclaimer, please visit www.centric.eu/disclaimer.

Known Participant
May 11, 2010

Hi Willam,

Thanks for your answer, and I will go ahead and add the background color to the problem table.

However, I am still puzzled as to why the background color is applied to the cells in the other tables and not the problem table. I'm not sure what I did to cause the problem - how I applied the TableHeading to the table cell in one case and not the other. Any ideas how I can avoid this problem?

I will not use the Word documents going forward and will only make changes with the RH editor.

Thanks again,

Julie

Willam van Weelden
Inspiring
May 11, 2010

Hi,

I don't know what went wrong in Word. I try to avoid Word if possible... I hope someone else can help you with Word.

Greet,

Willam

This e-mail is personal. For our full disclaimer, please visit www.centric.eu/disclaimer.

Known Participant
May 11, 2010

To clarify, here is my question:

I don't understand why the TableHeading style is not applying the background color for the one table. I'm guessing I could just add it to the code using the HTML editor. However, I wasn't sure if that was the best way to fix this problem or if I would create another problem.