<?xml version="1.0" encoding="utf-8"?>

			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>Blog of Shaun McCran - Architecting robust, elegant technical and business solutions - Internet Explorer</title>
			<link>http://www.mccran.co.uk/index.cfm</link>
			<description>I write about Architecture and Design, Architectural patterns, Architectural Principles and Architectural policies. This includes TOGAF, Zachman, Business Architecture, SOA and Process and tools such as the IBM Rational software and Adobe products. I also write about my previous life as a mobile and web developer.</description>
			<language>en-gb</language>
			<pubDate>Tue, 09 Jun 2026 06:51:36 -0000</pubDate>
			<lastBuildDate>Thu, 05 Jan 2012 03:31:00 -0000</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>shaun@mccran.co.uk</managingEditor>
			<webMaster>shaun@mccran.co.uk</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>shaun@mccran.co.uk</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			
			<itunes:explicit>no</itunes:explicit>
			
			
			
			
			
			<item>
				<title>Book review: JQuery Mobile – a first look</title>
				<link>http://www.mccran.co.uk/index.cfm/2012/1/5/Book-review-JQuery-Mobile--a-first-look</link>
				<description>
				
				I was recently sent a copy of JQuery Mobile by Packt publishing for review. I&apos;ve dabbled in the JQuery Mobile development language a fair amount, so I was interested to see what this book could teach me that may be different from the information out there in the community.
				 [More]
				</description>
				
				
				<category>JQuery</category>
				
				<category>Internet Explorer</category>
				
				<category>Mobile</category>
				
				<category>Javascript</category>
				
				<pubDate>Thu, 05 Jan 2012 03:31:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2012/1/5/Book-review-JQuery-Mobile--a-first-look</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Handling JavaScript event model differences in Internet Explorer and Firefox</title>
				<link>http://www.mccran.co.uk/index.cfm/2010/4/14/Handling-JavaScript-event-model-differences-in-Internet-Explorer-and-Firefox</link>
				<description>
				
				A few weeks ago I created an inline editing system for a Content Management System. It allowed a user to click on a page element and edit it inline. The updated data was then submitted through an AJAX request.

I have recently discovered an issue with some of the JavaScript code that I wrote in the event handling routine.
				 [More]
				</description>
				
				
				<category>Internet Explorer</category>
				
				<category>Browsers</category>
				
				<category>Javascript</category>
				
				<pubDate>Wed, 14 Apr 2010 15:15:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2010/4/14/Handling-JavaScript-event-model-differences-in-Internet-Explorer-and-Firefox</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Creating a CSS only cross browser drop down menu</title>
				<link>http://www.mccran.co.uk/index.cfm/2010/1/8/Creating-a-CSS-only-cross-browser-drop-down-menu</link>
				<description>
				
				I&apos;ll say this up front, I&apos;m not a CSS guru. I like CSS, but it can be incredibly frustrating. One of the clients I am currently producing work for requires a high level of Accessibility. High enough that we need to avoid using JavaScript unless any script has a &quot;Non&quot; JavaScript equivalent.

The site navigation is through a top level horizontal menu, but what if we also want a drop down menu? Can we do it in CSS only, and it still be Firefox, Internet Explorer 6,7 and 8 compatible? 

Yes, we can, but it&apos;s a lot of code, and it&apos;s not pretty. The basic concept behind most CSS menus is to use a list, and transform each list item to suit your styling. So we will create a div, with a class of menu. Then create a list inside it.

