• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CSS: cannot make <h2> style display with "normal" font-weight in Firefox

Participant ,
Dec 09, 2010 Dec 09, 2010

Copy link to clipboard

Copied

I need to get rid of all bold styling, except for <H1> headings, in the Chinese versions of my helps. Why? Because bold characters in Chinese get blurry unless they are really big.

I can do most of it in the 'styles.css' file we are using: replace "font-weight:bold;" with "font-weight:normal;".

The only hang-up is, in Firefox the <h2> style still displays bold. We also have other h2 derivatives like <h2 class="NoteTipHeading"> and those obey our 'styles.css' OK.

Looks like Robohelp creates a second stylesheet into the output: 'styles_ns.css' and changes h2 back to bold there. So Firefox must be using that(?)

My temporary solution has been to change <h2> tags to <p> in the three Chinese variants I maintain. Not really neat and it is another thing to watch out for when we get new translations.

Any ideas? I wish there were something I could do to this in help resources and not the help output or RH program files.

(Using RH7 7.02)

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Dec 09, 2010 Dec 09, 2010

When you have a script that does that for you, it's no work at all to modify the output. I believe quite a lot of people have find and replace macro's or something else to make the output just that bit better.

Have you checked that the import fixes the problem? If not, something else may be amiss and we need to dig a little deeper.

Greet,

Willam

Votes

Translate

Translate
LEGEND ,
Dec 09, 2010 Dec 09, 2010

Copy link to clipboard

Copied

Hi,

The _ns stylesheets are a curiosity of RoboHelp 7. On output, RH examines your css and creates a copy in the _ns style sheet. It then deletes all styling that it thinks may give compatibility issues. If I remember correctly, Firefox, Netscape and Opera use this style sheet.

What I did in the _ns style sheets, was after publishing replace their contents with an @import statement. For example. Your style sheet is called mycss.css. In your output you end up with two style sheet: mycss.css and mycss_ns.css. Replace the contents of mycss_ns.css with @import "mycss.css"; Your style sheet then imports the styles from the original style sheet.

This is a bit arduous since you have to replace the css every time you create the output, but you don't have to fall back on ugly workarounds. Does this solve your problem?

Greet,

Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 09, 2010 Dec 09, 2010

Copy link to clipboard

Copied

Hi Willam,

replacing or editing the stylesheet every time I generate is not really something I want to do.

I guess I could include it in the same Final Builder project that I use for generating all my languages, but that is getting a bit heavy with the Arabic and Hebrew tweaks and a couple of different outputs with diffferent build tags.

sooo, you answer the question, but I wish there were some other answer

Pertti

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 09, 2010 Dec 09, 2010

Copy link to clipboard

Copied

When you have a script that does that for you, it's no work at all to modify the output. I believe quite a lot of people have find and replace macro's or something else to make the output just that bit better.

Have you checked that the import fixes the problem? If not, something else may be amiss and we need to dig a little deeper.

Greet,

Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 09, 2010 Dec 09, 2010

Copy link to clipboard

Copied

Yes, replacing the content of the _ns.css file with @import "styles.css"; seems to fix the h2 style.

I need to test this a bit to see how to do it in practice... automated, and not increasing my "build time" too much. Better apply this after our current release, if my job still exists next year.

There's no harm in doing it in all my 34 languages, I hope.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 09, 2010 Dec 09, 2010

Copy link to clipboard

Copied

LATEST

There's no risk at all. It only make sure that your original style sheet is used. Nothing more, nothing less.

Greet,

Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp