Plugin Directory

Krusty MSIE Body Classes

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

Download Version 1.0.2

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 rustykruffle.com.

Author: KrustyRuffle

Requires: 2.x or higher
Compatible up to: 3.0.5
Last Updated: 2010-7-14 Downloads: 209

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(0 ratings)

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

Log in to vote.