Skip to main content
Known Participant
September 28, 2010
Answered

Applying a style in RoboHelp 7

  • September 28, 2010
  • 1 reply
  • 606 views

I have a style called cmdname and I created a definition in my style sheet for this style:

cmdname {
font-size: 11pt;
font-family: Arial, sans-serif;
font-weight: bold;
font-variant: small-caps;
}

I applied the style sheet to all of my topics, but the style is not "active" for the words that are marked as cmdname. How can I make this happen without changing each cmdname individually?

Thanks,

Deb

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

    Hi,

    What kind of element are you targeting? For a paragraph, make it p.cmdname. For a span, make it span.cmdname. For a hyperlink, make it a.cmdname. For targeting all kinds of element, simply make it .cmdname.

    As it is now, the browser expects an element with the name 'cmdname' and will style that element. This element doesn't exist in html, so your style will never be applied.

    Greet,

    Willam

    1 reply

    Willam van Weelden
    Willam van WeeldenCorrect answer
    Inspiring
    September 28, 2010

    Hi,

    What kind of element are you targeting? For a paragraph, make it p.cmdname. For a span, make it span.cmdname. For a hyperlink, make it a.cmdname. For targeting all kinds of element, simply make it .cmdname.

    As it is now, the browser expects an element with the name 'cmdname' and will style that element. This element doesn't exist in html, so your style will never be applied.

    Greet,

    Willam

    Known Participant
    September 28, 2010

    I don't understand. Do you mean that in my style sheet where I have the definition of cmdname, it should be listed as span.cmdname if I'm using it for s

    pan?

    Known Participant
    September 28, 2010

    Thanks! Changed the definition in the style sheet and it worked!