<?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>Endikos &#187; CSS</title>
	<atom:link href="http://www.endikos.com/category/css/feed" rel="self" type="application/rss+xml" />
	<link>http://www.endikos.com</link>
	<description>Journeying through the art and science of digital media.</description>
	<lastBuildDate>Sun, 11 Jul 2010 23:53:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Negative Z-Index Values in Firefox 2</title>
		<link>http://www.endikos.com/css/negative-z-index-values-in-firefox-2.html</link>
		<comments>http://www.endikos.com/css/negative-z-index-values-in-firefox-2.html#comments</comments>
		<pubDate>Fri, 21 Nov 2008 03:24:59 +0000</pubDate>
		<dc:creator>Endikos</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.endikos.com/?p=37</guid>
		<description><![CDATA[I discovered that negative z-index values and Firefox two aren't on speaking terms.]]></description>
			<content:encoded><![CDATA[<p><em>[Note: This post has been moved to ThreeBit Media, my consulting website.]</em></p>
<p>I discovered recently that Firefox 2 can&#8217;t handle negative CSS z-index values.  Apparently it throws any element with a negative z-index applied to it beneath the body.  I discovered this after I had already positioned elements on a page and found some improperly indexed elements on testing IE.  So instead of reworking all my existing z-index values, I just gave the offending element a negative value.  This worked in Firefox 3, IE7, Safari, and even IE6.  I thought all was golden until a co-worker&#8217;s brother called and said &#8220;Do you know your site doesn&#8217;t work in Firefox 2?&#8221;.</p>
<p>Frankly, it never even occurred to me to check different versions of Firefox.  I know this seems obvious, but Firefox had always been so consistent for me, I hadn&#8217;t thought about checking multiple versions.  So I loaded up FF2 on my Windows VM (I normally run a Mac with windows installed in a Virtual Machine to do cross-browser testing and other windows-specific things), and sure enough, we have a whole lot of nastiness. Dang. So now I rework all my z-index values like I should have in the first place, and all is good again.</p>
<p>This has been a public service announcement. Carry on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.endikos.com/css/negative-z-index-values-in-firefox-2.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Link Targets, Web Standards, and jQuery</title>
		<link>http://www.endikos.com/web-standards/link-targets-web-standards-and-jquery.html</link>
		<comments>http://www.endikos.com/web-standards/link-targets-web-standards-and-jquery.html#comments</comments>
		<pubDate>Fri, 14 Nov 2008 20:12:51 +0000</pubDate>
		<dc:creator>Endikos</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.endikos.com/?p=10</guid>
		<description><![CDATA[[Note: This post has been moved to ThreeBit Media, my consulting website.]
As you may or may not be aware, XHTML 1.0 Strict does not include the old &#8220;target&#8221; attribute of a link.  In other words, you can no longer code thusly in order to tell the client browser that you&#8217;d like the clicked link to [...]]]></description>
			<content:encoded><![CDATA[<p><em>[Note: This post has been moved to ThreeBit Media, my consulting website.]</em></p>
<p>As you may or may not be aware, XHTML 1.0 Strict does not include the old &#8220;target&#8221; attribute of a link.  In other words, you can no longer code thusly in order to tell the client browser that you&#8217;d like the clicked link to open in a new window:</p>
<pre class="code">&lt;a href="http://some.domain"
           target="_blank"&gt;Clicky!&lt;/a&gt;</pre>
<p>So what does one do if you still want to open a link in a new window while still maintaining the integrity of your XHTML document? There have been many proposed solutions to this, but they basically devolve to two basic theories: 1) <a rel="external" href="http://www.sitepoint.com/article/standards-compliant-world/">Use javascript to make it work</a>; and 2) <a rel="external" href="http://www.accessify.com/features/tutorials/new-windows/">Extend the DTD to reinclude the old target attribute</a>.  I tend to agree more with using javascript to make it work.  Please don&#8217;t misunderstand.  In an ideal world, extending the DTD would be awesome.  Afterall, extensibility is part and partial to the whole XHTML idea.  But in practice, I fear this would introduce too many interoperability issues between browsers.</p>
<p><span id="more-10"></span></p>
<p>So in order to open links in new windows you mark the tag as an &#8220;external&#8221; link using the rel tag, like this:</p>
<pre class="code">&lt;a href="some.domain" rel="external"&gt;Clicky!&lt;/a&gt;</pre>
<p>Most articles I&#8217;ve read have been similar to the SitePoint article I linked to earlier, in that they use javascript like this to make any link tag with a rel attribute of &#8220;external&#8221; open in a new window:</p>
<pre class="code">&lt;script type="text/javascript"&gt;
  function externalLinks() {
    if (!document.getElementsByTagName) return;
    var anchors = document.getElementsByTagName("a");
    for (var i=0; i&lt;anchors.length; i++) {
      var anchor = anchors[i];
      if (anchor.getAttribute("href") &amp;&amp;
        anchor.getAttribute("rel") == "external")
          anchor.target = "_blank";
    }
}
window.onload = externalLinks;
&lt;/script&gt;</pre>
<p>Enter jQuery. I&#8217;ve recently grown quite fond of this javascript framework.  It&#8217;s elegant and powerful.  While the above code is simple and straightforward,  I&#8217;m already using jQuery, so why not just let it do the heavy lifting?  We code it this way:</p>
<pre class="code">&lt;script type="text/javascript"&gt;
  $(function(){
    $("a[rel='external']").attr("target", "_blank");
    //update! '@' attribute syntax was deprecated
    //in jquery 1.2.  now just need the attribute
    //by itself.
  });
&lt;/script&gt;</pre>
<p>And in this manner, bliss is attained :-)  Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.endikos.com/web-standards/link-targets-web-standards-and-jquery.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
