6 Replies Latest reply on May 20, 2010 12:15 AM by Amebr

    Why is the background color not applied in one case?

    disneeprincess Level 1

      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:

      RH table correct.gif

       

      Here is my problem table:

      RH table problems.gif

       

      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.

       

       

       

       

        • 1. Re: Why is the background color not applied in one case?
          disneeprincess Level 1

          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.

          • 2. Re: Why is the background color not applied in one case?
            Willam van Weelden Adobe Community Professional & MVP

            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.

            • 3. Re: Why is the background color not applied in one case?
              disneeprincess Level 1

              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

              • 4. Re: Why is the background color not applied in one case?
                Willam van Weelden Adobe Community Professional & MVP

                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.

                • 5. Re: Why is the background color not applied in one case?
                  disneeprincess Level 1

                  Ok. I just thought I should be able to apply the TableHeading style in RH and have it be same as the ones that were imported from Word with the style already applied.

                  Thanks,

                  Julie

                  • 6. Re: Why is the background color not applied in one case?
                    Amebr Level 4

                    It might be the background colour was applied in a different way in Word for this one table and thus the style coding did not get applied to the table cell in the same way as all the other tables during import. The style you are applying in RH will only be applied to the paragraph, not the table cell.

                     

                    To manually apply the background colour in the Design view, select the table row, then select Format > Borders and Shading > Shading, then specify the colour you need.

                     

                    Also you can set up a permanent* table definition with this code applied by setting up a .htmtable file. It's described on Peter Grainge's site (in fact, there are 3 methods, plus a separate page for RH8.)

                     

                    http://www.grainge.org/pages/authoring/tables/preformatted_tables.htm

                     

                    (*it may be wiped out when you upgrade RH and/or reinstall. I recommend a backup somewhere else so you can recover it if necessary.)