Krusty MSIE Body Classes

Inserts Internet Explorer version tags in the body classes of themes that use the ‘body_class’ filter.

Author:Krusty Ruffle (profile at
WordPress version required:2.x
WordPress version tested:3.0.5
Plugin version:1.0.2
Added to WordPress repository:24-11-2008
Last updated:14-07-2010
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:
Total downloads:694
plugin download
Click to start download

This plugin will will only work if the current theme uses the 'body_class' filter to build a list of classes for the body tag of the sites public pages. Themes that I know use this filter include:

  1. Sandbox
  2. Carrington
  3. K2
  4. Twenty Ten

The tags this plugin inserts are as follows:

  • browser-msie (when any browser identifies itself as Internet Explorer)
  • browser-msie-{MAJOR VERSION} (where {MAJOR VERSION} = 3/4/5/6/7/8)
  • browser-msie-{MAJOR VERSION}-{MINOR VERSION} (only when a browser has identified itself as Internet Explorer 5.5)
  • browser-msie-old (for any browser that idnetifies itself as Internet Explorer 6 or less)

So, if your site is hit by Internet Explorer 5.5 the body tag will look something like:

<body class="wordpress y2008 m11 d19 h22 home blog loggedin browser-msie browser-msie-5 browser-msie-5-5 browser-msie-old">

This allows for easy adjustment of css for Internet Explorer browsers. Such as:

  • setting a fixed width for internet explorer versions that are to old to recognize the max-width & min-width attributes
  • adjusting margins and padding for IE versions that blow them out of whack
  • showing links to Firefox and Opera download pages only to IE users :^P

If you have any questions, suggestions, or comments feel free to drop by the Krusty MSIE Body Classes page at