Plugin Directory

Krusty MSIE Body Classes

Author: Krusty Ruffle

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

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.

Download

FYI

Compatibility beta

Your Setup

Log in to vote.

The Consensus

No data

Average Rating

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