<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Smart red fox &#187; UncategorisedSmart red fox</title>
	<atom:link href="http://www.smartredfox.com/category/uncategorised/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.smartredfox.com</link>
	<description>Smarter than your average bear</description>
	<lastBuildDate>Thu, 02 Feb 2012 21:18:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<meta name="generator" content="Obscure 2.0" />
		<item>
		<title>IE6 &#8211; Items moving when hovering over another element</title>
		<link>http://www.smartredfox.com/2010/06/ie6-items-moving-when-hovering-over-another-element/</link>
		<comments>http://www.smartredfox.com/2010/06/ie6-items-moving-when-hovering-over-another-element/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 15:40:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Notes]]></category>
		<category><![CDATA[Uncategorised]]></category>

		<guid isPermaLink="false">http://www.smartredfox.com/?p=203</guid>
		<description><![CDATA[I know this is a common problem, and is well documented on a number of sites, but each time I run into this problem I seem to forget the best method for narrowing down where the problem is coming from. First, the problem This is a real example from a project I&#8217;m working on at the moment. This layout worked perfectly in FF3, Chrome, and IE8. It was only when I came to look at the layour in IE6 that &#8230; <a href="http://www.smartredfox.com/2010/06/ie6-items-moving-when-hovering-over-another-element/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">I know this is a common problem, and is well documented on a <a href="http://www.positioniseverything.net/explorer/peekaboo.html" target="_blank">number</a> of sites, but each time I run into this problem I seem to forget the best method for narrowing down where the problem is coming from.</p>
<h2 style="text-align: left;">First, the problem</h2>
<p>This is a real example from a project I&#8217;m working on at the moment. This layout worked perfectly in FF3, Chrome, and IE8. It was only when I came to look at the layour in IE6 that I saw the problem.</p>
<p>When first loading the page the following shows:</p>
<div id="attachment_205" class="wp-caption alignnone" style="width: 310px"><a href="http://www.smartredfox.com/wp-content/uploads/2010/06/ie6_wrong.png"><img class="size-medium wp-image-205 colorbox-203" src="http://www.smartredfox.com/wp-content/uploads/2010/06/ie6_wrong-300x291.png" alt="The way it looks" width="300" height="291" /></a><p class="wp-caption-text">Broken in IE6</p></div>
<p>As you can see the box with the tick in it is in completely the wrong place &#8211; it&#8217;s supposed to be just above the &#8220;read more&#8221; link. Now is where IE6 shows it&#8217;s real strangeness. When I hovered over the read more link, or the item itself, it moved to the right place.</p>
<p>I&#8217;d seen this problem a few times before, and thought I knew what I was doing to fix it &#8211; a light smattering of Position:relative, and Zoom:1 and I&#8217;d be done. Unfortunately, it wasn&#8217;t that simple. My next step was a search around the internet-o-web where lots of people seem to describe something very similar, and most of them recommend applying Position:relative to the parent of the float. This didn&#8217;t work for me.</p>
<p>A bit more playing with my setup revealed that applying Position:relative to the list item (the parent&#8217;s, parent&#8217;s, parent) fixed the problem. One to file away for the future!</p>
<p>Here it is where it&#8217;s supposed to be.</p>
<p><a href="http://www.smartredfox.com/wp-content/uploads/2010/06/ie6_right.png"><img class="alignnone size-medium wp-image-204 colorbox-203" title="The way it should look" src="http://www.smartredfox.com/wp-content/uploads/2010/06/ie6_right-300x291.png" alt="The way it should look" width="300" height="291" /></a></p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 304px; width: 1px; height: 1px;">&lt;ul id=&#8221;incomeList&#8221; class=&#8221;checkboxes nostyle clearfix&#8221;&gt;<br />
&lt;%<br />
foreach (var i in ViewData.Model.Income)<br />
{%&gt;<br />
&lt;li class=&#8221;item&#8221;&gt;<br />
&lt;div class=&#8221;backgroundRpt rounded&#8221;&gt;<br />
&lt;%foreach (var f in i.Factors){<br />
var isChecked = f.UserValue != 0 ? &#8220;checked&#8221; : &#8220;&#8221;;<br />
%&gt;<br />
&lt;div class=&#8221;checkbox&#8221;&gt;<br />
&lt;input id=&#8221;incomeFactor&lt;%:f.FactorId%&gt;&#8221; type=&#8221;checkbox&#8221; &lt;%:isChecked%&gt; value=&#8221;&lt;%=f.Id%&gt;_&lt;%=f.FactorValue%&gt;&#8221;/&gt;<br />
&lt;label for=&#8221;incomeFactor&lt;%:f.FactorId%&gt;&#8221;&gt;<br />
&lt;span class=&#8221;amount&#8221; id=&#8221;factor&lt;%=i.ItemId%&gt;&#8221;&gt;&lt;%=Html.FormatCurrency(((f.FactorValue) * -1).ToString(&#8220;c&#8221;))%&gt;&lt;/span&gt;<br />
&lt;%:f.FactorTitle%&gt;<br />
&lt;/label&gt;<br />
&lt;a href=&#8221;#&#8221; class=&#8221;modallink linkButton rounded&#8221; title=&#8221;&lt;%=f.FactorTitle%&gt;&#8221;&gt;read more&lt;span class=&#8221;ui-icon ui-icon-circle-zoomin&#8221;&gt;&lt;/span&gt;&lt;/a&gt;<br />
&lt;span class=&#8221;modaldetail&#8221;&gt;&lt;%:f.FactorDescription%&gt;&lt;/span&gt;<br />
&lt;/div&gt;<br />
&lt;h4&gt;Consequence&lt;/h4&gt;<br />
&lt;ul class=&#8221;consequencesCount nostyle clearfix&#8221;&gt;<br />
&lt;li class=&#8221;consequence &lt;%:f.UserConsequence.Css%&gt;&#8221;&gt;<br />
&lt;%Html.RenderPartial(&#8220;ConsequenceLink&#8221;, f.UserConsequence);%&gt;<br />
&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;%}%&gt;<br />
&lt;/div&gt;<br />
&lt;/li&gt;<br />
&lt;%}%&gt;<br />
&lt;/ul&gt;</div>
]]></content:encoded>
			<wfw:commentRss>http://www.smartredfox.com/2010/06/ie6-items-moving-when-hovering-over-another-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TimeBot &#8211; Automated timesheets using Bluetooth</title>
		<link>http://www.smartredfox.com/2010/01/timebot-is-here/</link>
		<comments>http://www.smartredfox.com/2010/01/timebot-is-here/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 15:39:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[Uncategorised]]></category>

		<guid isPermaLink="false">http://www.smartredfox.com/?p=196</guid>
		<description><![CDATA[For a while now I&#8217;ve been working on a simple way for people to record their working hours and create timesheets automatically, and now it&#8217;s finally ready for release. Timebot is an automated system that checks to see if someone is onsite by looking for their mobile phone or bluetooth enabled device. Timebot is easy and quick to configure, and saves a users time out to Google Calendar for easy management and sharing. Take a look now &#8211; any feedback &#8230; <a href="http://www.smartredfox.com/2010/01/timebot-is-here/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.smartredfox.com/timebot/"><img class="alignright colorbox-196" title="TimeBot" src="http://www.smartredfox.com/timebot/wp-content/uploads/2010/01/timebotpart1.png" alt="TimeBot is released!" width="200" height="200" /></a>For a while now I&#8217;ve been working on a simple way for people to record their working hours and create timesheets automatically, and now it&#8217;s finally ready for release.</p>
<p><a href="http://www.smartredfox.com/timebot/">Timebot</a> is an automated system that checks to see if someone is onsite by looking for their mobile phone or bluetooth enabled device. <a href="../timebot/">Timebot</a> is easy and quick to configure, and saves a users time out to Google Calendar for easy management and sharing.</p>
<p><a href="http://www.smartredfox.com/timebot/">Take a look now</a> &#8211; any <a href="http://www.smartredfox.com/timebot/contact/">feedback is greatly appreciated</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smartredfox.com/2010/01/timebot-is-here/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Image buttons in an Asp:datagrid for edit/cancel/update</title>
		<link>http://www.smartredfox.com/2009/03/image-buttons-in-an-aspdatagrid-for-editcancelupdate/</link>
		<comments>http://www.smartredfox.com/2009/03/image-buttons-in-an-aspdatagrid-for-editcancelupdate/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 09:45:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[Uncategorised]]></category>

		<guid isPermaLink="false">http://www.smartredfox.com/?p=128</guid>
		<description><![CDATA[Just recently I had to style an asp datagrid that another developer had created. Now almost all of our default styles for this site use simple image buttons for actions but the datagrid automatically pumps out the Edit, Cancel, and Delete buttons as plain text. Unfortunately Microsoft have given very little control to designers/developers over what is pumped out onto the page, so it&#8217;s pretty much a link, or an input button as standard. I had a brief look for &#8230; <a href="http://www.smartredfox.com/2009/03/image-buttons-in-an-aspdatagrid-for-editcancelupdate/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<dl id="attachment_130" class="wp-caption alignright" style="width: 282px;">
<dt class="wp-caption-dt"><img class="size-full wp-image-130 colorbox-128" title="Text buttons" src="http://www.smartredfox.com/wp-content/uploads/2009/03/nobuttons.png" alt="The Datagrid with text links." width="272" height="221" /></dt>
</dl>
<p>Just recently I had to style an asp datagrid that another developer had created. Now almost all of our default styles for this site use simple image buttons for actions but the datagrid automatically pumps out the Edit, Cancel, and Delete buttons as plain text. Unfortunately Microsoft have given very little control to designers/developers over what is pumped out onto the page, so it&#8217;s pretty much a link, or an input button as standard.</p>
<p>I had a brief look for a way around this and found lots of people with similar problems but no perfect way round this problem.</p>
<p>The simplest way I found around the problem is to put an image tag into the text attribute. E.g.:</p>
<p><span id="more-128"></span></p>
<p><span style="color: #999999;"><strong>&lt;asp:EditCommandColumn HeaderText=&#8221;Actions&#8221; ButtonType=&#8221;LinkButton&#8221; UpdateText=&#8221;<span style="color: #333399;">&lt;img src=&#8217;../images/buttons/small/updatesmall.png&#8217; alt=&#8217;Update&#8217; /&gt;</span>&#8221; CancelText=&#8221;<span style="color: #333399;">&lt;img src=&#8217;../images/buttons/small/cancelsmall.png&#8217; alt=&#8217;Cancel&#8217; /&gt;</span>&#8221; EditText=&#8221;<span style="color: #333399;">&lt;img src=&#8217;../images/buttons/small/editsmall.png&#8217; alt=&#8217;Edit&#8217; /&gt;</span>&#8220;&gt;&lt;/asp:EditCommandColumn&gt;</strong></span></p>
<p>This does work but it doesn&#8217;t have any hover effects on mouse over,  nor does it allow you to use <a href="http://www.alistapart.com/articles/sprites/" target="_blank">css sprites</a> to keep load times down. In this case it also meant that I&#8217;d have to create seperate images for every action.</p>
<p>So what I did instead was the following; I added an itemStyleCssClass attribute to the EditCommandColumn with my button style on it, then I put span&#8217;s into the text for Edit, Cancel, and Update that have a specific class for each button type:</p>
<p><span style="color: #999999;"><strong>&lt;asp:EditCommandColumn HeaderText=&#8221;Actions&#8221;<span style="color: #333399;"> ItemStyle-CssClass=&#8221;grey_small_circle&#8221;</span> ButtonType=&#8221;LinkButton&#8221; UpdateText=&#8221;<span style="color: #333399;">&lt;span class=&#8217;tick&#8217;&gt;Update&lt;/span&gt;</span>&#8221; CancelText=&#8221;<span style="color: #333399;">&lt;span class=&#8217;cancel&#8217;&gt;Cancel&lt;/span&gt;</span>&#8221; EditText=&#8221;<span style="color: #333399;">&lt;span class=&#8217;edit&#8217;&gt;Edit&lt;/span&gt;</span>&#8220;&gt;&lt;/asp:EditCommandColumn&gt;</strong></span></p>
<p>Then I added the following CSS:</p>
<pre class="brush: css">

/*Create buttons and add hover effect */

.grey_small_circle a{background:url(/admin/images/buttons/medium/grey_small_circle.png) no-repeat 0 0;display:block;line-height:30px;margin-top:1px;outline:none;width:31px}
.grey_small_circle a:hover,a:hover.grey_small_circle{background-position:0 -30px;color:#00affc;text-decoration:none}

/* Add the image inside */

.grey_small_circle span{background:transparent url(/images/icons/medium/all.png) no-repeat -288px -252px;display:block;height:30px;text-indent:-9000px;width:32px}

.grey_small_circle span.edit{background-position:-242px -201px}
.grey_small_circle span.redcross{background-position:-13px -252px}
.grey_small_circle span.remove{background-position:-427px -357px}
</pre>
<dl id="attachment_132" class="wp-caption alignleft" style="width: 369px;">
<dt class="wp-caption-dt"><img class="size-full wp-image-132 colorbox-128" title="Datagrid with hover buttons." src="http://www.smartredfox.com/wp-content/uploads/2009/03/withbuttons.png" alt="Datagrid with hover buttons." width="359" height="284" /></dt>
</dl>
<p>This css adds the grey circle in the background of the buttons (see the screenshot) and makes the hover work using the <a href="http://www.alistapart.com/articles/slidingdoors/" target="_blank">sliding doors technique</a>.</p>
<p>I then use <a href="http://www.alistapart.com/articles/sprites/" target="_blank">css sprites</a> for putting an action image onto each button (using the class we assigned to the span), this technique speeds up load times and stops the unstyled pauses when a user hovers over a button. The last lines of the css attach a sheet of sprites  (in this case the excellent <a href="http://www.pinvoke.com/" target="_blank">PI Diagona icons from pinvoke</a>) and moves them depending on which button needs to be displayed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smartredfox.com/2009/03/image-buttons-in-an-aspdatagrid-for-editcancelupdate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox very slow with Visual Studio and Vista</title>
		<link>http://www.smartredfox.com/2008/09/firefox-very-slow-with-visual-studio-and-vista/</link>
		<comments>http://www.smartredfox.com/2008/09/firefox-very-slow-with-visual-studio-and-vista/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 10:00:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorised]]></category>

		<guid isPermaLink="false">http://www.smartredfox.com/?p=57</guid>
		<description><![CDATA[Today I ran into a strange bug that saw me and another developer pulling our hair out, and reverting back to older and older code trying to work out when we introduced the bug. The problem is this: we have a drag and drop desktop page that does an ajax call when a module is moved (it&#8217;s based on Jquery and Ajaxpro). It all worked fine a few days ago, and it worked fine on our test server that runs &#8230; <a href="http://www.smartredfox.com/2008/09/firefox-very-slow-with-visual-studio-and-vista/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.smartredfox.com/wp-content/uploads/2008/10/visual_studio.png"><img class="size-full wp-image-61 alignleft colorbox-57" style="border: 1px solid #ccc;" title="visual_studio" src="http://www.smartredfox.com/wp-content/uploads/2008/10/visual_studio.png" alt="Microsoft Visual Studio" width="321" height="209" /></a></p>
<p>Today I ran into a strange bug that saw me and another developer pulling our hair out, and reverting back to older and older code trying to work out when we introduced the bug.</p>
<p>The problem is this: we have a drag and drop desktop page that does an ajax call when a module is moved (it&#8217;s based on Jquery and Ajaxpro). It all worked fine a few days ago, and it worked fine on our test server that runs IIS, but in the local development environment (Visual Studio 2008 using its local web server) it runs really slow in Firefox3. Other browsers seem fine &#8211; we tested with Chrome, and IE7 with no problems.</p>
<p>After I managed to narrow down that the problem doesn&#8217;t occur once we publish the current code to an IIS box I started to do a little Google fu&#8230;</p>
<p>The problem was actually simple -  It looks like this is a problem with Firefox&#8217;s IPv6 setting. <strong>To fix it type About:config into the address bar in Firefox, Agree to the warning message, and then navigate to the net.dns.DisableIPv6 setting. Double click this setting to set it to true, and close the tab.</strong> That&#8217;s it! The problem should now be fixed.</p>
<p>Credit where credit is due &#8211; I found the <a title="Code Poetry" href="http://codepoetry.wordpress.com/2007/03/27/firefox-very-slow-on-localhost-connections-on-vista/">fix here</a> through my Google fu.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smartredfox.com/2008/09/firefox-very-slow-with-visual-studio-and-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

