Skip to main content
JoeJitsu
Known Participant
August 8, 2016
Answered

Stylesheets Conflicting in Master Page HTML?

  • August 8, 2016
  • 1 reply
  • 833 views

Hey all, got an interesting case here. Apologies for long read.

I worked with a web developer here at my company to create a nice little script for a Feedback tab that appears on each topic. Click it, opens up to Was this Helpful > Yes or No. User clicks, and the server emails me the results. Works great both front and back end.  However, there is some funny behavior on the project side.

The portion of code is below (these are the last three lines; I bolded the line in question)

<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>

  <script src="../guidefeedback/feedback.js?v1.0" type="text/javascript"></script>

<link href="../guidefeedback/feedback.css?v1.0" rel="stylesheet" type="text/css">

When I drop the entire code into the footer of the Master Page (in HTML mode of course), RoboHelp accepts it, recognizes the scripts, etc., but it automatically moves the bold line up to the header, directly below the line of code for the Master Page's default CSS:

<link rel="StyleSheet" href="Millennium_OnlineBooking.css" type="text/css" />

<link href="../guidefeedback/feedback.css?v1.0" rel="stylesheet" type="text/css" />

</head>

Now if I just leave everything alone, regenerate, and place the output on the server, everything works great. But if I make ANY minor change to the Master Page...either in Design or HTML view...and save, it blows away the default CSS that is applied to all topics. The code in the Master Page HTML remains the same, the default CSS remains the same, but if I look at individual topics' Properties > Appearance, the CSS has been defaulted to None. If I remove that bold line from code, I can make changes to the Master Page to my heart's content with no odd behavior or style sheet changes to topics. This line is definitely confusing RH in some way.

I know an easy workaround is to just pull up Topic List and reapply the desired CSS to all applicable topics, and I know I will rarely be editing a Master Page once I get it how I like it, but I can't help feeling that we're missing a fundamental tweak that will allow RH to manage two CSS.

Does anyone know what am I missing here?

Thanks in advance!

Joe C.

This topic has been closed for replies.
Correct answer Willam van Weelden

You can add multiple CSS files to a topic in RoboHelp, but the RoboHelp dialog doesn't understand it. Nothing to be done about that. I have also tried using @import rules, but RH doesn't like that either. I the end, I merged al my CSS files into one. That works as expected.

1 reply

Willam van Weelden
Willam van WeeldenCorrect answer
Inspiring
August 9, 2016

You can add multiple CSS files to a topic in RoboHelp, but the RoboHelp dialog doesn't understand it. Nothing to be done about that. I have also tried using @import rules, but RH doesn't like that either. I the end, I merged al my CSS files into one. That works as expected.

JoeJitsu
JoeJitsuAuthor
Known Participant
August 9, 2016

Thanks William. I tried @import rules as well!  I knew combining CSS was an option, but I was stubbornly holding out hope that two calls to a CSS could coexist peacefully.

Nevertheless, it turns out your advice was spot on, as usual. Combining the Feedback CSS into my project's CSS and removing the call to the external CSS from the Master Page code resolved everything. Works like a charm.  Thank you again!