Peter Leonov's Blog

meta imagetoolbar replacement

03 September 2008

Do not want to add meta http-equiv="imagetoolbar" content="no" to all your pages? Setting set_header didn’t help? Expression to the rescue!

img
{
  scrollbar-highlight-color: expression
  (
  	// makes sure the expression runs only once
    (runtimeStyle.scrollbarHighlightColor = "transparent"),
    // disable image toolbar
    (this.galleryImg='no')
  )
}

The key part is this.galleryImg='no'. The comments and newlines are there for readability only. Warning, MSIE does not support them in expressions, so, please, make the expression a single line before use.

Reade more on MSDN about galleryImg property.

Tags:
  • frontend
  • css
  • expressions
  • IE