Timo-Design IE CompatibilityMode Skin Object


Release Date:
June 6, 2009

Copyright (c) 2009, Timo-Design, the Netherlands
All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

Internet Explorer 8 is much more compliant then previous versions.
To prevent issues with existing sites IE8 has a Compatibility Mode, which renders the page as if you were using IE7.
Because some skins or skinobject might have issues in IE 8 we created this skin object. It allows you to force IE8 to show a site in either Strict or Compatibility mode, by writing a meta tag to the head of the page.
The meta tag will only be added if the visitor uses Internet Explorer

Attribute Values Default Description
IeVersion IE version number 7 Sets the version for the meta tag.
If not set the page will be in compatibility Mode (the target IE version will be 7)
Set this to 100 if you want IE 8 and future versions to render the page in Strict Mode.

Add to HTML skin (< DNN5):

Add to an HTML skin using object tags (DNN5+):
Force IE7 Compatibility mode:
<object id="TIMODESIGN_IECompatibilityMode" codetype="dotnetnuke/server" codebase="TIMODESIGN_IECompatibilityMode"></object>

Force IE8 Strict mode:
<object id="TIMODESIGN_IECompatibilityMode" codetype="dotnetnuke/server" codebase="TIMODESIGN_IECompatibilityMode">
   <param name="IeVersion" value="100" />

Add to ASCX skin:
<%@ Register TagPrefix="dnn" TagName="TIMODESIGN_IECOMPATIBILITYMODE" Src="~/DesktopModules/timodesign/sko/iecompatibilitymode/IECompatibilityMode.ascx" %>

Force IE7 Compatibility mode:
<dnn:TIMODESIGN_IECOMPATIBILITYMODE runat="server" id="TIMODESIGN_IECompatibilityMode" />

Force IE8 Strict mode:
<dnn:TIMODESIGN_IECOMPATIBILITYMODE runat="server" id="TIMODESIGN_IECompatibilityMode" IeVersion="100" />


Test the Skin Object

-Place a HTML module on the page
-Edit the content and switch the editor to Source View.
-Paste the following HTML in the editor and Save;

<div style="display: table;">
<div style="display: table-row;">
<div style="display: table-cell;">If you see this text (in IE 8) </div>
<div style="display: table-cell;">on one line the page </div>
<div style="display: table-cell;">is shown in IE 8 strict mode.</div>

If the text is not displayed in one line the page is in IE7 compatibilty mode, if it is it's in IE8 Strict mode. This will only be visible in IE. I'm using the lack of support for "Tabel-Cell" in IE 7 for this test.

Last edited Feb 4, 2014 at 8:42 AM by Timo_Design, version 2


No comments yet.