4 Replies Latest reply on Mar 8, 2007 5:24 PM by Captiv8r

    CSS and Firefox

    tcbdon
      Hello,

      I have read various threads on the forums regarding stylesheets, CSS and the infamous project_style_ns.css file. In fact I have obtained a workaround for my situation from them and am grateful to the forums.

      I discovered some major discrepancies in our hanging indent styles when I first viewed the project Webhelp in Firefox. That's what got me started.

      My surmise at this point is that the project_style.css file is the one that is updated when we make edits to the style properties, and is also the one used by IE6. The *_ns.css file is used for Netscape variants of browsers and is for some reason updated fresh each time during generate. It is at that point that instances of "margin-left" and "text-indent" get peculiar values written to them. I don't know why we need two versions, unless CSS is not CSS according to various browsers.

      The workaround has been to manually edit the *_ns.css file and correct those things that are wrong (assuming you can pinpoint them all) and then save that as my own text file that does not get overwritten. Then, after Generate, I copy/paste the correct contents on top of the incorrect contents in the *_ns.css file.


      I am not keen on this since style updates are rendered more complex. In my view this inconsistency between browser families is a bug. What is the likelihood that this bug will be corrected?

      Thanks,

      tcbdon
        • 1. Re: CSS and Firefox
          M_Boyd Level 1
          I have the same problem. HTML topics look fine in Firefox with my .CSS applied. But when I generate WebHelp, Robohelp creates the _ns version and alters my styles so that the page is not displayed correctly. In my view, this is a bug and the work-around is cumbersome given the number of help systems my team supports.

          I'm using Robohelp 5.1. Does anyone know if this is fixed in 6?
          • 2. Re: CSS and Firefox
            Peter Grainge Adobe Community Professional (Moderator)
            In the WYSIWYG editor and preview, RH will be using the ProjectName.css. When you generate the webhelp, ProjectName.css and ProjectName_ns.css are generated and on opening the help, it sniffs which browser is being used. The NS version is just tweaked to get it as close as possible to the appearance in IE.

            Where you are losing me a bit is saying it is fine in Firefox BUT the webhelp created used _ns and messes with things. How are you viewing the webhelp in Firefox before the help is generated?

            What specifically is get messed with? Bullets and numbering perhaps?

            Also do you edit your style sheet through RoboHelp or using a style sheet editor such as TopStyle?

            • 3. Re: CSS and Firefox
              M_Boyd Level 1
              I created my style sheet in Notepad. (I've created quite a few style sheets, so that's faster for me.) I specifically designed the style sheet to work with both IE and Firefox. I created a test .HTM file, applied the style sheet, and opened it in both browsers. The file was displayed correctly in both. Then I created a RoboHelp project and compiled it as both HTML Help and Web Help. (The .CHM was fine, BTW.)

              I can see where RoboHelp is checking to see what browser is being used, and using the _ns style sheet for anything that's not IE. However, the _NS stylesheet removes the following line from my heading formats:

              margin-left: -24px;

              For this project, we want the body text indented. The simplest way to achieve this is to define a left margin for the body, and then define a negative left margin (of the same size) for each heading. The raw HTM files look exactly as planned in either Browser, but (thanks to RoboHelp's unnecessary "tweak") the compiled Web Help looks a bit odd in Firefox.

              The content is still readable, so it's something we'll just live with. However, it would be SOOOOO nice if RoboHelp would allow you to exercise some type of control over the files it generates. (I'm guessing that RoboHelp makes this change because Netscape couldn't handle negative margins? But since I'm not designing for Netscape, RoboHelp's change is a hindrance instead of a help.)
              • 4. Re: CSS and Firefox
                Captiv8r Adobe Community Professional & MVP
                Hi M_Boyd

                Assuming the raw "untweaked" style sheet does what you want, why not simply open the _ns version and replace the contents with your desired settings? I'm thinking if you did that on the server, as long as you are publishing it should then leave the style sheet alone if you haven't made changes to it.

                Just a thought... Rick