<?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>Dylan Butler » San Diego Freelance Web Development and Consultation &#187; css</title>
	<atom:link href="http://www.dylanbutler.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dylanbutler.com</link>
	<description></description>
	<lastBuildDate>Fri, 26 Aug 2011 04:05:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Lunascript makes building web 2.0 applications much easier</title>
		<link>http://www.dylanbutler.com/2010/02/lunascript-makes-building-web-2-0-applications-much-easier/</link>
		<comments>http://www.dylanbutler.com/2010/02/lunascript-makes-building-web-2-0-applications-much-easier/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 19:40:36 +0000</pubDate>
		<dc:creator>Dylan</dc:creator>
				<category><![CDATA[Cool]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[asana]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[lunascript]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.dylanbutler.com/?p=196</guid>
		<description><![CDATA[Rumored to have gotten their idea while at a bar, Dustin Moskovitz (Facebook co-founder and former CTO) and former-Googler/Facebooker Justin Rosenstein have undertaken a revolutionary project aiming to eliminate 90% of repetitive code facing most web developers today. Modern web &#8230; <a href="http://www.dylanbutler.com/2010/02/lunascript-makes-building-web-2-0-applications-much-easier/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Rumored to have gotten their idea while at a bar, Dustin Moskovitz (Facebook co-founder and former CTO) and former-Googler/Facebooker Justin Rosenstein have undertaken a revolutionary project aiming to eliminate 90% of repetitive code facing most web developers today.</p>
<p>Modern web developers often feel like they repeat a lot of code. When we come up with a unique idea, usually that amounts to being only around 10% of our code, the rest is needlessly complicated and tedious. Enter <a href="http://asana.com/" target="_blank">Lunascript</a> &#8211; &#8220;an in-house programming language for writing rich web applications in about 10% of the time and code you can today.&#8221;</p>
<blockquote><p>At Asana, we&#8217;re building a Collaborative Information Manager that we believe will make it radically easier for groups of people to get work done. Writing a complex web application, we experienced pain all too familiar to authors of &#8220;Web 2.0&#8243; software (and interactive software in general): there were all kinds of extremely difficult programming tasks that we were doing over and over again for every feature we wanted to write.</p></blockquote>
<p>I am definitely going to try this out. The language seems very straightforward and could be very helpful in speeding up the development phase.<br />
<a href="http://asana.com/" target="_blank">Read More</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dylanbutler.com/2010/02/lunascript-makes-building-web-2-0-applications-much-easier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FireFox 3.5 is finally out</title>
		<link>http://www.dylanbutler.com/2009/07/firefox-3-5-is-finally-out/</link>
		<comments>http://www.dylanbutler.com/2009/07/firefox-3-5-is-finally-out/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 20:25:27 +0000</pubDate>
		<dc:creator>Dylan</dc:creator>
				<category><![CDATA[Cool]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[cool stuff]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://www.dylanbutler.com/?p=153</guid>
		<description><![CDATA[So last week Mozilla released FireFox 3.5, which introduces some awesome new features, all of which can be found on the Mozilla release notes page. The ones I&#8217;m most excited about are the newly supported CSS properties, improved JavaScript capabilities &#8230; <a href="http://www.dylanbutler.com/2009/07/firefox-3-5-is-finally-out/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-155" title="get-firefox" src="http://www.dylanbutler.com/wp-content/uploads/2009/07/get-firefox.jpg" alt="get-firefox" width="411" height="547" /></p>
<p>So last week Mozilla released FireFox 3.5, which introduces some awesome new features, all of which can be found on the<a href="http://www.mozilla.com/en-US/firefox/3.5/releasenotes/" target="_blank"> Mozilla release notes page</a>.</p>
<p>The ones I&#8217;m most excited about are the <a href="https://developer.mozilla.org/En/Firefox_3.5_for_developers" target="_blank">newly supported CSS properties, improved JavaScript capabilities (through TraceMonkey), SVG features, and HTML 5 support</a>.</p>
<p>Now we can do things like use downloadable fonts (goodbye sIFR!), specify border images, achieve amazing shadow and border effects, use the CANVAS tag, and it looks like they even included <a href="https://developer.mozilla.org/En/HTTP_access_control" target="_blank">cross-domain XMLHTTPRequests</a>.</p>
<p>How practical all this will become only time can tell. We know other browsers are including like features, so we can only hope developers will keep visitors and security in mind as they build applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dylanbutler.com/2009/07/firefox-3-5-is-finally-out/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple drop-downs using YAHOO.util.Dom.isAncestor</title>
		<link>http://www.dylanbutler.com/2009/05/simple-drop-downs-using-yahooutildomisancestor/</link>
		<comments>http://www.dylanbutler.com/2009/05/simple-drop-downs-using-yahooutildomisancestor/#comments</comments>
		<pubDate>Sat, 02 May 2009 17:03:01 +0000</pubDate>
		<dc:creator>Dylan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[drop down]]></category>
		<category><![CDATA[isancestor]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[yahoo]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.dylanbutler.com/?p=109</guid>
		<description><![CDATA[The Yahoo! User Interface Library (YUI) has a bunch of very nifty little methods to make complex tasks easier. One that immediately stood out to me was isAncestor, as I can attest first-hand to the cross-browser troubles when trying to &#8230; <a href="http://www.dylanbutler.com/2009/05/simple-drop-downs-using-yahooutildomisancestor/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The Yahoo! User Interface Library (YUI) has a bunch of very nifty little methods to make complex tasks easier. One that immediately stood out to me was isAncestor, as I can attest first-hand to the cross-browser troubles when trying to detect ancestry in the DOM. Although a very basic concept, most drop-down code often becomes bloated or restrictive. I&#8217;m not advocating the use of JavaScript drop-downs over a CSS method, but there are some added benefits of using JS to achieve this effect:</p>
<ol>
<li>Clean markup, no need for conditional comments</li>
<li>The ability to animate show and hide events</li>
<li>Added styling opportunities, won&#8217;t break so long as the nested list structure remains in tact</li>
</ol>
<p>Below is a simple example of how to use YUI&#8217;s isAncestor to create flyout menus with HTML and CSS.</p>
<pre class="prettyprint">(function() {
	function mouseover(e) {
		var menu = this.getElementsByTagName('ul')[0];
		YAHOO.util.Dom.setStyle(menu, 'display', 'block');
	};

	function mouseout(e) {
		if (!YAHOO.util.Dom.isAncestor(this, e.relatedTarget) || e.relatedTarget == document.getElementsByTagName('html')[0]) {
			var menu = this.getElementsByTagName('ul')[0];
			YAHOO.util.Dom.setStyle(menu, 'display', 'none');
		}
	};
	YAHOO.util.Event.on(YAHOO.util.Dom.get('nav').getElementsByTagName('li'), 'mouseover', mouseover);
	YAHOO.util.Event.on(YAHOO.util.Dom.get('nav').getElementsByTagName('li'), 'mouseout', mouseout);
})();</pre>
<p><a href="/classwork/random/yui_dropdowns.htm">See Example »</a></p>
<p>If you need something more complex, see the <a href="/2008/08/yui-generic-showhide-code/">YUI MenuCreator</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dylanbutler.com/2009/05/simple-drop-downs-using-yahooutildomisancestor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YUI MenuCreator : generic show/hide code</title>
		<link>http://www.dylanbutler.com/2008/08/yui-generic-showhide-code/</link>
		<comments>http://www.dylanbutler.com/2008/08/yui-generic-showhide-code/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 01:03:25 +0000</pubDate>
		<dc:creator>Dylan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[menus]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.dylanbutler.com/?p=66</guid>
		<description><![CDATA[At work I frequently encounter designs that utilize a mouseover show/mouseout hide menu that usually consists of a trigger (often an A tag, or LI element) and a menu (often a DIV, or a UL). Due to the browser inconsistencies &#8230; <a href="http://www.dylanbutler.com/2008/08/yui-generic-showhide-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://pint.com/" target="_blank">work</a> I frequently encounter designs that utilize a mouseover show/mouseout hide menu that usually consists of a trigger (often an A tag, or LI element) and a menu (often a DIV, or a UL). Due to the browser inconsistencies between event handling and mouseout/mouseover DOM detection, it can be cumbersome to create a menu that is quick to implement (thus cost effective) and most importantly, stable. It also has support for a delay threshold, and the ability to animate show and hide events.</p>
<p><a href="/wp-content/uploads/2008/08/dropdowntest_example1.htm" target="_blank"><img class="alignnone size-full wp-image-67" title="menu" src="http://www.dylanbutler.com/wp-content/uploads/2008/08/menu.gif" alt="" width="530" height="283" /></a><br />
<span id="more-66"></span><br />
Althought I use javascript-free solutions for the majority of drop-downs I make, some menus simply warrant javascript and there&#8217;s no way around it. Perhaps the content inside the menu is interactive, or if javascript support has previously been established, or maybe <strong>the DOM structure requires two oddly placed elements to interact with each other like a normal drop-down would.</strong> Given that some advanced menus require javascript (sorry <a href="http://cssplay.co.uk" target="_blank">Stu Nichols</a>), this method uses javascript. All debates and javascript taboos aside, the code below is capable of creating a consistently stable show/hide relationship between a trigger element and a menu element.</p>
<p>My idea of a menu (it could be a &#8216;drop-down&#8217; or a &#8216;flyout&#8217; menu) usually consists of a trigger (the element that onmouseover reveals the menu) and a menu (the element to be shown). The code below is capable of creating menus out of nested &#8220;semantic&#8221; lists (UL, OL, DL) OR from an array of trigger/menu ID pairs depending on what you pass in as the constructor <code>menu</code> array.</p>
<p>This code requires YAHOO! User Interface Library <em>yahoo-dom-event.js</em>.</p>
<p>This article assumes you already have an HTML/CSS menu in mind. This article does not teach how to write CSS. This code simply provides an outlet for controlling show/hide functionality with javascript. The MenuCreator code basically creates a show/hide relationship between a trigger and a menu element. It&#8217;s purpose is to eliminate the nuances of mouse event handling when creating simple show/hide menus.</p>
<p><strong>Examples:</strong></p>
<ol>
<li><a href="/wp-content/uploads/2008/08/dropdowntest_example1.htm" target="_blank">Example 1 (div menu AND a nested list menu)</a></li>
<li><a href="/wp-content/uploads/2008/08/dropdowntest_example2.htm" target="_blank">Example 2 (complex example of a div menu)</a></li>
<li><a href="http://www.viewsonic.com/" target="_blank">Example 3 (used on a live site)</a></li>
</ol>
<p>The usage is simple:</p>
<ol>
<li>Once you have your CSS and HTML setup to look the way you want, add the MenuCreator code to your page:
<pre class="prettyprint">var MenuCreator = function(obj) {
	for (var oMenu in obj.menus) {
		(function(index) {
			var trigger = (obj.menus[index].trigger) ? YAHOO.util.Dom.get(obj.menus[index].trigger) : YAHOO.util.Dom.get(obj.menus[index]);
			var menu = (obj.menus[index].id) ? YAHOO.util.Dom.get(obj.menus[index].id) : YAHOO.util.Dom.get(obj.menus[index]).lastChild;

			if (!trigger || !menu || !obj.show || !obj.hide) return;

			function enterLink(e) {
				obj.show(trigger,menu);
				YAHOO.util.Event.stopEvent(e);
			}

			function exitLink(e) {
				if (!e) var e = window.event;
				if (e.stopPropagation) e.stopPropagation();
				else e.cancelBubble = true;
				var relTarg = e.relatedTarget || e.toElement;
				if (relTarg != menu) {
					obj.hide(trigger, menu);
					return false;
				}
				YAHOO.util.Event.stopEvent(e);
			}

			function exitField(e) {
				if (!e) var e = window.event;
				var tg = (window.event) ? e.srcElement : e.target;
				if (e.stopPropagation) e.stopPropagation();
				else e.cancelBubble = true;
				if (tg.nodeName != 'DIV' &amp;&amp; tg.nodeName != 'UL') return;
				var reltg = (e.relatedTarget) ? e.relatedTarget : e.toElement;
				while (reltg != tg &amp;&amp; reltg.nodeName != 'BODY' &amp;&amp; reltg.nodeName != 'HTML') {
					if (reltg == this) return;
					reltg = reltg.parentNode
				}
				if (reltg == tg) return;
				obj.hide(trigger, menu);
				YAHOO.util.Event.stopEvent(e);
			}

			YAHOO.util.Event.on(trigger, 'mouseover', enterLink);
			YAHOO.util.Event.on(trigger, 'mouseout', exitLink);
			YAHOO.util.Event.on(menu, 'mouseout', exitField);
		}(oMenu));
	}
};</pre>
</li>
<li>Create the menu by passing in an array of menu/trigger ID pairs and a show function and a hide function.
<pre class="prettyprint">var divMenu = new MenuCreator({
	menus: [{
		id: 'box1',
		trigger: 'tab1' },
	{
		id: 'box2',
		trigger: 'tab2'},
	{
		id: 'box3',
		trigger: 'tab3'
	}],
	show:function(trigger,menu) {
		YAHOO.util.Dom.addClass(trigger, 'hover');
		menu.style.display = "block";
	},
	hide:function(trigger,menu) {
		YAHOO.util.Dom.removeClass(trigger, 'hover');
		menu.style.display = "none";
	}
});</pre>
</li>
</ol>
<p><strong>Requires</strong><br />
<em>yahoo-dom-event.js</em><br />
Include this file by placing this above the MenuCreator code.</p>
<p><strong>FAQ</strong><br />
<em>Why provide a custom show/hide function?</em><br />
Often the specific things that need to happen on a successful show/hide differ from menu to menu, so abstracting them from the MenuCreator seemed more logical.</p>
<pre>&lt;script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/yahoo-dom-event/yahoo-dom-event.js"&gt;&lt;/script&gt;</pre>
<p><em>Why is a bulky menu creator solution like this (after yahoo-dom-event.js) useful?</em><br />
Most programmers prefer to use one JavaScript library (if any) for a web site. This code is most useful for a web site that is already using YUI (like all <a href="http://pint.com" target="_blank">Pint</a> web sites, where YUI is included by default).</p>
<p><em>Why not use something like <a href="http://www.alistapart.com/articles/dropdowns" target="_blank">suckerfish</a> drop downs?</em><br />
Suckerfish drop downs only support nested lists with links in them. Suckerfish code is not a robust solution for complex HTML menus. MenuCreator offers a convenient way to deal with multiple javascript hover interfaces.</p>
<p><strong>Assumptions</strong></p>
<ol>
<li>Assumes the menus are hidden by default (using display:none, visibility:hidden, or however else you wish).</li>
<li>Assumes the show/hide events are mouseover/mouseout events.</li>
</ol>
<p><strong>Special Thanks</strong><br />
Peter Paul-Koch (quirksmode) for his <a href="http://www.quirksmode.org/js/events_mouse.html" target="_blank">mouse event</a> DOM solutions.</p>
<p>Diana Chan who wrote <a href="http://ev3.net" target="_blank">the prototype</a> for this entire snippet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dylanbutler.com/2008/08/yui-generic-showhide-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

