Skip to main content
Beth_Pickett
Known Participant
January 19, 2015
Answered

Style sheet changes not appearing in RH10

  • January 19, 2015
  • 1 reply
  • 582 views

Hello all,

Searching for an answer before I posted, I saw this question from a member named Pam about RH11 posted almost a year ago, but I don't see an answer. I'm hoping there is an answer!

After many years of working in RoboHelp and carrying on with inline styles, I'm now looking into changing over to style sheets. I've been tinkering with them in some test projects, and I'm having the same problem that Pam did. The process of creating and applying a style sheet is simple, as far as I can tell, yet I can't get the style sheet formatting to appear. It's in the HTML--I see the .css specified, and there are only heading tags and so on present instead of inline stuff--yet the fonts I've selected appear neither in the Styles and Formatting pod nor in the Design view of the topic. I searched Adobe for help and found this: ROBOHELP 10: Creating CSS for a Topic | Tech Comm Suite Highlights | Adobe TV. I did exactly the same steps, but my fonts and spacing do not change as they do in the video. They don't appear different, that is. When I go into the style sheet, my selections are in there; they're just not displayed on the screen. I compiled a chm file to see if by chance the changes might appear there, but no.

I tried this both with existing and new topics in a test copy of an existing project and with a brand new project created in RoboHelp that had none of my usual baggage. Any ideas?

Thanks,

Beth

This topic has been closed for replies.
Correct answer Peter Grainge

I have your project and will look no later than tomorrow.


When I opened your CSS it was written as below.

/*Created with Adobe RoboHelp 10.*/

@media only screen and (min-width: 1024px) and (max-width: 99999px){

  h1 {

  font-family: Arial;

  font-size: 18pt;

  x-next-class: ;

  x-next-type: p;

  }

  }

@media only screen and (min-width: 1024px) and (max-width: 99999px){

  p {

  font-family: Arial;

  }

  }

That was because, as Amebr had picked up, you must have had Desktop setting in the media dropdown when you applied the style. The result is that if you are viewing in any less than 1024px, Arial will not be applied and you will get the browser default on the user's machine.

With media set to None, I defined h1 and p again using Rh's CSS editor and the following was appended.

h1 {

  font-weight: bold;

  font-size: 22pt;

  margin-top: 14pt;

  margin-bottom: 14pt;

  margin-left: 0pt;

  margin-right: 0pt;

  page-break-after: avoid;

  font-family: Arial;

  x-next-class: ;

  x-next-type: p;

}

p {

  margin-top: 14pt;

  margin-bottom: 14pt;

  margin-left: 0pt;

  margin-right: 0pt;

  font-family: Arial;

}

Go back to your real project and define your styles with media set to None. Take a copy of the exising CSS first for safety. Delete any styles with media rules applied.

Create the styles by right clicking and using CSS Editor. Clean up by right clicking and using HTML Editor (the css will open in Rh and you can work on it as if in a text editor.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

1 reply

Peter Grainge
Community Expert
Community Expert
January 20, 2015

Stuff not appearing right is not surprising pending the clean up so let's focus on your brand new project first.

In a brand new project with topics created in it and using the default.css as supplied, things have to work correctly.

Can you be more specific about what you are seeing where? Different heading levels appearing in different places? Different styles appearing in different places? Maybe add some screenshots to help us.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Beth_Pickett
Known Participant
January 20, 2015

Hi Peter, thanks for responding. By brand new project, I mean I opened RH and selected File/New Project, immediately followed by File/New Topic. At that point, with one topic (screen shot #1), I created a style sheet and changed the H1 font from Times 22pt to Arial 18pt and clicked OK. Visually, nothing happened, as you can see in the screen shots. The style sheet is in the code, however (screen shot #2), and my changes to it were saved--the screenshot of the Styles dialog box (screen shot #3) was taken after I changed the font and reopened the dialog. I didn't change any locations of files or anything like that, just accepted whatever was there.

Peter Grainge
Community Expert
Community Expert
January 21, 2015

See the Contact page on my site and send the project as instructed there. Do make sure you include a link to this thread and please do not email the project direct.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.