Hi,

I'm working on fixing a code for a website that was done by someone else. I noticed this word "fprolloverstyle" in the style tag, and I couldn't understand what it means. I searched online but still I don't understand it! What does it do exactly? Can I remove it? It's getting on my nerves...

It looks like this:

<style fprolloverstyle>A:hover {color: #ff0000; font-weight: bold}

Dani AI

Generated

Short practical explanation and a safe cleanup path

This isn’t a browser feature or a CSS keyword — it’s leftover markup from Microsoft FrontPage’s Behaviors/rollover system. FrontPage’s Behaviors add custom attributes and client scripts to elements when you use the visual “rollover”/DHTML features, so you’ll see nonstandard attributes in the generated HTML. (flylib.com)

How it works (brief): FrontPage stores the rollover CSS rules as a custom attribute on the element (or as a special <style> block) and its runtime script (animate.js / rollIn / rollOut) copies that stored string into the element’s style at mouseover. You’ll find many older pages with attributes like fprolloverstyle and onMouseOver/onMouseOut that call rollIn(this) / rollOut(this). The behavior code lives in FrontPage’s animate.js (the same script FrontPage injects), which is what reads fprolloverstyle. (forum.scriptbrasil.com.br)

What to do (safe, step-by-step):

  • Decide whether to keep FrontPage rollovers (legacy JS) or convert to standard CSS. Modern sites should use ordinary :hover rules and remove the FP scripts. (See MDN on :hover for the recommended approach.) (developer.mozilla.org)

  • Backup your site (git or a zip) before changes.

  • Search for occurrences:

    grep -R --line-number "fprolloverstyle" .
  • If you want to strip the attribute from many files (GNU tools), after backing up run:

    find . -type f -name '*.html' -print0 | xargs -0 sed -i 's/\s*fprolloverstyle="[^"]*"//g'
    find . -type f -name '*.html' -print0 | xargs -0 sed -i 's/<style\s\+fprolloverstyle[^>]*>/<style>/Ig'

    Test on a copy first — sed variants differ on macOS (sed -i '' ...).

  • Remove references to FrontPage runtime (animate.js / onmouseover="rollIn(this)" / onmouseout="rollOut(this)") if you’ve switched to CSS. FrontPage sometimes points animate.js at an Office path; remove that script tag if it’s not in your site folder to avoid errors. (pcreview.co.uk)

Notes and cautions

  • If you remove fprolloverstyle but leave rollIn calls and animate.js in place, behavior may break or throw script errors; remove the JS handlers too or keep the FP runtime.
  • ’s suggestion to use normal hover CSS is the right modern fix; was also correct that this is an editor/CMS artifact. For a quick audit, grep for dynamicanimation, rollIn, rollOut and the animate.js script to find FP-generated pieces you can remove.

Recommended Answers

All 4 Replies

hi,
try writing the code this way and check if u still get any errors. It should work.

<style type="text/css">
  A:hover
 {color: #ff0000; font-weight: bold}
</style>

The missing attribute " type " is all that is required for a style tag to function properly.

hey thanks for the reply. yes it works with no errors if i remove this word. i was just wondering what it means..

its likely code left over from whatever IDE or CMS the original author was using, Its possible that the software searches for unreasonable words like that as its anchors, and replaces them with proper text when publishing
one of the editors adds bb_ to the front of keywords it has altered, its messed up and I don't use it

Hi

fprollover is the code generated by Frontpage when creating rollover buttons hence th fp bit. That was doing my head in too so I found an article on it at

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.