4 Replies Latest reply on Feb 17, 2009 1:34 PM by Tech Writer KC

    two questions about Style sheets

    Tech Writer KC Level 1
      Using RH7, two questions regarding styles:

      1. I have an older project that seems to be acting weird. I want to update the styles by importing our current one, but it doesn't seem to accept it. I can import the file fine, but it doesn't seem to "take" the formatting (e.g. headers, "Normal" text, etc.).

      It imports without any errors, and in the Topic List the new style sheet shows as the associated style for this topic, yet I can't find any way of it to apply the new formats. I even tried closing and reopening RH to see if it was some sort of refresh issue.

      Any thoughts? Is this a corruption issue?

      2. It appears that some of the previous writers allowed RH to create new style sheets for each topic as it was imported into our Help system (from original Word documents).

      Is there any easy way of globally removing these style sheets and replacing them with the new one? My instinct is to:

      1. Import the new style.
      2. Select all the topics in the Topic List, right-click to open Properties, and select to apply the new style.
      3. Use Project Manager tab to delete all the other styles.

      Seems easy enough, but my concern is whether RH will apply these changes to the topics. In addition to my issue in #1, I've occasionally encountered issues where RH doesn't seem to accurately apply styles or style changes.

      Thanks,
        • 1. Re: two questions about Style sheets
          RoboColum(n) Level 5
          Regarding the spurious style sheets from the imported word documents, you are spot on on how to get rid of them. Applying another style sheet should reapply the styles accordingly.

          As far as the older project and the styles not sticking, I wonder whether the <link rel="StyleSheet" href="..\stylesheet.css"> tag in the truecode is referencing the correct style sheet.
          • 2. Re: two questions about Style sheets
            Tech Writer KC Level 1
            I checked the HTML and it's pointing to the right style-sheet.
            • 3. Re: two questions about Style sheets
              RoboWizard Level 4
              Hi all

              Note that Styles and Style sheets have an order of precedence or hierarchy.

              You may have all the styles declared in an externally referenced style sheet and all is well and good. But if the document has embedded styles using the same names, those will take preference.

              For example, perhaps your CSS file says all Heading 1 text will render in Dark Blue at 24 point Arial font. The topic could have an embedded Heading 1 declaration that specifies the text should be Maroon at 12 point Verdana. Even though the topic is correctly referencing the external CSS file, the text will render in Maroon because the embedded style rule will override the CSS rule.

              And what will override all of it is if someone selected the text and applied styling directly. In that case you are dealing with an In-Line style.

              One way to help determine if you are dealing with an embedded style is to simply remove any link to the CSS file? Does the text still look the same? If so, you likely are dealing with an embedded or in-line style.

              To check for an embedded style, look at your HTML code for the topic. Look up in the Head area for a <style> tag.

              If you find it, you have likely found the issue. Delete everything from <style> to </style> (including the tags).

              Cheers... Rick
              • 4. two questions about Style sheets
                Tech Writer KC Level 1
                Rick,

                That appears to have been the case (embedded styles in the HTML). I deleted the style tags and the correct formatting appears to work now.

                Thanks!