2 Replies Latest reply on Jul 22, 2009 5:49 AM by Willam van Weelden

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

    s4unders

      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.

        • 1. Re: Is there a quick way to remove HTML element style overrides?
          agfine

          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.

          • 2. Re: Is there a quick way to remove HTML element style overrides?
            Willam van Weelden Adobe Community Professional & MVP

            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.