Skip to main content
Known Participant
July 13, 2009
Question

Is there a quick way to remove HTML element style overrides?

  • July 13, 2009
  • 2 replies
  • 603 views

Hi,

I have inherited a >1000 topic help project that uses a CSS, but most of the topics contain at least one paragraph with a style override.

Is there a quick way of reapplying the styles (and nothing but the styles) defined in the CSS? Currently it looks as though I am going to have to go through each paragraph in each topic, apply the matching style and then - if RoboHelp finds overrides - reapply the style.

Is there a method or utility that I can use to speed things up before I develop RSI and terminal boredom?

TIA!

Regards

Ian Saunders

Syntellect Inc.

    This topic has been closed for replies.

    2 replies

    Willam van Weelden
    Inspiring
    July 22, 2009

    Hi,

    If by style override you mean inline styling, the fastest way is to applay the !important statement in your stylesheet. This statement meanst that a css-defined style overrides an inline style. For example:

    p {

         text-decoration: none !important;

    }

    Overrides the inline style:

    <p style="text-decoration: underline">Text</p>

    The downside is that the !important statement can also override the browser settings. If a user has indicated that all links should be underlined, het style A { text-decoration: none !important;} also overrides the browser setting. I wouldn't recommend the !important statement for anything else than cleaning up legacy code.

    Participant
    July 13, 2009

    When I was faced with that situation, I used the advanced options in Dreamweaver's Find and Replace. Instead of searching for text, you can find a specific tag with specific attributes and replace those attributes (or the whole tag) with something else. As long as you confine your site definition in Dreamweaver to your source pages, you can blast through the entire site.