14 Replies Latest reply on Jan 10, 2012 11:29 AM by Willam van Weelden

    Style sheets in RoboHelp

    jdcyclone1
      Why does the default style sheet use so many references to Netscape? When you analyze the code, it is definitely made first and foremost for a Netscape browser. I'm hoping this gets updated in the future.

      I wish there was a way to reference multiple style sheets within a project. RoboHelp instead takes the 2nd style sheet you reference and makes it the css that is assigned to the entire project.

      We have been working on coming up with a way to use a CSS to add text to topics that will only appear when a user goes to print from their browser. It can easily be done with a little CSS action, but RoboHelp kicks and screams and won't have any part of it. If anyone has any great clues or hints let me know. Thanks!!

      That's my rant for today....Have a great weekend!!
        • 1. Re: Style sheets in RoboHelp
          Gravenstein Level 2
          You *can* have multiple style sheets in a project. Not for a single topic, though.

          G
          • 2. Re: Style sheets in RoboHelp
            jdcyclone1 Level 1
            Yea, let me specify. I should have said, I wish we had the ability to use multiple style sheets in one topic.
            • 3. Re: Style sheets in RoboHelp
              MergeThis Level 4
              Two separate issues:

              Netscape references
              Instead of "first and foremost" Netscape code, is the idea that the Netscape browser configuration "needs" more code settings than do the other browsers. Netscape, if you were unaware, has traditionally set itself apart from other browsers (perhaps a noble attitude on their part, but definitely a pain for developers and users over the last dozen years).

              Style Sheets
              From XHTML & HTML: The Definitive Guide, C. Musciano & B. Kennedy: "Neither Netscape Navigator nor Internet Explorer support multiple <link>ed style sheets as proposed by the CSS2 standard. Instead, they cascade all the <link>ed style sheets, with rules in later sheets overriding rules in earlier sheets." Further, "Netscape Navigator ignores...@media...but Internet Explorer honors the ...@media at-rules, for both document-level and external sheets."

              Seems like your rants might be better directed to the browser folks, instead of RH.

              You don't say what your output is, but if it's WebHelp, you might be able to accomplish your stated goal by doing some post-processing work on the output. You'd need a good tool such as FAR, which can find & replace multiple lines in your HTM files. You can even set up batch files to run multiple changes to files.


              Good luck,
              Leon
              • 4. Re: Style sheets in RoboHelp
                jdcyclone1 Level 1
                Do you know how the @media tag plays in Firefox? We were adding a copyright statement to a snippet, and then referencing the @media tags in the style sheet. It works in IE but not in Firefox. That's where my confusion was...I wasn't sure if the problem was in the snippet or in Firefox.
                • 5. Re: Style sheets in RoboHelp
                  HKabaker Level 2
                  As an aside, you may be aware that Netscape no longer supports the browser. They have an add-in for Firefox that overlays a Netscape "look and feel."

                  Some day we should expect Adobe to remove all that Netscape stuff (it sill has code for NS 4!), and I hope they'll take care of the anomalies in Firefox. Probably I should say, the anomalies in IE, because Ffx is truer to HTML and JS standards, I've heard.

                  Harvey
                  • 6. Re: Style sheets in RoboHelp
                    The Real Mike73 Level 1

                    Gravenstein wrote:

                    You *can* have multiple style sheets in a project. Not for a single topic, though.

                    G

                     

                    You write in your other CSS files using javascript to fool RoboHelp:

                     

                    <script type="text/javascript">

                        document.write("<link rel='stylesheet' href='../css/number2.css' type='text/css' />");

                    </script>

                    • 7. Re: Style sheets in RoboHelp
                      RoboAsh Level 2

                      I wanted to add my bit - Multiple style sheet can be added to single topic but that is possible through HTML view or directly in HTML file (located in the disc).

                       

                      but multiple style sheet will cascade in the output (means the second one will override the first one ).

                       

                      Hope this wil help

                       

                      Regards

                      Ashish

                      • 8. Re: Style sheets in RoboHelp
                        Peter Grainge Adobe Community Professional

                        I think I am right in saying it is not so much that the second CSS will override the first entirely but that if the second CSS has a style that is also defined in the first, such as H1, then the definition of duplicated styles will be as in the second CSS.

                         


                        See www.grainge.org for RoboHelp and Authoring tips

                         

                        @petergrainge

                        • 9. Re: Style sheets in RoboHelp
                          The Real Mike73 Level 1

                          Peter,

                           

                          Actually, RH won't let you do it.  Give it a try.  It will remove one of the references.  If you take RoboAsh's suggestion, then the next time you open that HTML file in RH, it will remove one of the references.  That's why I offrered my javascript solution, so you can still edit the file in RH.

                          • 10. Re: Style sheets in RoboHelp
                            Peter Grainge Adobe Community Professional

                            OK I will check later but with the two CSS files applying, what I wrote should still be true.

                             


                            See www.grainge.org for RoboHelp and Authoring tips

                             

                            @petergrainge

                            • 11. Re: Style sheets in RoboHelp
                              RoboAsh Level 2

                              Hi Real Mike,

                                        which version of RoboHelp did you tried that (I tried with RH 8 and RH 9 and it works with both the versions), Are you linking FrameMaker or Word documents?.

                               

                              I second Peter - same styles if redefined in second css will get overridden.

                               

                              Regards

                              Ashish

                              • 12. Re: Style sheets in RoboHelp
                                The Real Mike73 Level 1

                                RH 8.0.2.208

                                 

                                This is an AIR WebHelp project, so no FM or Word.

                                 

                                Steps to reproduce:

                                1. Open a topic in HTML view.
                                2. Add a second CSS reference to another CSS file and preview the topic. At this point, you can tell the CSS is not right, but the CSS references still look correct in the HTML.
                                3. Close the topic.
                                4. Re-open the topic. Now there are 2 references to the same CSS file, instead of 2 references to 2 diferent files.
                                • 13. Re: Style sheets in RoboHelp
                                  Peter Grainge Adobe Community Professional

                                  Tested in RoboHelp 9 and the reference to the second CSS works fine.

                                   

                                  I even deleted the topic that had the second CSS as its only CSS when normally RoboHelp would no longer show the CSS in Project Manager. It continued to show so the reference as the second CSS in a topic was clearly known to RoboHelp.

                                   

                                  Have you tried this in a brand new project?

                                   


                                  See www.grainge.org for RoboHelp and Authoring tips

                                   

                                  @petergrainge

                                  • 14. Re: Style sheets in RoboHelp
                                    Willam van Weelden Adobe Community Professional & MVP

                                    Hi,

                                     

                                    Personally I use an @import statement in my main css to import several CSS documents. When you only open the topic in HTML view or with an internal editor, the multiple CSS are retained. But the RH8 WYSIWYG removes them

                                     

                                    The downside of @import is that the RH WYSIWYG won't pick up the styles from the imported style sheets.

                                     

                                    Greet,

                                     

                                    Willam