4 Replies Latest reply on Mar 4, 2009 7:58 AM by Kathy@P&G

    Style question...

    Kathy@P&G
      Hi, all,

      I am still relatively new to RH. I have Word docs with a fairly clean template of styles (used previously with Doc-to-Help); I used the Word doc to generate RH for HTML.

      I found that in addition to the styles in the generated CSS files (<filename>_ns.css and <filename>.css), there are styles in the Head area of the generated HTML page. For example:
      <style type="text/css">
      <!--
      div.whs1 { border:none; border-top:solid #003399 3.0pt; padding:1.0pt 0in 0in 0in; }
      td.whs2 { border-left:none; border-right:none; border-top:none; border-bottom:none; width:276.0pt; padding:0in 5.4pt 0in 5.4pt; }
      td.whs3 { border-left:none; border-right:none; border-top:none; border-bottom:none; width:274.8pt; padding:0in 5.4pt 0in 5.4pt; }
      etc.

      From what I can tell, these additional styles add borders and table cell background colors.

      If I add the specifics from these styles to the CSS file, will that work so that RH doesn't generate these styles on the fly? The TD info isn't the issue (although it is used throughout the doc; this is the shading for the Note and Tip callouts); the DIV is adding styling that I don't want...and I don't want to have to manually update every page with a level 2 heading (which is what this DIV is related to!).

      Any suggestions?

      Thanks in advance!

      Kathy
        • 1. Re: Style question...
          MergeThis Level 4
          You're misinterpreting this code in the output as something you can control.

          This is the display code that RH adds to the source topic based on the cascading styles being applied to the project source files (external CSS, overriden by topic styles, overriden by inline formatting) in addition to other stuff like TOC entries, references to the start page, etc. (in other words, all the project settings).

          Do not be concerned.


          Good luck,
          Leon
          • 2. Re: Style question...
            Kathy@P&G Level 1
            quote:

            You're misinterpreting this code in the output as something you can control.


            Leon, does this mean that I cannot control this? For example, in the Printed doc I want a border on Heading 2; in the HTML Help, I do *not* want a border. How can I make sure RH does not add this "display code"?

            Thanks,

            Kathy
            • 3. Re: Style question...
              Ben Minson Level 2
              Kathy,

              In experimenting with importing Word documents into RH8 (you haven't said which version of RH you're using), I did find that any time I imported a Word document with styles that included borders, RH turned that into a div.

              Are you working on an ongoing project where you need both HTML Help and printed output? If so, I suggest you author in RH and then output to the Printed Documentation single source layout. That way, you can specify heading styles without borders in your CSS, and then when you output to Word, you could map to Word styles that do have borders. RH8 has improved style mapping functionality, but you may be able to make it work the way you want if you're using an earlier version.

              --Ben
              • 4. Re: Style question...
                Kathy@P&G Level 1
                Thanks, Ben -- I was still thinking in Doc-to-Help terms of using the Word doc as the single source. Your way makes much more sense...