
<?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>merill.net &#187; CSS</title>
	<atom:link href="http://merill.net/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://merill.net</link>
	<description>My utmost for His highest, my best for His glory</description>
	<lastBuildDate>Thu, 02 Feb 2012 21:02:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Sortable Table</title>
		<link>http://merill.net/2003/11/sortable-table/</link>
		<comments>http://merill.net/2003/11/sortable-table/#comments</comments>
		<pubDate>Fri, 07 Nov 2003 14:22:20 +0000</pubDate>
		<dc:creator>Merill Fernando</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">/post/2003/11/Sortable-Table.aspx</guid>
		<description><![CDATA[If you thought the Tab navigation was good, check out the Sort-able grid script. By simply setting a class on any table you can make the headers sortable. The script takes care of numbers, dates and text automatically. Stuart Langridge has released a couple of very neat new Javascript experiments. sorttable makes any data table [...]]]></description>
			<content:encoded><![CDATA[<p><body xmlns="http://www.w3.org/1999/xhtml"></p>
<div class="Section1">
<p>
            If you thought the Tab navigation was good, check out the Sort-able grid script. By<br />
            simply setting a class on any table you can make the headers sortable. The script<br />
            takes care of numbers, dates and text automatically.
        </p>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>
<p>
            Stuart Langridge has released a couple of <em><i>very</i></em> neat new Javascript<br />
            experiments. <a href="http://www.kryogenix.org/code/browser/sorttable/" title="Sortable Tables">sorttable</a> makes<br />
            any data table on a page &#8220;sortable&#8221; by clicking the table headers. I&#8217;ve seen this<br />
            effect <a href="http://msdn.microsoft.com/library/en-us/dndude/html/dude07232001.asp" title="Fun with Tables">used</a> to<br />
            demonstrate Microsoft&#8217;s proprietary &#8220;behaviors&#8221; technology but Stuart&#8217;s solution has<br />
            the advantage of being standards compliant and working across different browsers.<br />
            Best of all, it follows the principles of inobtrusive <acronym>DHTML</acronym> and<br />
            hooks in to the markup using only a class attribute.
        </p>
<p>
            Stuart&#8217;s second experiment, <a href="http://www.kryogenix.org/code/browser/jses/">JavaScript<br />
            Event Sheets</a>, is even more interesting. It tackles the problem of attaching events<br />
            to page elements. The most common way of doing this is with inline attributes, but<br />
            these require adding behavioural (rather than structural) code to your markup and<br />
            can lead to additional maintenance costs further down the road. A better alternative<br />
            is to use the <acronym>DOM</acronym> to dynamically add events, which works fine but<br />
            means tightly coupling the structure of the document to the Javascript that sets up<br />
            the events. Stuart&#8217;s solution is to abstract the logic that attaches events to elements<br />
            out to a separate file, called a Javascript Event Sheet. This uses <acronym>CSS</acronym> style<br />
            syntax (partially handled by my <a href="http://simon.incutio.com/archive/2003/03/25/getElementsBySelector">getElementsBySelector<br />
            function</a>) to specify how events attached to different elements should be handled.<br />
            Stuart demonstrates the idea with a common image rollover:
        </p>
<pre>
<code>img.rollover {</code> </pre>
<pre>
<code> mouseover: rollover_handler;</code> </pre>
<pre>
<code> mouseout: rollout_handler;</code> </pre>
<pre>
<code>}</code> </pre>
<p>
            Stuart&#8217;s blog entries concerning the two new experiments are <a href="http://www.kryogenix.org/days/565.html" title="Sortable tables">here</a> and <a href="http://www.kryogenix.org/days/566.html" title="http://www.kryogenix.org/days/566.html">JavaScript<br />
            Event Sheets</a>.
        </p>
<p class="MsoNormal">
            <br />
            [<a href="http://simon.incutio.com/archive/2003/11/05/mojo">Simon Willison's Weblog</a>]
        </p>
</blockquote></div>
<p></body></p>
]]></content:encoded>
			<wfw:commentRss>http://merill.net/2003/11/sortable-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EasyToggle (Tab Navigation)</title>
		<link>http://merill.net/2003/11/easytoggle-tab-navigation/</link>
		<comments>http://merill.net/2003/11/easytoggle-tab-navigation/#comments</comments>
		<pubDate>Fri, 07 Nov 2003 14:17:32 +0000</pubDate>
		<dc:creator>Merill Fernando</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">/post/2003/11/EasyToggle-(Tab-Navigation).aspx</guid>
		<description><![CDATA[Simon Willison has created an easy way to enable tabs in web pages. There is no javascript coding involved. Just include the .js file and add the class to your links. I&#8217;ve been working on a new inobtrusive DHTML effect: easytoggle, which is an inobtrusive implementation of the common effect where links or tabs can [...]]]></description>
			<content:encoded><![CDATA[<p><body xmlns="http://www.w3.org/1999/xhtml"></p>
<div class="Section1">
<p>
            Simon Willison has created an easy way to enable tabs in web pages. There is no javascript<br />
            coding involved. Just include the .js file and add the class to your links.
        </p>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>
<p>
            I&#8217;ve been working on a new inobtrusive <acronym>DHTML</acronym> effect: <a href="http://simon.incutio.com/code/js/easytoggle/example.html" title="easytoggle demo page">easytoggle</a>,<br />
            which is an inobtrusive implementation of the common effect where links or tabs can<br />
            be clicked to reveal part of a page while hiding the other parts. It&#8217;s similar in<br />
            some ways to the <a href="http://simon.incutio.com/archive/2003/08/12/multiPartForms" title="http://simon.incutio.com/archive/2003/08/12/multiPartForms">Multi<br />
            part forms with Javascript</a> technique.
        </p>
<p>
            The idea is pretty simple &#8211; all you need are a bunch of links and a bunch of elements<br />
            that should be toggled by those links. When adding special behaviour to links it is<br />
            always a good idea to ensure that they still link to something sensible, so that in<br />
            user agents without Javascript support they still do something useful. In this case,<br />
            it makes sense for them to act as anchor links that point to the elements with which<br />
            they are associated. With easytoggle, all you need to do is define the links, point<br />
            them at an element with an ID and assign them the class &#8216;toggle&#8217;. The script does<br />
            the rest of the work. For example, for a simple set with only two panels the markup<br />
            would look something like this:
        </p>
<pre>
<code>&lt;ul&gt;</code> </pre>
<pre>
<code>&lt;li&gt;&lt;a href="#p1" class="toggle"&gt;Panel 1&lt;/a&gt;&lt;/li&gt;</code> </pre>
<pre>
<code>&lt;li&gt;&lt;a href="#p2" class="toggle"&gt;Panel 2&lt;/a&gt;&lt;/li&gt;</code> </pre>
<pre>
<code>&lt;/ul&gt;</code> </pre>
<pre>
<code>&lt;p id="p1"&gt;This is panel 1&lt;/p&gt;</code> </pre>
<pre>
<code>&lt;p id="p2"&gt;This is panel 2&lt;/p&gt;</code> </pre>
<p>
            That&#8217;s all it takes &#8211; the <a href="http://simon.incutio.com/code/js/easytoggle/example.html" title="easytoggle demo page">demo</a> has<br />
            a very slightly more complicated example.
        </p>
<p>
            I thought it was finished, until I tested it in Apple&#8217;s Safari browser. In Safari,<br />
            the worst possible thing happens. The initialisation code which hides all of the panels<br />
            after the first one works fine. Unfortunately, the code that causes the links to change<br />
            which panel is visible fails silently, leaving only the first panel accessible to<br />
            users with that browser. That&#8217;s a big problem.
        </p>
<p>
            It was at this point that I discovered that Safari&#8217;s support for debugging Javascript <em><i>sucks<br />
            rocks</i></em>. Firstly, the browser gives no indication that a bug has been encountered.<br />
            I&#8217;m sure this is a deliberate usability decision, but it also means users who encounter<br />
            a bug won&#8217;t even know that there is a problem with the site. A quick Google led me<br />
            to <a href="http://www.macosxhints.com/article.php?story=20030906093300383" title="Safari and Javascript debugging">this<br />
            page</a>, which told me how to enable Javascript error reporting:
        </p>
<ol start="1" type="1">
<li class="MsoNormal" style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-list:l0 level1 lfo1'>
                <span style=''>In a command line shell, execute</span> <code>defaults write com.apple.Safari<br />
                IncludeDebugMenu 1</code> (apparently <a href="http://www.lordofthecows.com/safari_enhancer.php" title="http://www.lordofthecows.com/safari_enhancer.php">Safari<br />
                Enhancer</a> lets you do this from a <acronym>GUI</acronym>).</li>
<li class="MsoNormal" style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-list:l0 level1 lfo1'>
                <span style=''>Reload Safari and check the &#8220;Log Javascript Exceptions&#8221; option in the<br />
                newly enabled Debug menu.</span>
            </li>
<li class="MsoNormal" style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-list:l0 level1 lfo1'>
                <span style=''>Start Console.app, which lives in</span><br />
                <samp><br />
                    /Application/Utilities</samp>. Note that this is <em><i>not the same thing</i></em> as<br />
                the command line console. This took me a few moments to figure out. Macs remain a<br />
                strange new realm of discovery.</li>
<li class="MsoNormal" style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; mso-list:l0 level1 lfo1'>
                <span style=''>Javascript exceptions will now appear in the Console.app window.</span>
            </li>
</ol>
<p>
            Excellent &#8211; just what I needed to know. The entire error message I got when I clicked<br />
            a link? <code><span style=''>(event handler):Undefined value</span></code>. Gee, thanks<br />
            a lot Safari. If anyone has any ideas how I can fix the script in Safari (or at the<br />
            very least prevent it from being unusable) please leave me a note.
        </p>
<p>
            <strong><b>Update:</b></strong> Thanks to <a href="http://simon.incutio.com/archive/2003/11/06/easytoggle#comment1">a<br />
            tip</a> from David Lindquist, <a href="http://simon.incutio.com/code/js/easytoggle/example2.html" title="easytoggle demo page (updated version)">the<br />
            updated version of the script</a> now works in Safari. It&#8217;s a little bit uglier though.
        </p>
<p class="MsoNormal">
            <br />
            [<a href="http://simon.incutio.com/archive/2003/11/06/easytoggle">Simon Willison's<br />
            Weblog</a>]
        </p>
</blockquote></div>
<p></body></p>
]]></content:encoded>
			<wfw:commentRss>http://merill.net/2003/11/easytoggle-tab-navigation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Styling Forms With CSS</title>
		<link>http://merill.net/2003/07/styling-forms-with-css/</link>
		<comments>http://merill.net/2003/07/styling-forms-with-css/#comments</comments>
		<pubDate>Fri, 25 Jul 2003 11:13:31 +0000</pubDate>
		<dc:creator>Merill Fernando</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">/post/2003/07/Styling-Forms-With-CSS.aspx</guid>
		<description><![CDATA[Lachlan shows how to style forms using CSS.]]></description>
			<content:encoded><![CDATA[<p><body xmlns="http://www.w3.org/1999/xhtml"></p>
<p>
        Lachlan <a href="http://illuminosity.net/thoughts/archives/2003/July/21/22:46:45/">shows</a> how<br />
        to style forms using CSS.
    </p>
<p></body></p>
]]></content:encoded>
			<wfw:commentRss>http://merill.net/2003/07/styling-forms-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