&lt;code&gt;
	&lt;div class=&quot;menu&quot;&gt;
		&lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;&quot;&gt;Top menu option
		&lt;!--[if IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt;
		&lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt;
	
		&lt;ul&gt;
			&lt;li&gt;&lt;a href=&quot;&quot;&gt;Link 1&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;&quot;&gt;Link 2&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;&quot;&gt;Link 3&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;&quot;&gt;Link 4&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;&quot;&gt;Link 5&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;&lt;a href=&quot;&quot;&gt;Link 6&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;

			&lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt;
		&lt;/li&gt;
		
		&lt;/ul&gt;
	
	&lt;/div&gt;
&lt;/code&gt;

Notice that there are some specific if statements relating to different versions of Internet Explorer. these basically make the functionality the same for each version, they are compensating for the differences in code handling between IE versions.

Next create a set of CSS styles to alter the appearance of the list. I am not going to go into the CSS line by line, as it is commented, but I&apos;ll explain the methodology behind it.

The top level menu item is always displayed, but the list is hidden using &quot;visibility:hidden&quot;. When the user mouse&apos;s over the menu div the CSS applies a:hover ul{visibility:visible;. This makes the list visible. 

&lt;code&gt;

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;

.menu {width:149px; height:32px; position:relative; z-index:100;border-right:1px solid #000; font-family:arial, sans-serif;}

/* hack to correct IE5.5 faulty box model */
* html .menu {width:149px; w\idth:149px;}

/* remove all the bullets, borders and padding from the default list styling */
.menu ul {padding:0;margin:0;list-style-type:none;}
.menu ul ul {width:149px;}

/* float the list to make it horizontal and a relative position so that you can control the dropdown menu positon */
.menu li {float:left;width:149px;position:relative;}

/* style the links for the top level */
.menu a, .menu a:visited {display:block;font-size:12px;text-decoration:none; color:#fff; width:138px; height:30px; border:1px solid #000; border-width:1px 0 1px 1px; background:#c0c0c0; padding-left:10px; line-height:29px; font-weight:bold;}

/* a hack so that IE5.5 faulty box model is corrected */
* html .menu a, * html .menu a:visited {width:149px; w\idth:138px;}

/* style the second level background */
.menu ul ul a.drop, .menu ul ul a.drop:visited {background:#c0c0cc url(arrow.gif) no-repeat 130px center;}

/* style the second level hover */
.menu ul ul a.drop:hover{background:#c0c0cc url(arrow.gif) no-repeat 130px center;}
.menu ul ul :hover &gt; a.drop {background:#c0c0cc url(arrow.gif) no-repeat 130px center;}

/* hide the sub levels and give them a positon absolute so that they take up no room */
.menu ul ul {visibility:hidden;position:absolute;height:0;top:31px;left:0; width:149px;border-top:1px solid #000;}

/* another hack for IE5.5 */
* html .menu ul ul {top:30px;t\op:31px;}

/* style the table so that it takes no part in the layout - required for IE to work */
.menu table {position:absolute; top:0; left:0; border-collapse:collapse;}

/* style the second level links */
.menu ul ul a, .menu ul ul a:visited {background: ghostwhite; color:#000; height:auto; line-height:1em; padding:5px 10px; width:128px;border-width:0 1px 1px 1px;}

/* yet another hack for IE5.5 */
* html .menu ul ul a, * html .menu ul ul a:visited {width:150px;w\idth:128px;}

/* style the top level hover */
.menu a:hover, .menu ul ul a:hover{color:#000; background:#c0c0cc;}
.menu :hover &gt; a, .menu ul ul :hover &gt; a {color:#000; background:#c0c0cc;}

/* make the second level visible when hover on first level list OR link */
.menu ul li:hover ul,
.menu ul a:hover ul{visibility:visible;}
&lt;/code&gt;

There are also a lot of other browser specific hacks present, as the aim was to get the menu working in every Internet Explorer version, and be Accessible.

There is a demo of this here: &lt;a href=&quot;http://www.mccran.co.uk/css/demo.cfm&quot; target=&quot;_blank&quot;&gt;CSS menu demo&lt;/a&gt;
				
				</description>
				
				
				<category>Internet Explorer</category>
				
				<category>Accessibility</category>
				
				<category>CSS</category>
				
				<category>Browsers</category>
				
				<category>HTML</category>
				
				<pubDate>Fri, 08 Jan 2010 16:47:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2010/1/8/Creating-a-CSS-only-cross-browser-drop-down-menu</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>My handy IE CSS tweaks list</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/12/18/My-handy-IE-CSS-tweaks-list</link>
				<description>
				
				I&apos;m not really a design kind of person, I like designing things, and I&apos;m learning more and more CSS all the time, but it&apos;s the server side coding that I love like Apple Pie and custard.

Recently I&apos;ve had to do a bit more design work, so I&apos;ve been tripping all over myself to get CSS working in IE6,IE7,IE8 and firefox. I&apos;ve learnt a few interesting things in the last few days, and I know I&apos;m going to need to use them again. Some are considered &apos;hacks&apos;, some are just clever CSS techniques. They all feel a bit like secret rules of a club I&apos;m not really a member of yet though.

So I&apos;m making a handy list, so I don&apos;t loose them. I hope to refine and add to this on an ongoing basis, so if you know a better / easier way please let me know. After all coding standards are for life, not just Christmas, and I don&apos;t like the idea of anything being a hack, even if it is CSS.

&lt;h3&gt;Adding a 1px high line to IE&lt;/h3&gt;
I am trying to add a 1px line, like a HR line to the page, it displays fat in IE?

It seems that some versions of IE will display a div without content as the same height as your font size. Add html comments to it to drop it down to the right height:
&lt;code&gt;
&lt;style&gt;
.yellow-ruler {color: #ffd520; background-color:#ffd520; width: 100%; height:2px; margin: 3px 0px 0px 0px;}
&lt;/style&gt;
&lt;div class=&quot;yellow-ruler&quot;&gt;&lt;!-- --&gt;&lt;/div&gt;
&lt;/code&gt;

&lt;h3&gt;IE is adding padding and margins to everything by default&lt;/h3&gt;

I think there is a lot more information about this out there, but for now I&apos;ve found that adding the code below will kill most of IE&apos;s random padding/margin issues.

&lt;code&gt;
* {margin:0; padding:0; border: 0px;}
&lt;/code&gt;

&lt;h3&gt;I&apos;ve built a JQuery accordion and the content doesn&apos;t move correctly&lt;/h3&gt;

When expanding a JQuery accordion element the content underneath it is not moving down, and the accordion is expanding over it. This was a simple fix, but a bit of a pain to find. Just do not specify a height attribute on the div that hold the accordion, IE will stick to the height, but firefox will let it grow to be longer.

&lt;h3&gt;Styling form element borders&lt;/h3&gt;

If you have a CSS rule like the one above that removes all the margins, padding and borders then all your form elements will have no border. IE your text fields and textareas etc will not have a clearly defined edge to them. By adding the line of CSS under this (select,input, etc) you can set the style width and colour of your form elements so that you control them, rather than the browser defaults. In Internet explorer this will also add borders to the checkbox and radio form elements. There does not seem to be any way of writing a CSS style to remove this inherently, so create a style of borderless and set all your radio and checkbox fields to &quot;class=borderless&quot;.

&lt;code&gt;
* {margin:0; padding:0; border: 0px;}

select,input,textarea{border-width: 1px; border-style: solid; border-color: grey;}

/* IE stops the radio borders */
.borderless{border: 0px;}
&lt;/code&gt;

&lt;h3&gt;Strange IE positioning fix&lt;/h3&gt;

Sometimes in IE (mainly 6) using position: absolute just does not render the div on screen. I am not sure why. Adding a &quot;clear: both;&quot; or a &quot;clear: left;&quot; or a &quot;clear: right;&quot; appears to fix this.

&lt;h3&gt;Easy centering of elements&lt;/h3&gt;

I used to struggle with centering elements on a page all the time, but now you can do something like this:

&lt;code&gt;
P.blockoftext {
    margin-left: auto;
    margin-right: auto;
    width: 6em
}

&lt;p class=&quot;blocktext&quot;&gt;Text&lt;/p&gt;

&lt;/code&gt;

This will center a block of text and give it a width of 6.

For images you can do this:

&lt;code&gt;

img.displayed {
    display: block;
    margin-left: auto;
    margin-right: auto }

&lt;img class=&quot;displayed&quot; src=&quot;...&quot; alt=&quot;...&quot;&gt;

&lt;/code&gt;

That will auto center the image inside its containing div.
				
				</description>
				
				
				<category>Internet Explorer</category>
				
				<category>CSS</category>
				
				<category>Browsers</category>
				
				<category>HTML</category>
				
				<pubDate>Fri, 18 Dec 2009 12:05:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/12/18/My-handy-IE-CSS-tweaks-list</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Long button issues in IE, a CSS fix</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/8/5/Long-button-issues-in-IE--a-CSS-fix</link>
				<description>
				
				A brief CSS interlude.

A styling issue came up on a site recently, we had a series of buttons that had long text. Like whole sentences. In Firefox that was fine, but in Internet Explorer (7 and 8) they were super widely padded out. They were a fair bit longer than necessary, so long they were messing up the general layout of the template.
&lt;p&gt;
Long buttons in Internet Explorer:
&lt;p&gt;
&lt;img src=&quot;http://www.mccran.co.uk/images/ie_buttons.gif&quot; Title=&quot;Long buttons in IE&quot; /&gt;
&lt;p&gt;
The same buttons in Firefox:
&lt;p&gt;
&lt;img src=&quot;http://www.mccran.co.uk/images/ffbuttons.gif&quot; /&gt;
&lt;p&gt;
After looking at setting the margins, or the padding to 0, or even negative numbers nothing was working. Turns out you need to set the width to auto, and just let the text push out the width of the button using &apos;overflow:visible&apos;.

This is the CSS that generates the above buttons:

&lt;code&gt;
&lt;style&gt;
#button{width:auto; overflow:visible;}

#buttonPadded{width:auto; overflow:visible; padding-left: 10px; padding-right: 10px;}
&lt;/style&gt;

&lt;input type=&quot;submit&quot; value=&quot;This is some really long text, probably too long for a button&quot;&gt;
&lt;p /&gt;
&lt;input type=&quot;submit&quot; value=&quot;This is some really long text, probably too long for a button&quot; id=&quot;button&quot;&gt;
&lt;p /&gt;
&lt;input type=&quot;submit&quot; value=&quot;This is some really long text, probably too long for a button&quot; id=&quot;buttonPadded&quot;&gt;

&lt;/code&gt;

This then makes text was a little close to the edge, so I&apos;ve added a left and right padding setting, gives it that bit of space at the edges.
				
				</description>
				
				
				<category>Internet Explorer</category>
				
				<category>CSS</category>
				
				<category>Browsers</category>
				
				<pubDate>Wed, 05 Aug 2009 10:54:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/8/5/Long-button-issues-in-IE--a-CSS-fix</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Cross site Script hacking using the GET method</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/7/30/Cross-site-Script-hacking-using-the-GET-method</link>
				<description>
				
				I&apos;ve dealt with Cross Site scripting (XSS) attacks before (&lt;a href=http://www.mccran.co.uk/index.cfm/2009/4/6/Cross-Site-scripting-hack-test-form&gt; http://www.mccran.co.uk/index.cfm/2009/4/6/Cross-Site-scripting-hack-test-form&lt;/a&gt;), so I&apos;m familiar with the principles involved. In this example there is a subtle difference.

In the example above the vulnerability was created by POSTING a text string through the form action. In this example we will examine a similar vulnerability using GET. IE we will simply pass the attacking string through the url of the form, setting the form field value in the traditional &apos;url?variable=N&apos; way.

To demonstrate this create a simple form:

&lt;code&gt;
&lt;cfparam name=&quot;attributes.formValue&quot; default=&quot;&quot;&gt;

&lt;form&gt;

&lt;input type=&quot;text&quot; name=&quot;formValue&quot; size=&quot;20&quot; value=&quot;&lt;cfoutput&gt;#attributes.formValue#&lt;/cfoutput&gt;&quot;&gt;
&lt;input type=&quot;submit&quot; name=&quot;Action&quot; value=&quot;Send&quot;&gt;

&lt;/form&gt;
&lt;/code&gt;

Call your form in a browser. Now append on the end of that url the text string below.


?attributes.formValue==&gt;&quot;&gt;&lt;%2Ftitle&gt;&lt;%2Fiframe&gt;&lt;%2Fscript&gt;&lt;%2Fform&gt;&lt;%2Ftd&gt;&lt;%2Ftr&gt;&lt;br&gt;&lt;iFraMe+src%3Dhttp%3A%2F%2Fwww.google.com+width%3D900+height%3D1100&gt;&lt;%2FIfRamE&gt;


Reading through the string you&apos;ll notice that it is an Iframe constructor that is calling a url, in this case www.Google.com.

As the url is setting the value of &apos;attributes.formValue&apos; this will be inserted into the form on the submit action. We are not posting it, so it will not be picked up by any custom POST action code.

One interesting point to mention here is that testing this in IE 8, it will actually be blocked by default, as it has detected that scripts are running over different domains.

&lt;img src=&quot;http://www.mccran.co.uk/images/ie_xxs.gif&quot; title=&quot;IE Blocking XXS&quot; /&gt;

So if you are in the habit of writing POST detection scripts, make sure you handle any other submissions as well!
				
				</description>
				
				
				<category>Security</category>
				
				<category>Coldfusion</category>
				
				<category>Best practices</category>
				
				<category>Internet Explorer</category>
				
				<pubDate>Thu, 30 Jul 2009 14:57:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/7/30/Cross-site-Script-hacking-using-the-GET-method</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Apostrophe ( &amp;amp;apos; ) display issues</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/7/1/Apostrophe--apos--display-issues</link>
				<description>
				
				It appears that the character entity &amp;amp;apos; is not a valid HTML entity. It was just XML, and thus XHTML. 

If you are using a browser that doesn&apos;t support XHTML then you probably shouldn&apos;t use it, as it will appear as a normal text string. I found this whilst testing something in IE 8, as that is not XHTML compliant.

So just use the &apos; character, or if you really feel that you have to escape it use:

&amp;amp;#39;

Just be careful with that one, as it will cause coldFusion to flip out. Then you may need to escape your escape characters, and then where will you be?
				
				</description>
				
				
				<category>Internet Explorer</category>
				
				<category>Browsers</category>
				
				<category>HTML</category>
				
				<pubDate>Wed, 01 Jul 2009 11:07:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/7/1/Apostrophe--apos--display-issues</guid>
				
				
			</item>
			
		 	
			</channel></rss>