<?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>engfer(s) &#187; CSS</title>
	<atom:link href="http://www.engfers.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.engfers.com</link>
	<description>» scrumptions blog &#038; code » nothing more, nothing less</description>
	<lastBuildDate>Tue, 06 Oct 2009 21:52:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Internet Explorer Doesn&#8217;t Evaluate Any More Than 31 Style Elements</title>
		<link>http://www.engfers.com/2008/10/30/internet-explorer-doesnt-evaluate-any-more-than-31-style-elements/</link>
		<comments>http://www.engfers.com/2008/10/30/internet-explorer-doesnt-evaluate-any-more-than-31-style-elements/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 18:37:17 +0000</pubDate>
		<dc:creator>engfer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[ie quirks]]></category>

		<guid isPermaLink="false">http://www.engfers.com/?p=751</guid>
		<description><![CDATA[Any version of Microsoft Internet Explorer will not evaluate any more than 31 CSS style elements. I&#8217;m not sure if many of you readers have come across this ridiculous bug, but we thought best if you were at least forewarned. The Bug The bug itself is described by Microsoft in the article listed below. The [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-752 aligncenter" title="ie_fail_header" src="http://www.engfers.com/wp-content/uploads/2008/10/ie_fail_header.png" alt="" width="450" height="85" /></p>
<p>Any version of Microsoft Internet Explorer will not evaluate any more than 31 <abbr title="Cascading Style Sheets">CSS</abbr> style elements. I&#8217;m not sure if many of you readers have come across this <strong>ridiculous </strong>bug, but we thought best if you were at least forewarned.</p>
<p><span id="more-751"></span><div align="center"><script type="text/javascript"><!--
google_ad_client = "pub-9461422058527053";
google_ad_slot = "5057152483";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div></p>
<h3 class="hrule"><span style="color: #3366ff;">The Bug</span></h3>
<p>The bug itself is described by Microsoft in the article listed below. The funny thing is that they say the number of style elements parsed is 30; however, it&#8217;s actually 31.</p>
<ul>
<li><strong><a href="http://support.microsoft.com/kb/262161">http://support.microsoft.com/kb/262161</a></strong></li>
</ul>
<h3 class="hrule"><span style="color: #3366ff;">Normal Circumstances</span></h3>
<p>Under normal circumstances, you would never really run into a situation that would require your page to have 31+ style elements on your web page. However, when one is developing in a <strong>portal environment</strong>, you would be surprised at how quickly that can happen; JSR-168 portlets and other 3rd party apps can have their own way of styling HTML that you have no control over.</p>
<p>We actually came across this when migrating the <abbr title="Business Intelligence">BI</abbr> reporting tool <abbr title="Business Intelligence and Reporting Tools">BIRT</abbr> from v2.2 to v2.3. In v2.3 we noticed that the reports displayed fine in Firefox/etc, but they looked like un-styled garbage in Internet Explorer. It took quite a while to figure out that BIRT v2.3 put all of their CSS properties inside <em>&lt;style/&gt; blocks</em>; BIRT v2.2 the CSS properties were <em>inline attributes</em> on the elements (i.e. style=&#8221;bleh&#8230;&#8221;).</p>
<p>Anyways, when you have a web page that has 31 style elements (either within &lt;head/&gt; or &lt;body/&gt;), everything displays fine in all browsers as you can see in the figure below.</p>
<p style="text-align: center;"><img class="size-full wp-image-757 aligncenter" title="Test using 31 Style Elements..." src="http://www.engfers.com/wp-content/uploads/2008/10/style_test_normal.png" alt="" /></p>
<h3 class="hrule"><span style="color: #3366ff;">Abnormal Circumstances&#8230;</span></h3>
<p>Well, what happens to IE under these abnormal circumstances with web pages with 32 or more &lt;style/&gt; elements?</p>
<p style="text-align: center;"><img class="size-full wp-image-758 aligncenter" title="style_test_ie_fail" src="http://www.engfers.com/wp-content/uploads/2008/10/style_test_ie_fail.png" alt="" /></p>
<p><strong>What does every other browser look like?</strong> They look correct.</p>
<p style="text-align: center;"><img class="size-full wp-image-756 aligncenter" title="style_test_good" src="http://www.engfers.com/wp-content/uploads/2008/10/style_test_good.png" alt="" width="381" height="219" /></p>
<h3 class="hrule"><span style="color: #3366ff;">The Code</span></h3>
<p>Here is the code to see the bug yourself&#8230;.</p>
<pre>&lt;html&gt;
&lt;<span class="start-tag">head</span>&gt;
  &lt;<span class="start-tag">title</span>&gt;Style Element Test&lt;/<span class="end-tag">title</span>&gt;

  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #1 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #2 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #3 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #4 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #5 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #6 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #7 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #8 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #9 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #10 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #11 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #12 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #13 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #14 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #15 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #16 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #17 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #18 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #19 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #20 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #21 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #22 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #23 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #24 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #25 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #26 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #27 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #28 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #29 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #30 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: blue; }    /** Style block #31 */
  &lt;/<span class="end-tag">style</span>&gt;
  &lt;<span class="start-tag">style</span><span class="attribute-name"> type</span>=<span class="attribute-value">"text/css"</span>&gt;
    .green_me { color: green; }    /** Style block #32 */
  &lt;/<span class="end-tag">style</span>&gt;

&lt;/<span class="end-tag">head</span>&gt;
&lt;<span class="start-tag">body</span>&gt;
  &lt;<span class="start-tag">h1</span><span class="attribute-name"> class</span>=<span class="attribute-value">"green_me"</span>&gt;I Should Be Green!!!&lt;/<span class="end-tag">h1</span>&gt;
&lt;/<span class="end-tag">body</span>&gt;
&lt;/<span class="end-tag">html</span>&gt;</pre>
<h3 class="hrule"><span style="color: #3366ff;">Workarounds<br />
</span></h3>
<p><span style="text-decoration: line-through;">Well, there aren&#8217;t any real &#8220;workarounds&#8221;</span>. <strong></strong></p>
<p><span style="color: #ff0000;"><strong>UPDATE: 2008-11-04</strong>: Maybe I&#8217;m not making my point. The point here is <strong>NOT to condone using &lt;style&gt; tags like crazy</strong> and have 30+ on your page; <span style="text-decoration: underline;"><strong>let me say that again</strong></span>; the point here is <strong>NOT to condone using &lt;style&gt; tags like crazy!!!</strong> The point of this article is to make people aware of the issue and what a quick production hotfix might look like. </span></p>
<p><span style="color: #ff0000;">I&#8217;m sorry my diction sucked and I chose to use &#8220;<em>bug</em>&#8221; over &#8220;<em>limitation</em>&#8220;; sue me! Either way, I think Microsoft needs to fix it!<br />
</span></p>
<p>The <strong>server-side</strong> <span style="text-decoration: line-through;">solutions</span> options are pretty obvious:</p>
<ul>
<li>Condense CSS into less (or a <strong>single</strong>) &lt;style/&gt; elements <span style="color: #ff0000;"><strong>(good)</strong></span></li>
<li>Put CSS into an <strong>external file</strong> and use the &lt;link/&gt; tag <span style="color: #ff0000;"><strong>(best)</strong></span></li>
<li>Add the correct CSS onto the <strong>inline atribute, &#8220;style&#8221;</strong>, on each element.<span style="color: #ff0000;"> <strong>(not as good)</strong></span></li>
</ul>
<p><span style="color: #ff0000;"><strong>UPDATE: 2008-11-04</strong>: Paul Davis mentioned below in the comments the most correct solution. I don&#8217;t know why I didn&#8217;t mention it. The solution is to have some response filter servlet or class that will condense the style tags for you. By doing this you don&#8217;t have to go to your 3rd party vendors and complain because they don&#8217;t use external stylesheets.</span></p>
<p><span style="color: #ff0000;">We all know what the best practices for CSS are; we just need to be aware of the limitations that will affect our judgment and implementation.</span></p>
<p>The <strong>client-side</strong> <span style="text-decoration: line-through;">solutions</span> options are non-trivial <span style="color: #ff0000;"><strong>(and really should NOT be used unless a production hotfix is needed!!)</strong></span>:</p>
<ul>
<li>With JavaScript, manually parse the &#8220;forgotten&#8221; &lt;style/&gt; elements and add them to the last &#8220;unforgotten&#8221; DOM  stylsheet (<code>document.styleSheets[ document.styleSheets.length ]</code>).</li>
<li>With JavaScript, manually parse the &#8220;forgotten&#8221; &lt;style/&gt; elements and then apply the style to each respective element/selector.</li>
</ul>
<p>Using <strong><a href="http://jquery.com">jQuery</a></strong>, here is an example of how to <span style="text-decoration: underline;"><span style="color: #ff0000;"><strong>temporarily</strong></span></span> fix this <strong>client-side</strong>&#8230;</p>
<pre>$(document).ready(function(){
  // If msie and we have more than the allotted stylsheets...
  if ( $.browser.msie &amp;&amp; $('style').length != document.styleSheets.length ) {
    var ssAry = $('style');
    // Loop through the extra stylesheets not read and apply the styles found
    for ( var i = document.styleSheets.length; i &lt; ssAry.length; i++ ) {
      var cssText = ssAry[ i ].innerHTML;
      // Replace newlines and then comments
      cssText = cssText.replace(/[\n\r]/g, "");
      cssText = cssText.replace(/\/\*\**[^\*\/]*\*\//g, "");

      // Loop over all CSS selector groups...
      var regex = new RegExp(/{[^}]*}/);
      for ( var value = regex.&#101;xec( cssText ); value; value = regex.&#101;xec( cssText ) ) {
        // Split the css grouping into the selector and the CSS properties
        var pair = cssText.substring( 0, regex.lastIndex )
                          .replace(/}/g, "").split(/{/);
        // Add it to the last DOM stylesheet
        document.styleSheets[ document.styleSheets.length - 1 ].addRule(
          pair[ 0 ].replace(/^\s+|\s+$/g, ""),
          pair[ 1 ].replace(/^\s+|\s+$/g, "")
        );
        // Strip off the applied CSS
        cssText = cssText.substring( regex.lastIndex );
      }
    }
  }
});</pre>
<p><strong>Make sure you fully understand the above code before you copy/paste it!!!</strong><br />
<div align="center"><script type="text/javascript"><!--
google_ad_client = "pub-9461422058527053";
google_ad_slot = "5057152483";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.engfers.com/2008/10/30/internet-explorer-doesnt-evaluate-any-more-than-31-style-elements/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Google Chrome CSS Selector Speeds Compared</title>
		<link>http://www.engfers.com/2008/09/15/google-chrome-css-selector-speeds-compared/</link>
		<comments>http://www.engfers.com/2008/09/15/google-chrome-css-selector-speeds-compared/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 15:45:48 +0000</pubDate>
		<dc:creator>engfer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[chrome]]></category>

		<guid isPermaLink="false">http://www.engfers.com/?p=386</guid>
		<description><![CDATA[Google somewhat surprised us all and released it&#8217;s web browser on Sept. 2, 2008; most users of the shiny new browser have been extremely impressed with the initial speed and features. I have to say that even I am impressed by this new browser (as long as I&#8217;m not behind a corporate firewall).  Since the [...]]]></description>
			<content:encoded><![CDATA[<p><div style="float: left; padding: 0px 5px 5px 0px;"><script type="text/javascript"><!--
google_ad_client = "pub-9461422058527053";
google_ad_slot = "3901277195";
google_ad_width = 300;
google_ad_height = 250;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div> Google somewhat surprised us all and released it&#8217;s<a href="http://googleblog.blogspot.com/2008/09/google-chrome-now-live.html"> web browser on Sept. 2, 2008</a>; most users of the shiny new browser have been <em>extremely </em>impressed with the initial speed and features. I have to say that even I am impressed by this new browser (as long as I&#8217;m <strong><a href="http://www.engfers.com/2008/09/02/google-chrome-behind-a-corporate-proxy-a-long-way-to-go/">not behind a corporate firewall</a></strong>).  Since the <a href="http://news.cnet.com/8301-1001_3-10030888-92.html">CNET article</a> came out about the extreme speed of Google Chrome, I immediately wondered how it would perform against other browsers in the <a href="http://mootools.net">mootools.net</a> tool <a href="http://mootools.net/slickspeed/"><strong>Slickspeed</strong></a> CSS selectors test, so I decided to do some benchmarking of my own.</p>
<p><span id="more-386"></span></p>
<h3 class="hrule"><span style="color: #3366ff;">The Setup</span></h3>
<p>To do some benchmarking I downloaded the &#8220;mootools-developed&#8221; <a href="http://mootools.net/slickspeed/">Slickspeed</a> PHP framework from it&#8217;s <a href="http://code.google.com/p/slickspeed/"><strong>Google Code hosted location</strong></a>, along with <a href="http://www.apachefriends.org/en/xampp.html"><strong>XAMPP</strong></a> to serve up the PHP pages required for the tests.</p>
<h4><span style="color: #ff0000;">Hardware</span></h4>
<ul>
<li>2007 Compac nc8430</li>
<li>Intel Dual-Core T2500 @ 2.00GHz</li>
<li>1.00 GB RAM</li>
</ul>
<h4><span style="color: #ff0000;">Software</span></h4>
<ul>
<li>MS Windows XP Professional SP 2</li>
<li><a href="http://www.apachefriends.org/en/xampp-windows.html#641">XAMPP 1.6.7</a></li>
<li>Slickspeed (svn trunk version)</li>
</ul>
<h4><span style="color: #ff0000;">Browsers</span></h4>
<ul>
<li>Safari 3.1.1</li>
<li>Opera 9.5.2</li>
<li>Firefox 3.0.1</li>
<li>Internet Explorer 7.0.5730</li>
<li>Chrome 0.2.149.27</li>
</ul>
<h4><span style="color: #ff0000;">JavaScript Libraries</span></h4>
<ul>
<li>Mootools 1.2</li>
<li>jQuery 1.2.6</li>
<li>Prototype 1.6.0.2</li>
</ul>
<p>I only downloaded 3 JS libraries because I thought that was enough to tell the difference between the browsers; this isn&#8217;t meant as an exercise at &#8220;who has the fastest JS library&#8221;.</p>
<p>To generate the results I installed XAMPP, installed slickspeed and set it up with the 3 JS libraries; then I opened each browser one at a time and ran the local copy of the slickspeed test:</p>
<p style="padding-left: 30px;">This test runs <strong>40 different CSS selector tests</strong> with whatever JS libraries you have configured atainst <a href="http://www.w3.org/TR/2001/CR-css3-selectors-20011113/"><strong>this W3C document</strong></a>. Each test is run separately in <strong>separate IFRAME tags</strong> as <em>not to interfere</em> with one another and report false data.</p>
<h4><span style="color: #ff0000;">Data Collection</span></h4>
<p>Data was collected by running the above slickspeed setup <strong>10 times</strong> for <strong>each browser</strong>. After each time the test was ran, I recorded the <strong>final time for that browser</strong>.</p>
<p><span style="color: #339966;"><em>** I used the <strong>final time</strong> in the slickspeed test because I was testing for the <strong><span style="text-decoration: underline;">overall</span> effectiveness &amp; speed</strong> of the browsers. If you want to see how it performs on a per test basis, run it yourself!</em></span></p>
<h3 class="hrule"><span style="color: #3366ff;">The Results</span></h3>
<p><strong><span style="color: #3366ff;">Mootools 1.2 Results</span></strong></p>
<p style="text-align: left;">Mootools used to be my favorite JS library. It has some cool features that make it pretty nice (like a stab at code organization using the Class object).</p>
<p style="text-align: center;"><img class="aligncenter" src="http://chart.apis.google.com/chart?&amp;chs=420x690&amp;chtt=Mootools+1.2+Slickspeed+CSS+Selector+Test|Response+Time+Totals%20(in%20milliseconds)&amp;cht=bhg&amp;chco=5f96ff,ff914d,edfe68,55e851,b069c6&amp;chxt=x,y&amp;chxl=1:|Test+10|Test+9|Test+8|Test+7|Test+6|Test+5|Test+4|Test+3|Test+2|Test+1&amp;chbh=9,1,9&amp;chdl=Chrome+0.2.149.27|Safari+3.1.1|Opera+9.5.2|Firefox+3.0.1|IE+7.0.5730&amp;chdlp=t&amp;chd=t:92.00,91.50,106.50,97.25,102.50,98.25,89.25,105.50,92.50,102.75|47.00,58.50,30.75,43.25,39.00,54.50,42.75,42.75,58.75,63.00|66.75,65.75,93.50,136.50,137.25,165.75,171.50,168.25,175.75,159.25|150.25,137.75,149.50,146.25,147.75,153.75,144.50,146.25,147.50,151.50|476.25,481.25,523.25,504.00,498.50,440.75,414.00,449.50,475.75,444.75&amp;chds=0,600&amp;chxr=0,0,600" alt="" /></p>
<p style="text-align: left;">Safari operated the best with the Mootools library. Opera <strong>started out </strong>as a good candidate; however, the longer you kept open the browser and the more times you ran the test, the worse the response time got. Opera will show the same results for other libraries as well.</p>
<p style="text-align: left;">IE sucks, Firefox is good, Chrome is pretty darn good.</p>
<p><strong><span style="color: #3366ff;">JQuery 1.2.6 Results</span></strong></p>
<p style="text-align: center;"><img class="aligncenter" src="http://chart.apis.google.com/chart?&amp;chs=420x690&amp;chtt=JQuery+1.2.6+Slickspeed+CSS+Selector+Test|Response+Time+Totals%20(in%20milliseconds)&amp;cht=bhg&amp;chco=5f96ff,ff914d,edfe68,55e851,b069c6&amp;chxt=x,y&amp;chxl=1:|Test+10|Test+9|Test+8|Test+7|Test+6|Test+5|Test+4|Test+3|Test+2|Test+1&amp;chbh=9,1,9&amp;chdl=Chrome+0.2.149.27|Safari+3.1.1|Opera+9.5.2|Firefox+3.0.1|IE+7.0.5730&amp;chdlp=t&amp;chd=t:58.50,72.00,62.75,75.00,70.00,66.75,28.00,64.25,72.00,67.50|50.75,35.00,42.75,38.75,46.50,59.00,46.75,54.25,46.50,47.75|58.50,70.25,70.50,113.00,124.25,131.75,148.00,169.25,179.25,140.75|147.25,140.50,150.50,149.00,152.50,151.00,148.75,141.25,145.50,151.00|325.25,320.25,371.75,363.00,324.75,292.75,293.50,285.50,301.00,292.50&amp;chds=0,400&amp;chxr=0,0,400" alt="" /></p>
<p style="text-align: left;">What is up Opera? You leaking stuff? No JS garbage collection? I did &#8220;hard&#8221; refreshes so the caches would be expunged; I just don&#8217;t get it.</p>
<p style="text-align: left;">Chrome and Safari FTW. IE bad, bad, bad.</p>
<p style="text-align: left;"><span style="color: #3366ff;"><strong>Prototype 1.6.0.2 Results</strong></span></p>
<p style="text-align: left;">Prototype made IE 7 look like the biggest piece of junk in the world; I have since then see the same results in YUI.  The IE results are an <strong>order of magnitude</strong> <strong>greater </strong>than the speeds of any of the other browsers <strong>combined</strong>. Keep in mind that less is better.</p>
<p style="text-align: center;"><img src="http://chart.apis.google.com/chart?&amp;chs=420x690&amp;chtt=Prototype+1.6.0.2+Slickspeed+CSS+Selector+Test|Response+Time+Totals%20(in%20milliseconds)&amp;cht=bhg&amp;chco=5f96ff,ff914d,edfe68,55e851,b069c6&amp;chxt=x,y&amp;chxl=1:|Test+10|Test+9|Test+8|Test+7|Test+6|Test+5|Test+4|Test+3|Test+2|Test+1&amp;chbh=9,1,9&amp;chdl=Chrome+0.2.149.27|Safari+3.1.1|Opera+9.5.2|Firefox+3.0.1|IE+7.0.5730&amp;chdlp=t&amp;chd=t:89.25,93.00,85.50,103.25,88.00,90.25,98.75,93.00,95.25,91.50|183,164.25,164.25,168.25,172.25,168.00,176.00,191.25,172.00,168.00|70.00,89.50,101.00,161.00,141.25,159.50,184.00,152.00,156.75,172.25|229.75,234.50,235.75,235.25,237.00,232.00,233.25,234.00,229.25,234.75|1636.75,1644.25,1789.50,1838.75,1801.75,1644.75,1628.50,1622.50,1609.75,1617.25&amp;chds=0,1900&amp;chxr=0,0,1900" alt="" /></p>
<p style="text-align: left;">This was an extremely disappointing test; moreover, Opera still showed signs of memory leaks and slowly increasing final result times.</p>
<p style="text-align: left;">Chrome wins this battle; Safari a close second, and <strong>almost </strong>every other browser is not far behind. Yuck IE!</p>
<h3 class="hrule"><span style="color: #3366ff;">Final Results</span></h3>
<p>So now we decided to take the average of all 10 tests and put it onto one chart so you can see the important stuff all summed up.</p>
<p><img src="http://chart.apis.google.com/chart?&amp;chs=460x600&amp;chtt=Average+Slickspeed+CSS+Selector+Test+Response|Time+Totals+(in%20milliseconds)&amp;cht=bvg&amp;chco=5f96ff,ff914d,edfe68,55e851,b069c6&amp;chxt=y,x&amp;chxl=1:|JQuery+1.2.6|Mootools+1.2Prototype+1.6.0.2&amp;chbh=25,1,16&amp;chdl=Chrome+0.2.149.27|Safari+3.1.1|Opera+9.5.2|Firefox+3.0.1|IE+7.0.5730&amp;chdlp=t&amp;chd=t:63.68,97.80,172.73|46.80,48.03,92.78|120.55,144.03,138.73|147.73,147.50,233.55|317.03,470.80,1683.38&amp;chds=0,1700&amp;chxr=0,0,1700" alt="" /></p>
<p style="text-align: left;"><span style="color: #ff0000;"><strong>Final result conclusions&#8230;</strong></span></p>
<ul>
<li>Chrome did <strong>very well</strong> considering it&#8217;s a partial mesh of Safari and Firefox components.</li>
<li>Safari on a local copy of slickspeed did surprisingly <strong>very well</strong>.</li>
<li>Opera is <strong>okay </strong>if you view a web page and then restart the browser. Otherwise, JS applications become slower and slower.</li>
<li>IE needs <strong>a lot of work</strong> (<em>but who didn&#8217;t know that</em> <em><span style="text-decoration: underline;">already</span></em>)</li>
</ul>
<p><div align="center"><script type="text/javascript"><!--
google_ad_client = "pub-9461422058527053";
google_ad_slot = "5057152483";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.engfers.com/2008/09/15/google-chrome-css-selector-speeds-compared/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>The Proper Way to Align Images and Icons with Anchor Tags</title>
		<link>http://www.engfers.com/2008/08/28/the-proper-way-to-align-images-and-icons-with-anchor-tags/</link>
		<comments>http://www.engfers.com/2008/08/28/the-proper-way-to-align-images-and-icons-with-anchor-tags/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 22:09:37 +0000</pubDate>
		<dc:creator>engfer</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.engfers.com/?p=284</guid>
		<description><![CDATA[How many times have some of you tried to add an icon image to an anchor tag (link: &#60;a&#62;) or make some other random image part of that link and have had one-heck-of-a-time trying to align the text of the link and the image (&#60;img&#62;) tag? I know that I have (especially when each browser [...]]]></description>
			<content:encoded><![CDATA[<p>How many times have some of you tried to add an <strong>icon image</strong> to an anchor tag (link: &lt;a&gt;) or make some other random image part of that link and have had<strong> <span style="color: #ff0000;">one-heck-of-a-time</span></strong> <span style="color: #ff0000;"><strong>trying to align the text of the link and the image</strong></span> (&lt;img&gt;) tag?</p>
<p>I know that <span style="text-decoration: underline;">I have</span> (especially when each browser treats the vertical aligning differently)&#8230;</p>
<p>Well here is <em>the <span style="text-decoration: underline;">better</span></em> way of aligning them that will make your life at least <strong>10 times easier</strong> using 0 img tags and 1 anchor tag with CSS styling&#8230;<span id="more-284"></span></p>
<h3 class="hrule"><span style="color: #3366ff;">The Problem</span></h3>
<p>Many times (especially in today&#8217;s web development) you may want to add icons to your links to make them more readable or bring attention to them.  Moreover, many large sites have adopted this <span style="color: #ff0000;"><strong>&#8220;iconified-links&#8221; pattern</strong></span> to make life easier: <strong><a href="http://www.linkedin.com">www.linkedin.com</a>, <a href="http://www.yahoo.com">www.yahoo.com</a></strong> and <strong><a href="http://www.facebook.com">www.facebook.com</a></strong> to name just 3. Well it would be good to have them aligned to make life easier!</p>
<p><strong><span style="text-decoration: underline;">Example</span>: Yahoo! Front Page</strong></p>
<p><a style="float: left" href="http://www.yahoo.com/"><img class="alignnone size-full wp-image-290" title="yahoo_icons" src="http://www.engfers.com/wp-content/uploads/2008/08/yahoo_icons.png" alt="" width="220" height="186" /></a>On yahoo.com&#8217;s front page you can see the main navigation is a set of standard left-navigation links; however, each of those links have a specific icon associated with it.</p>
<p>If you hover over either the link text or the icon, you will see that they are part of the same link.</p>
<p>Moreover, if you inspect the link, you will see that there is no IMG tag.</p>
<p>If you look at the source of the where the image is coming from you will find <a href="http://l.yimg.com/a/i/ww/sp/trough_2.0_062308.gif"><strong>this image</strong></a>&#8230; it&#8217;s a giant &#8220;sprite&#8221; (or collection of images) that represent all of the icons they use.</p>
<p><span style="color: #3366ff;"><strong>The Classical (Wrong) Way&#8230; <img src='http://www.engfers.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
</strong></span></p>
<p>Say that you wanted to try and reproduce this type of behavior with a <strong>Logout button</strong> on your site.  You also want to have some fancy logout icon that you want displayed along with it.</p>
<p>We are going to use the &#8220;door_in&#8221; icon (<img class="alignnone size-full wp-image-295" title="door_in" src="http://www.engfers.com/wp-content/uploads/2008/08/door_in.png" alt="" width="16" height="16" />) from the <a href="http://www.famfamfam.com/lab/icons/silk/"><span style="color: #ff6600;"><strong>Silk Icon</strong></span> collection</a> of Mark James&#8217; site <a href="http://www.famfamfam.com/"><strong>famfamfam.com</strong></a>. Mark did a <em>beautiful job</em> constructing the <strong>1000 icon set</strong>, and I would recommend to anyone to use his icon set with his permission! (See Below)</p>
<p style="text-align: center;"><a href="http://www.famfamfam.com/lab/icons/silk/previews/index_abc.png"><img class="size-full wp-image-289 aligncenter" title="famfamfam_icons" src="http://www.engfers.com/wp-content/uploads/2008/08/famfamfam_icons.png" alt="" width="419" height="171" /></a></p>
<p>So now that we have our logout link and icon, it&#8217;s time to align them like Yahoo! has it (exactly centered). Now there are two ways that using the old way of thinking to go about this&#8230;</p>
<p style="text-align: center;"><img class="size-full wp-image-291 aligncenter" title="old_school" src="http://www.engfers.com/wp-content/uploads/2008/08/old_school.png" alt="" width="415" height="241" /></p>
<p>Ok, so <strong>Option 1 is completely stupid.</strong> Not only do you have to worry about <em>aligning </em>the two elements, you also need to make sure that the link <em>meta-data is the same</em> for both links! So we will automagically rule out Option 1.</p>
<p>Option 2 is a <em>little bit </em>better, so we will work with that. All right, we&#8217;ve used it and now its time to display it in our browser&#8230;</p>
<p>Ok so we already added a &#8216;<strong>border=&#8221;0&#8243;</strong>&#8216; attribute onto our image tag because a useless border is added when you stick images inside links, and now we see that the <em>alignment is off</em> for our image.</p>
<p>So, we adjust it to align=&#8221;center&#8221;&#8230; align=&#8221;top&#8221;&#8230; align=&#8221;bottom&#8221;&#8230; &#8220;middle&#8221;. Still not the results we are looking for, so we adjust the line-height the font-size, etc, etc&#8230; and we end up jumping through hoops just to get them align in IE, then we <em>switch over to Firefox</em>. <span style="color: #ff0000;"><strong>WTH?</strong> <strong>Firefox doesn&#8217;t even align close to what IE shows!</strong></span></p>
<p style="text-align: center;"><img class="size-full wp-image-297 aligncenter" title="icon_align_problem" src="http://www.engfers.com/wp-content/uploads/2008/08/icon_align_problem.png" alt="" width="340" height="176" /></p>
<p>Now you spend the next 3 hours trying to get those to align perfectly in every browser, but now what happens when your link is long and the <strong>lines wrap</strong>? <strong>Ahhhhhhhhhhhhh</strong>!</p>
<p style="text-align: center;"><img class="size-full wp-image-298 aligncenter" title="padding_lost_on_anchor_wrap" src="http://www.engfers.com/wp-content/uploads/2008/08/padding_lost_on_anchor_wrap.png" alt="" width="298" height="171" /></p>
<p>You&#8217;ve just lost all sense of indentation and you have a <span style="color: #ff0000;"><strong>bad solution that can&#8217;t be generalized </strong></span>(<em>not only that but any space you put between your text and the img tag leaves a space which gets put into the link as a <strong>useless underline</strong> &#8216;_&#8217;</em>)!!</p>
<p>Well, read on to stop you from pounding your head against the wall&#8230;<br />
<div align="center"><script type="text/javascript"><!--
google_ad_client = "pub-9461422058527053";
google_ad_slot = "5057152483";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div></p>
<h3 class="hrule"><span style="color: #3366ff;">The Solution</span></h3>
<p><span style="color: #3366ff;"><strong>The Correct Way&#8230; <img src='http://www.engfers.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
</strong></span></p>
<p>When I was staring at Facebook&#8217;s &#8220;iconified&#8221; solution I noticed that there was no image tag used at all; in-fact, there was no image information period!</p>
<p>I then looked a bit deeper and found the secret lines in their CSS code that does the magic for you.</p>
<blockquote><p><span style="color: #ff0000;"><strong>background: transparent url(/images/icon.gif) scroll no-repeat left center;</strong></span></p>
<p><span style="color: #ff0000;"><strong>padding: 2px 0px 2px 20px;</strong></span></p></blockquote>
<p>That&#8217;s it all-of-a-sudden the alignment works and works in all browsers!!! Even indent information is preserved when the text wraps!!! Yay.</p>
<p><span style="color: #3366ff;"><strong>Explained&#8230;</strong></span></p>
<p>First let&#8217;s talk about the attributes we define on the CSS <strong>background </strong>property. It happens to be the shorthand version of about 5 other CSS commands (you should be using the CSS shorthands)</p>
<p><strong>background: [background color] [background image] [background attachment] [background repeat] [background position];</strong></p>
<p style="padding-left: 30px;"><span style="color: #ff6600;">[background color]</span></p>
<p style="padding-left: 30px;">This operates the same way as the <a href="http://www.w3schools.com/css/pr_background-color.asp">CSS <em>background-color</em> property</a>; here, you can specify the background color (<strong><em>transparent </em></strong>is a valid color and is good for when your icons have transparency layers in them) that your element will have.</p>
<p style="padding-left: 30px;"><span style="color: #ff6600;">[background image]</span></p>
<p style="padding-left: 30px;">This operates the same way as the <a href="http://www.w3schools.com/css/pr_background-image.asp">CSS <em>background-image</em> property</a>; this is where you specify any background images.  Valid entries are <em><strong>url(/path/to/image)</strong> </em>and <em>none</em>.<em> </em>**This is where you define your icon image location</p>
<p style="padding-left: 30px;"><span style="color: #ff6600;">[background attachment]</span></p>
<p style="padding-left: 30px;">This operates the same way as the <a href="http://www.w3schools.com/css/pr_background-attachment.asp">CSS <em>background-attachment</em> property</a>; this is where you specify if you want your background to scroll with the page or not. Valid values are <strong><em>scroll</em> </strong>and <em>fixed</em>. &#8220;Fixed&#8221;is rarely used; it represents truly absolutely fixed position items. <em>**We will use &#8220;scroll&#8221; for our purposes</em>.</p>
<p style="padding-left: 30px;"><span style="color: #ff6600;">[background repeat]</span></p>
<p style="padding-left: 30px;">This operates the same way as the <a href="http://www.w3schools.com/css/pr_background-repeat.asp">CSS <em>background-repeat</em> property</a>; here, you specify if you want your image repeated at all, repeated along the x-axis, repeated along the y-axis or repeated along both the x and y axis.  Valid values are <em>repeat</em>, <strong><em>no-repeat</em></strong>, <em>repeat-x</em> and <em>repeat-y</em>. <em>**For our iconified purpose, we don&#8217;t want any repeating so we will use &#8220;no-repeat&#8221;</em>.</p>
<p style="padding-left: 30px;"><span style="color: #ff6600;">[background position]</span></p>
<p style="padding-left: 30px;">This operates the same way as the <a href="http://www.w3schools.com/css/pr_background-position.asp">CSS <em>background-position</em> property</a>. This represents the position that you would like to place the background-image from the <strong>top-left-corner</strong> of your element.  This can be represented by either <strong>two values or </strong><strong>one value</strong>.</p>
<p style="padding-left: 30px;">If you use the <strong>two valued </strong>version, the first value represents the <em>distance</em> from the top left corner <strong>along the X-axis</strong>.  Likewise, the second value represents the <em>distance</em> from the top left corner <strong>along the Y-axis</strong>.</p>
<p style="padding-left: 30px;">If you use the <strong>single valued</strong> version, the <em>only </em>value represents the <em>distance</em> from the top left corner along <strong>both the X and Y axis</strong>.</p>
<p style="padding-left: 30px;">Valid position are: physical distance (3px, 2pt, 1em, 50%, etc) or relative values: <em>top</em>, <em>bottom</em>, <em><strong>center</strong></em>, <em><strong>left</strong></em>, <em>right</em>. <em>**We will use the 2-valued version:&#8221;left&#8221; as our X position and &#8220;center for our Y position<br />
</em></p>
<p>Padding is another short hand and doesn&#8217;t really need to be explained that much.</p>
<p><strong>padding: [padding-top] [padding-right] [padding-bottom] [padding-left];</strong></p>
<p style="padding-left: 30px;">These values all depend on how big our icon images are and how large our text is.</p>
<p>For our example (18px by 18px icon) in normal text, a 2px top and bottom padding and a 20px left padding should do nicely.</p>
<p><span style="color: #3366ff;"><strong>Our Example In Use&#8230;<br />
</strong></span></p>
<p>So now all we have to do is make a smart CSS class that has background and padding set properly&#8230;</p>
<p style="text-align: center;"><img class="size-full wp-image-307 aligncenter" title="icon_align_simple_css" src="http://www.engfers.com/wp-content/uploads/2008/08/icon_align_simple_css.png" alt="" width="412" height="68" /></p>
<p>Now we can just add class=&#8221;iconified&#8221; to <em><strong>any element </strong></em>(not just links)</p>
<p style="text-align: center;"><img class="size-full wp-image-308 aligncenter" title="icon_align_simple" src="http://www.engfers.com/wp-content/uploads/2008/08/icon_align_simple.png" alt="" width="399" height="30" /></p>
<p>Here is the result!</p>
<p style="text-align: center;"><img class="size-full wp-image-309 aligncenter" title="icon_align_good" src="http://www.engfers.com/wp-content/uploads/2008/08/icon_align_good.png" alt="" width="374" height="148" /></p>
<p>What happens if it wraps? (well, it works even more funny in IE; you need to add &#8220;display: block&#8221; to turn your anchor from an inline element to a block element for this to work properly)</p>
<p style="text-align: center;"><img class="size-full wp-image-310 aligncenter" title="padding_maintained_on_anchor_wrap" src="http://www.engfers.com/wp-content/uploads/2008/08/padding_maintained_on_anchor_wrap.png" alt="" width="338" height="170" /></p>
<h3 class="hrule"><span style="color: #3366ff;">Conclusion</span></h3>
<p>There are many uses for combining HTML elements (div, span, td, a, etc) and the CSS background &amp; padding properties besides just fancy icons: fancy bullets, pagination, borders, etc, etc.</p>
<p>Go and experiment with different backgrounds with different positions!</p>
<p>One thing to watch for: png icons have trouble with transparency in IE6 and below and the Twin Helix HTC fix (AlphaImageloader) will need to be applied for elements that use them. My advice is to just save it as a gif and see if the quality is reduced that much.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.engfers.com/2008/08/28/the-proper-way-to-align-images-and-icons-with-anchor-tags/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>IE6/IE7 Anchor Y-Axis Border And Padding Fix</title>
		<link>http://www.engfers.com/2008/08/05/ie6ie7-anchor-y-axis-border-and-padding/</link>
		<comments>http://www.engfers.com/2008/08/05/ie6ie7-anchor-y-axis-border-and-padding/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 15:40:52 +0000</pubDate>
		<dc:creator>engfer</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[ie quirks]]></category>

		<guid isPermaLink="false">http://www.engfers.com/?p=146</guid>
		<description><![CDATA[Problem: Internet Explorer truncates and does not display any vertical padding nor top and bottom borders on an inline element, such as an anchor, inside of a table cell.  Firefox and Safari display correctly without any problems. Here is an example situation where we want to style an anchor tag with some padding inside of [...]]]></description>
			<content:encoded><![CDATA[<h3 class="hrule"><span style="color: #3366ff;">Problem:</span></h3>
<p>Internet Explorer truncates and does not display any vertical padding nor top and bottom borders on an inline element, such as an anchor, inside of a table cell.  Firefox and Safari display correctly without any problems.</p>
<p>Here is an example situation where we want to style an anchor tag with some padding inside of a table cell&#8230;</p>
<p style="TEXT-ALIGN: center"><img class="size-full wp-image-151 aligncenter" title="Padding problem HTML" src="http://www.engfers.com/wp-content/uploads/2008/08/link-html.png" alt="" width="486" height="308" /></p>
<p>Well, we expect to see some border on all sides of the anchor tag with some gray background; however, as we open it in IE, we see&#8230; WHAT?!?!&#8230; the top and bottoms are gone?!?! See below&#8230;</p>
<p style="text-align: center;"><img class="size-full wp-image-157 aligncenter" title="IE Anchor Padding And Border No Worky" src="http://www.engfers.com/wp-content/uploads/2008/08/link_problem.png" alt="" width="340" height="86" /></p>
<p><span id="more-146"></span></p>
<h3 class="hrule"><span style="color: #3366ff;">Solution:</span></h3>
<p>Add the CSS attribute &#8220;<strong><em>position: relative</em></strong>&#8221; and it&#8217;s fixed; nothing more, nothing less. See below.</p>
<p style="text-align: center;"><img class="size-full wp-image-149 aligncenter" title="Corrected Padding with \&quot;position: relative\&quot;" src="http://www.engfers.com/wp-content/uploads/2008/08/link-html_fixed.png" alt="" width="500" height="370" /></p>
<p>Here is what the final result compared looks like&#8230;</p>
<p style="text-align: center;"><img class="size-full wp-image-150 aligncenter" title="IE Link Border / Padding Fix" src="http://www.engfers.com/wp-content/uploads/2008/08/link_fixed.png" alt="IE Link Border / Padding Fixed with &quot;position: relative&quot;" width="423" height="83" /></p>
<h4>Conclusion:</h4>
<p>I wish IE didn&#8217;t suck so much. Next issue to tackle&#8230; why when you do this the padding overflows out of the outer container (just turn on table borders and you&#8217;ll see what I mean)&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.engfers.com/2008/08/05/ie6ie7-anchor-y-axis-border-and-padding/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
