<?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>Whimsical.Nu &#187; css</title>
	<atom:link href="http://whimsical.nu/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://whimsical.nu</link>
	<description>A whimsical blog by a whimsical girl with five different psyches: girl, geek, reader, writer, and gamer</description>
	<lastBuildDate>Fri, 03 Feb 2012 08:02:01 +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>Resolution week: a geeky thing for 2011</title>
		<link>http://whimsical.nu/2011/01/11/resolution-week-a-geeky-thing-for-2011/</link>
		<comments>http://whimsical.nu/2011/01/11/resolution-week-a-geeky-thing-for-2011/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 03:00:00 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[2011]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[resolution]]></category>

		<guid isPermaLink="false">http://whimsical.nu/?p=11862</guid>
		<description><![CDATA[I&#8217;ve realized only recently that everything I&#8217;m using right now to create websites and in my day-to-day work, I&#8217;ve learnt on my own, from scratch. I learned HTML in 1998, by viewing source code and trying to replicate what I&#8217;ve seen. I built on that knowledge by making my own websites: about myself, about books and series that I loved, communities like the long-forgotten web rings and those cute little adoptable graphics. (Which brings me to another point: I learned to make graphics and some pixel art from those days, too.) I learned CSS shortly after, as I made websites,...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sxc.hu/photo/642559"><img class="alignright size-full wp-image-12236" title="Studying ahead" src="http://whimsical.nu/wp-content/uploads/2011/01/studying_ahead.jpg" alt="Studying ahead" width="300" height="199" /></a>I&#8217;ve realized only recently that everything I&#8217;m using right now to create websites and in my day-to-day work, I&#8217;ve learnt on my own, from scratch.</p>
<p><em>I learned <acronym title="HyperText Markup Language">HTML</acronym> in 1998</em>, by viewing source code and trying to replicate what I&#8217;ve seen. I built on that knowledge by making my own websites: about myself, about books and series that I loved, communities like the long-forgotten web rings and those cute little adoptable graphics. (Which brings me to another point: I learned to make graphics and some pixel art from those days, too.)</p>
<p><em>I learned <acronym title="Cascading Style Sheets">CSS</acronym> shortly after</em>, as I made websites, starting from the shiny that is absolute positioning and continuing on to learn about fluid layouts, floating, the box model, etc. as I went along. My shrines and cutesy sites made way to personal journals and blogs.</p>
<p><em>I learned <acronym title="Pre-Hypertext Processing">PHP</acronym> on my own in 2002 or 2003</em>, after I started liking Python for web apps but found it difficult to find an affordable web host with Python&#8211;<acronym title="Pre-Hypertext Processing">PHP</acronym> was much more available. I used it for small websites&#8211;directories, cliques, and making my own little script to manage fanlistings, which were becoming a big part of what I did online. (I wish I could say I learned <acronym title="Structured Query Language">SQL</acronym> on my own, but not really&#8211;I took up database courses in college.)</p>
<p><em>JavaScript, ah JavaScript. I learned bits and pieces</em>, but generally disliked it, until I <em>needed</em> to learn for work; I think a framework certainly makes it easier to wrap your head around, and while JavaScript won&#8217;t be in my list of top languages, I do find that I enjoy working with it nowadays&#8211;it&#8217;s an ongoing process, and I learn more and more as I continue to use it in what I build.</p>
<p>I think it speaks a lot of how learning for yourself, and using it as you learn, is one of the best ways to learn. And this year, <em>I think it&#8217;s high time I learn something new again, and use it in something I build while I learn.</em></p>
<p>I haven&#8217;t decided what the new tool will be&#8211;a new framework? a new language?&#8211;nor the product, for that matter. But I do know that making time for pet projects opened me up to much more than just the enjoyment of creating and building for myself, that it&#8217;s something I want to do for myself this year.</p>
<p><strong>So in 2011, I&#8217;ll learn and create something new.</strong></p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2011/01/11/resolution-week-a-geeky-thing-for-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FF: CSS Optimization Tips</title>
		<link>http://whimsical.nu/2008/09/12/ff-css-optimization-tips/</link>
		<comments>http://whimsical.nu/2008/09/12/ff-css-optimization-tips/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 05:00:10 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[alphaimageloader filter]]></category>
		<category><![CDATA[cascading stylesheets]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[website optimization]]></category>
		<category><![CDATA[website performance]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=281</guid>
		<description><![CDATA[A lot can be gained in terms of website performance by the wise use of cascading stylesheets and styles on the website, and these are relatively easy things to accomplish. They revolve around styles and stylesheet placement. Stylesheets at the top One important rule is placing stylesheets at the top, within the HEAD tags. While most browsers will load all styles eventually regardless of placement on the page, putting styles in the HEAD helps the page load progressively, giving users visual feedback that hey, something is loading. One of the worst things that could happen if your styles aren&#8217;t in...]]></description>
			<content:encoded><![CDATA[<p><em>A lot can be gained in terms of website performance by the wise use of cascading stylesheets and styles on the website</em>, and these are relatively easy things to accomplish. They revolve around styles and stylesheet placement.</p>
<h4>Stylesheets at the top</h4>
<p>One important rule is placing stylesheets at the top, within the <code>HEAD</code> tags. While most browsers will load all styles eventually regardless of placement on the page, <em>putting styles in the <code>HEAD</code> helps the page load progressively, giving users visual feedback</em> that hey, something is loading. One of the worst things that could happen if your styles aren&#8217;t in the <code>&lt;head&gt;</code> tag is that the page does load&#8211;but there are <a href="http://www.bluerobot.com/web/css/fouc.asp/">no styles attached to your <acronym title="HyperText Markup Language">HTML</acronym> elements</a>, and then the page flickers to include the styles. It&#8217;s like going out without your clothes on, and then going back in to put them on.</p>
<h4>Externalizing stylesheets</h4>
<p>Styles can be included in the page source code itself in two ways: either within <code>&lt;style&gt;...&lt;/style&gt;</code> tags, or within the <code>style</code> attribute of an <acronym title="HyperText Markup Language">HTML</acronym> element. These are the &#8220;easiest&#8221; to do, however, <em>it&#8217;s better if you put style rules in an external <code>.css</code> file</em>, for a number of reasons:</p>
<ol>
<li><em><acronym title="Cascading Style Sheets">CSS</acronym> files can be cached for users, and subsequent returns to your page serves the <acronym title="Cascading Style Sheets">CSS</acronym> from the user&#8217;s cache instead of asking your server for a copy for download.</em> Your page file size is smaller since it doesn&#8217;t have style rules associated with it, and the external stylesheet itself isn&#8217;t downloaded on subsequent visits if it&#8217;s stored in the visitor&#8217;s cache.</li>
<li><em>Other pages on your website can reuse this same external stylesheet.</em> The optimization gains to this obviously means that all your pages will have a smaller size since there aren&#8217;t any styles on the source code itself. The <em>development</em> gains, however, are even better: one change in one file can update all your styles for your pages.</li>
</ol>
<p>If your website uses a lot of inline styles, it may be quite a challenge to move them out to external stylesheets. It will usually mean a lot of editing and updating of files, the complexity of which depends on how fragmented your styles are.</p>
<h4>Linking stylesheets instead of importing</h4>
<p>There are two ways of including external stylesheets: via the use of the <code>&lt;link&gt;</code> tag, or <code>@import</code>. The former links your stylesheet to your page, and the latter imports one stylesheet into another. The two ways look like below:</p>
<pre><code>&lt;link href="styles.css" type="text/css"&gt;
&lt;style type="text/css"&gt;@import url("styles.css");&lt;/style&gt;</code></pre>
<p><code>@import</code> can be used to hide styles from earlier browsers, but <em>in Internet Explorer, it behaves the same as using <code>&lt;link&gt;</code> at the bottom of the page</em>&#8211;which pretty much negates the above best practices I&#8217;ve talked about.</p>
<h4><acronym title="Cascading Style Sheets">CSS</acronym> expressions are evil</h4>
<p>Okay, so Internet Explorer is quirky. Sometimes <acronym title="Cascading Style Sheets">CSS</acronym> expressions seem to be the only way to fix it&#8211;I&#8217;ve seen a couple of <acronym title="Internet Explorer">IE</acronym> fixes/hacks that require <acronym title="Cascading Style Sheets">CSS</acronym> expressions. They look similar to:</p>
<pre><code>width:expression(document.body.clientWidth &gt; 799? "800px": "auto" );</code></pre>
<p><em>Unfortunately, they&#8217;re run pretty much every time the user interacts with the page: they&#8217;re run on page render, on browser resize, on page scroll, or even if the mouse moves over the page.</em> If one needs to dynamically set styles, use JavaScript. If you really, really need to use an expression, use one that, in the end, overrides the style declaration so that it&#8217;s only run once.</p>
<h4><acronym title="Internet Explorer">IE</acronym> filters are also evil</h4>
<p>The most frequent use nowadays of <a href="http://www.ssi-developer.net/css/visual-filters.shtml"><acronym title="Internet Explorer">IE</acronym> <acronym title="Cascading Style Sheets">CSS</acronym> filters</a> are to fix <acronym title="Portable Network Graphics">PNG</acronym> images in Internet Explorer 6 via the <a href="http://msdn.microsoft.com/en-us/library/ms532969.aspx">AlphaImageLoader filter</a>:</p>
<pre><code>&lt;div style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='pngimage.png',sizingMethod='scale');"&gt;&lt;/div&gt;</code></pre>
<p><em>However, this filter stops rendering and freezes the browser while the image is being downloaded</em>, and since it&#8217;s done per element and not per image, each time this element shows up in the browser, you&#8217;ll get a bit of a freeze. It&#8217;s better to gracefully degrade to using PNG8 which works fine in <acronym title="Internet Explorer 6">IE6</acronym>. If there&#8217;s no way out of using the AlphaImageLoader filter, user the underscore hack (<code>_filter</code>) or other <acronym title="Internet Explorer 6">IE6</acronym>-only hacks to keep the style rule limited to <acronym title="Internet Explorer 6">IE6</acronym> users.</p>
<p>Good luck with optimizing your stylesheets! You can take a look at the other posts in this optimization series below:</p>
<ol>
<li><a href="http://scripts.indisguise.org/2008/08/29/ff-website-optimization/">Website Optimization</a></li>
<li><a href="http://scripts.indisguise.org/2008/09/05/ff-minimizing-http-requests/">Minimizing <acronym title="HyperText Transfer Protocol">HTTP</acronym> Requests</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/09/12/ff-css-optimization-tips/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FF: Minimizing HTTP Requests</title>
		<link>http://whimsical.nu/2008/09/05/ff-minimizing-http-requests/</link>
		<comments>http://whimsical.nu/2008/09/05/ff-minimizing-http-requests/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 04:00:10 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css sprites]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[http requests]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[website optimization]]></category>
		<category><![CDATA[website performance]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=273</guid>
		<description><![CDATA[As I mentioned last week, I&#8217;ll be talking about a few of my favorite techniques for making websites load faster&#8211;the rules and practices that I find interesting and intriguing as a web developer obsessed with a dash of challenge. ;) One of the best ways to speed up website performance is by reducing the number of HTTP requests the website makes &#8212; it&#8217;s the first rule in YDN&#8217;s Best Practices for Speeding up your Web Site and YSlow, which is arranged according to what technique would have the most impact on your page&#8217;s performance. This rule can be quite tedious...]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://scripts.indisguise.org/2008/08/29/ff-website-optimization/">I mentioned last week</a>, I&#8217;ll be talking about a few of my favorite techniques for making websites load faster&#8211;the rules and practices that I find interesting and intriguing as a web developer obsessed with a dash of challenge. ;)</p>
<p><strong>One of the best ways to speed up website performance is by reducing the number of <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests the website makes</strong> &#8212; it&#8217;s the first rule in <a href="http://developer.yahoo.com/performance/rules.html">YDN&#8217;s Best Practices for Speeding up your Web Site</a> and <a href="http://developer.yahoo.com/yslow/">YSlow</a>, which is arranged according to what technique would have the most impact on your page&#8217;s performance. This rule can be quite tedious to do when optimizing a current website/layout, so the best case, really, is to start a project with this in mind.</p>
<p>The article explains it well, so I&#8217;ll just quote them (italics mine):</p>
<blockquote><p>80% of the end-user response time is spent on the front-end. <em>Most of this time is tied up in downloading all the components in the page</em>: images, stylesheets, scripts, Flash, etc. Reducing the number of components in turn reduces the number of <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests required to render the page. This is the key to faster pages.</p></blockquote>
<p>The use of <a href="http://alistapart.com/articles/sprites"><acronym title="Cascading Style Sheets">CSS</acronym> sprites</a> has been around for quite a while now, and is the best way to reduce the number of <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests to your server. A <acronym title="Cascading Style Sheets">CSS</acronym> sprite is basically multiple images combined into one single, larger image, which is then positioned into your <acronym title="HyperText Markup Language">HTML</acronym> elements via <acronym title="Cascading Style Sheets">CSS</acronym>.</p>
<p>Can you imagine the conversation between the browser and the server for either case?</p>
<blockquote><p><em>Browser:</em> Give me the background for the Index menu item.<br />
<em>Server:</em> Here you go, it will take around 1 second.<br />
<em>Browser:</em> While I&#8217;m getting that, can you also get me the background for the Blog menu item?<br />
<em>Server:</em> Here it is, another second for that.<br />
<em>Browser:</em> And let&#8217;s not forget the background for the About menu item, too.<br />
<em>Server:</em> Of course, here you go, you&#8217;ll get it in a second.<br />
&#8230;</p></blockquote>
<p>As opposed to when you use a <acronym title="Cascading Style Sheets">CSS</acronym> sprite for your menu items:</p>
<blockquote><p><em>Browser:</em> Give me the background image for the navigation menu items.<br />
<em>Server:</em> Here you go, it will take a bit less than 2 seconds.</p></blockquote>
<p>Short and sweet.</p>
<p>Note, however, that <em>if your visitors are predominantly dialup users, this might not be a good rule for you to follow</em> &#8212; mostly because you really can&#8217;t stuff any more data into that pipe than that pipe can handle. It <em>will</em> take longer for them to download the image, which will affect their perception of the website, as opposed to an image that gets downloaded faster and shows up on their browser faster. Remember those old-school rules about slicing header images? That&#8217;s basically rooted in that scenario: dialup can only download so much, so give them a couple <em>parts</em> of the header to download and see immediately. What’s best for your website depends on your target visitors.</p>
<p>There are a couple of <acronym title="Cascading Style Sheets">CSS</acronym> sprite tutorials and generators around:</p>
<ul>
<li><a href="http://www.csssprites.com/"><acronym title="Cascading Style Sheets">CSS</acronym> Sprites Generator</a> &#8211; a simple generator, giving the sprites in <acronym title="Portable Network Graphics">PNG</acronym> and <acronym title="Graphics Interchange Format">GIF</acronym> and giving background positions for each image</li>
<li><a href="http://spritegen.website-performance.org/">Website Performance&#8217;s <acronym title="Cascading Style Sheets">CSS</acronym> Sprite Generator</a> &#8211; contains a lot more extra configuration options for sprite generation if you want finer control, allows you to choose what image format to generate</li>
<li><a href="http://www.alistapart.com/articles/sprites">A List Apart&#8217;s <em><acronym title="Cascading Style Sheets">CSS</acronym> Sprites: Image Slicing&#8217;s Kiss of Death</em> article</a></li>
<li><a href="http://css-tricks.com/css-sprites-what-they-are-why-theyre-cool-and-how-to-use-them/"><acronym title="Cascading Style Sheets">CSS</acronym> Sprites: What They Are, Why They&#8217;re Cool, and How To Use Them</a></li>
<li><a href="http://stylemeltdown.com/2007/10/22/image-sprite-navigation-with-css/">Image Sprite Navigation With <acronym title="Cascading Style Sheets">CSS</acronym></a></li>
</ul>
<p>&#8230;to name a few. If you&#8217;re just getting started with spriting, I&#8217;d suggest you create your sprite manually in your preferred image editing application before trying one of the generators and work on something simple like navigation or lists with icons for the first few times. This should give you a better grasp of what happens with a sprite.</p>
<p>Something to keep in mind: <em>sprites will add complexity to maintaining your design.</em> Adding another image to an existing sprite, updating your <acronym title="Cascading Style Sheets">CSS</acronym> code to reflect that (and possibly impacting current <acronym title="Cascading Style Sheets">CSS</acronym> rules on other images using that same sprite) is slightly more time-consuming than just uploading a new image and a new <acronym title="Cascading Style Sheets">CSS</acronym> rule to use that single image. And of course, the more images on a single sprite, the more difficult it is to keep that image and the accompanying <acronym title="Cascading Style Sheets">CSS</acronym> rules maintainable. One of the ways to combat this is to organize sprites according to use. As opposed to one &uuml;ber-sprite containing everything and the dust on the coffee table, a sprite for navigation and a sprite for list items separately is easier to maintain and organize.</p>
<p>Good luck with minimizing your <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests!</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/09/05/ff-minimizing-http-requests/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Frontend Friday: Implementation focus on Indiscript&#8217;s lettered menu</title>
		<link>http://whimsical.nu/2008/07/11/frontend-friday-implementation-focus-on-indiscripts-lettered-menu/</link>
		<comments>http://whimsical.nu/2008/07/11/frontend-friday-implementation-focus-on-indiscripts-lettered-menu/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 00:00:22 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[implementation focus]]></category>
		<category><![CDATA[menus]]></category>
		<category><![CDATA[navigation menus]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[sprites]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=209</guid>
		<description><![CDATA[For this week&#8217;s Frontend Friday I wanted to get a little more technical, and decided on focusing on and working though the implementation of Indiscript&#8217;s menus &#8212; the main navigation up top, and the script highlights on the sidebar: What&#8217;s interesting about this implementation is that if I were to rename sections around, add new scripts to the sidebar, and otherwise need &#8220;new&#8221; menu items, I&#8217;ll never need to do anything more than just add the menu/link item, and every menu item or link presented this way makes use of just one 61.5kb image. When I was working with the...]]></description>
			<content:encoded><![CDATA[<p>For this week&#8217;s <em>Frontend Friday</em> I wanted to get a little more technical, and decided on <strong>focusing on and working though the implementation of Indiscript&#8217;s menus</strong> &#8212; the main navigation up top, and the script highlights on the sidebar:</p>
<p><a href='http://whimsical.nu/wp-content/uploads/2008/07/mainmenu1.png'><img src="http://whimsical.nu/wp-content/uploads/2008/07/mainmenu1.png" alt="" title="Scripts.Indisguise.Org main navigation" width="500" height="47" class="alignnone size-full wp-image-210" /></a></p>
<p>What&#8217;s interesting about this implementation is that if I were to rename sections around, add new scripts to the sidebar, and otherwise need &#8220;new&#8221; menu items, I&#8217;ll never need to do anything more than just add the menu/link item, and every menu item or link presented this way makes use of just one 61.5kb image.</p>
<p>When I was working with the Indiscripts revamp, I knew I wanted something relatively simple, light, and easy to implement and extend for if/when I need to add new sections to the website. Usually that meant that artsy menu items were out&#8230;but I didn&#8217;t want to give up so easily. <em>The result is the menu/link style you see now: an artsy letter serves as a background, usually in plain grey. The active menu item is green, and when you&#8217;re hovering over it, it becomes orange. If I wanted to use blue, pink, yellow, brown, etc&#8211;that&#8217;s all possible, with the help of <acronym title="Cascading Style Sheets">CSS</acronym> and <acronym title="Portable Network Graphics">PNG</acronym>.</em></p>
<p>To make sure I have everything ready for if/when the time comes to add sections, I prepared a sprite image containing all the letters of the alphabet. For the uninitiated, a sprite (in terms of web development/<acronym title="Cascading Style Sheets">CSS</acronym>) is an image made up of several smaller images in measured distances from each other, in the interests of reducing <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests and speed up website load times (see <a href="http://spritegen.website-performance.org/section/what-are-css-sprites">Website Performance&#8217;s <em>What are <acronym title="Cascading Style Sheets">CSS</acronym> sprites?</em></a>).</p>
<p><span id="more-407"></span>Part of my letter sprite looks like this (black background added for clarity):</p>
<p><a href='http://whimsical.nu/wp-content/uploads/2008/07/partsprite1.gif'><img src="http://whimsical.nu/wp-content/uploads/2008/07/partsprite1.gif" alt="" title="Part of the letters sprite" width="500" height="309" class="alignnone size-full wp-image-211" /></a></p>
<p>A couple of notes on this sprite:</p>
<ol>
<li> The distances between each sprite is carefully calculated, and yes, manually done. That means that if I have a menu item that is too long (say more than 550 pixels wide), the letter next to the sprite shows up. But we&#8217;re talking menu items here, anyway, so this isn&#8217;t a big issue. I could even go as low as a width of 300 pixels. </li>
<li> If you scrutinize the above sample, the letters are cut off at the top and left of the letters, because this forms the upper left corner of the menu item. There is pretty much no reason to keep the swirls at that portion of the letters, because it <em>will</em> be cut off, and keepting them would add complexity and raise the file size of the sprite. However, it is important to keep the swirls to the right and bottom of the letter, because the menu items will probably expand to the right and/or grow taller depending on the content of the item. Its limitation? I can&#8217;t have these artsy letters aligned on the right. </li>
<li> I could have used <acronym title="Graphics Interchange Format">GIF</acronym>, but I went with <acronym title="Portable Network Graphics">PNG</acronym>. <acronym title="Portable Network Graphics">PNG</acronym> is well-supported now, except for <acronym title="Internet Explorer 6">IE6</acronym>, but basically <acronym title="Portable Network Graphics">PNG</acronym> here lets me have different, <acronym title="Cascading Style Sheets">CSS</acronym>-specified backgrounds for the letter, and have the letter blend cleanly against the solid background. Win! </li>
</ol>
<p>Once that&#8217;s ready, it&#8217;s time for the markup. Basically what we&#8217;re doing is we need at least two separate &#8220;layers&#8221; for each menu/link item. One for the colored background (grey, green, and orange); one for the letter on top of this, which should let the colored background show through; and then our actual menu item, if we have multiple-word-set menu items.</p>
<p>Time for some pretty code (with just one, current menu item):</p>
<pre><code>&lt;ul class="menu"&gt;
&lt;li&gt;
  &lt;a href="http://scripts.indisguise.org" id="menu-blog" class="current"&gt;
    &lt;div class="swirl-b"&gt;
      &lt;h3&gt;Blog&lt;/h3&gt;
      &lt;p&gt;tech babble&lt;/p&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;</code></pre>
<p>Now we need to have the menu list items line up horizontally, and we do that with floating things:</p>
<pre><code>ul.menu li {
   list-style-type: none;
   float: left;
   border-right: 3px solid #fff; /* whitespace between each menu item */
   font-size: 85%;
   height: 54px;
   overflow: hidden;
}</code></pre>
<p>We also need to color the background of an ordinary link to a nice light shade of grey, as well as tacking on additional colors for when we have a currently active menu item, or when hovering over. The current menu item is identified with a <code>current</code> class, but otherwise there shouldn&#8217;t be any classes involved. This one forms our background layer. We use the <code>&lt;a&gt;</code> tag so that the whole item is a link, plus we can change the background color across all browsers (<acronym title="Internet Explorer">IE</acronym> doesn&#8217;t recognize the <code>:hover</code> pseudo-class on anywhere other than <code>&lt;a&gt;</code> tags).</p>
<pre><code>ul.menu li a {
   display: block;
   text-decoration: none;
   background: #e7e7e7;
}
ul.menu li a.current { background: #bddcbd; }
ul.menu li a:hover, ul.menu li a:active { background: #eed6b4; }
ul.menu li a.current:hover, ul.menu li a.current:active { background: #bddcbd; }</code></pre>
<p>The next layer is our artsy letter layer, which is the div with a class pertaining to the letter we want to show. First we need set up our actual swirl classes:</p>
<pre><code>.swirl-a, .swirl-b, ... .swirl-x, .swirl-y, .swirl-z { background: url('sprite.png') no-repeat top left; }
.swirl-a { background-position: 0 -30px; }
.swirl-b { background-position: 0 -210px; }
...
.swirl-x { background-position: -1120px -210px; }
.swirl-y { background-position: -1120px -390px; }
.swirl-z { background-position: -1120px -570px; }</code></pre>
<p>I just showed the classes for the letters A, B, X, Y and Z for simplicity&#8217;s sake. I separated the style rule for the common background to minimize code repetition. This can be tricky and a bit tedious, but a nice ol&#8217; calculator can do wonders, if you&#8217;ve set up your sprite correctly. After all, the distance of all the sprites are calculated and measured.</p>
<p>Now we have the rest of the styles for our swirl <code>&lt;div&gt;</code>, as well as the <code>&lt;h3&gt;</code> and <code>&lt;p&gt;</code> tags I use for the actual menu text: paddings, font sizes, colors, etc. If I ever need more menu items, or change a menu item&#8217;s name, I can just keep adding/changing the markup for that menu item, and everything&#8217;s set up for me immediately.</p>
<p>Hope this entry gives inspiration and ideas for more, better implementations. Feel free to ask away if something&#8217;s unclear. :)</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/07/11/frontend-friday-implementation-focus-on-indiscripts-lettered-menu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Frontend Friday: Watch out for Divitis</title>
		<link>http://whimsical.nu/2008/07/04/frontend-friday-watch-out-for-divitis/</link>
		<comments>http://whimsical.nu/2008/07/04/frontend-friday-watch-out-for-divitis/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 00:00:37 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[semantics]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=201</guid>
		<description><![CDATA[Back when I first started using CSS, my favorite tag was undoubtedly the &#60;div&#62;. It was so versatile, and I did everything I could with that tag. It introduced me to absolute positioning and the CSS in general, and I&#8217;m forever grateful, but it also brought me away from the basics: HTML as a markup language. It&#8217;s also known as divitis: that is, having one too many &#60;div&#62; tags. The result was code bloat, and once I started weaning away from this practice, I had hundreds of files to update, as they all looked like: &#60;div class="content"&#62; &#60;div class="title"&#62;Some heading!&#60;/div&#62;...]]></description>
			<content:encoded><![CDATA[<p>Back when I first started using <acronym title="Cascading Style Sheets">CSS</acronym>, my favorite tag was undoubtedly the <code>&lt;div&gt;</code>. It was so versatile, and I did everything I could with that tag. It introduced me to absolute positioning and the <acronym title="Cascading Style Sheets">CSS</acronym> in general, and I&#8217;m forever grateful, but it also brought me away from the basics: <acronym title="HyperText Markup Language">HTML</acronym> as a markup language. It&#8217;s also known as <em>divitis</em>: that is, having one too many <code>&lt;div&gt;</code> tags.</p>
<p>The result was code bloat, and once I started weaning away from this practice, I had hundreds of files to update, as they all looked like:</p>
<pre><code>&lt;div class="content"&gt;
&lt;div class="title"&gt;Some heading!&lt;/div&gt;
&lt;div class="date"&gt;July 4, 2008&lt;/div&gt;
&lt;p&gt;This is some of the content of the page. Yay!&lt;/p&gt;
&lt;div class="subtitle"&gt;Some subheading&lt;/div&gt;
&lt;/div&gt;</code></pre>
<p>(I&#8217;m sure if you look hard enough you&#8217;ll find a couple of my older sites still sporting this sort of markup.)</p>
<p>Movements and events like <a href="http://naked.dustindiaz.com/">the annual <acronym title="Cascading Style Sheets">CSS</acronym> Naked Day</a> woke me (and hopefully a few others) to the sad truth that as web developers and designers, we can be so <em>obsessive</em> about needing every single pixel in place, but completely forget about keeping the house clean. The impact may be minimal at the onset (i.e., &#8220;hey, everyone sees the pretty decors after all!&#8221;) but just like your house after a rush cleaning because people are coming over tonight, you have to deal with guests stumbling into hidden mess, things not in the right place, and a painful cleanup job afterward.</p>
<p>(Of course, there&#8217;s the other end of the spectrum where holy wars are raged between the use of a <code>&lt;ul&gt;</code> and a <code>&lt;table&gt;</code> tag, which is just as bad, <acronym title="In my opinion">IMO</acronym>.)</p>
<p>There are three things I do when working on a website to help me keep as close to &#8220;clean&#8221; as possible:</p>
<ol>
<li> <em>Keep markup in the back of your mind when creating your design.</em> The best example of this is creating a navigation menu. Can it be done in lists? What sort of arcane <acronym title="Cascading Style Sheets">CSS</acronym>-fu is needed to make it work like so? </li>
<li> <em>Start with a bare <acronym title="HyperText Markup Language">HTML</acronym> page.</em> I&#8217;m doing this right now for a couple of projects. I have wireframes (structures) where I&#8217;ve laid out roughly where things are going, but nothing else. No colors, no images, no JavaScript, just plain ol&#8217; markup-py goodness. </li>
<li> <em>Once done, remove stylesheets and take a look.</em> It&#8217;s easy for me to lose track of things when I&#8217;m on a roll, so this one personally has made me cringe a lot of times. Temporarily removing all styles from my work is a good way to see if it&#8217;s still readable and navigable even without all my pretty styles, and that it&#8217;s as close to how I designed it as possible. (This pretty much destroys all unordered lists masquerading as tables&#8230; so beware.) </li>
</ol>
<p>Remember: there are <a href="http://www.w3.org/TR/html401/index/elements.html">91 <acronym title="HyperText Markup Language">HTML</acronym> tags</a> available, one of which might serve the need and communicate your intent better. But don&#8217;t force it: sometimes saying nothing at all is better than being misunderstood.</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/07/04/frontend-friday-watch-out-for-divitis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Frontend Friday: Tools of the trade</title>
		<link>http://whimsical.nu/2008/06/27/frontend-friday-tools-of-the-trade/</link>
		<comments>http://whimsical.nu/2008/06/27/frontend-friday-tools-of-the-trade/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 00:00:56 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[aptana]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[fiddler]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[yslow]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=184</guid>
		<description><![CDATA[I&#8217;m finally pushing through with an idea I&#8217;ve had for a while: Frontend Friday! Every Friday, I will be posting an entry about frontend development work, which includes topics on HTML, CSS, JavaScript, and basically anything related to the implementation of designs and UI on the web. These may be simple solutions you might know about, or weird experiments and topics that concern those who code layouts, whether done as a hobby or as part of work. For the first Frontend Friday post, I&#8217;ve decided to write about a topic that&#8217;s rather central for all web developers: the tools that...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m finally pushing through with an idea I&#8217;ve had for a while: <strong>Frontend Friday</strong>! <em>Every Friday, I will be posting an entry about frontend development work</em>, which includes topics on <acronym title="HyperText Markup Language">HTML</acronym>, <acronym title="Cascading Style Sheets">CSS</acronym>, JavaScript, and basically anything related to the implementation of designs and UI on the web. These may be simple solutions you might know about, or weird experiments and topics that concern those who code layouts, whether done as a hobby or as part of work.</p>
<p>For the first Frontend Friday post, <strong>I&#8217;ve decided to write about a topic that&#8217;s rather central for all web developers: the tools that we use.</strong> We all use different programs and extensions and scripts to help us code up a nice layout for our websites. I wanted to share some of mine, and I hope you find them useful.</p>
<p>My top 7 tools:</p>
<ol>
<li>
<h4>Aptana Studio</h4>
<p><a href='http://whimsical.nu/wp-content/uploads/2008/06/aptana1.gif'><img src="http://whimsical.nu/wp-content/uploads/2008/06/aptana1.gif" alt="" title="Aptana Studio" width="150" height="150" class="alignleft size-full wp-image-185" align="left" /></a> I&#8217;ve been using <a href="http://www.aptana.com/studio">Aptana</a> well over a year now, and in fact <a href="http://scripts.indisguise.org/2007/08/30/aptana-the-web-ide/">I wrote a review</a> about the web IDE before. Because it stems from Eclipse, and Java, it suffers a bit of lag especially when working with large files; I wouldn&#8217;t recommend using it for that quick 30-second style fix on your website.</p>
<p>But working on websites that contains quite a few bells and whistles, I find Aptana to be quite helpful. The Project pane stores all ongoing projects, the Validation tab is quick to look up typos which result in syntax errors, the Outline pane makes jumping between functions and <acronym title="HyperText Markup Language">HTML</acronym> nodes a breeze, and Code Suggest is always great to have around. (You should take a look at <a href="http://scripts.indisguise.org/2007/08/30/aptana-the-web-ide/">my review</a> if you want to know more; while that was for the beta version, it&#8217;s still relevant.)</p>
</li>
<li>
<h4>Firefox</h4>
<p><a href='http://whimsical.nu/wp-content/uploads/2008/06/firefox1.png'><img src="http://whimsical.nu/wp-content/uploads/2008/06/firefox1.png" alt="" title="Firefox" width="150" height="150" class="alignleft size-full wp-image-186" align="left" /></a> Yes, <a href="http://getfirefox.com/">Firefox</a> just had to be there. I will admit that as of late I&#8217;d been very frustrated with Firefox&#8217;s memory-hogging practices and annoying lag, and if it weren&#8217;t for Firefox being insanely great for web development, I might have dropped it for the faster Safari. Firefox is a great standards-compliant browser, plus it provides an avenue for a plethora of web-developer-friendly tools, some of which are&#8230;</p>
</li>
<li>
<h4>Web Developer Toolbar</h4>
<p><a href='http://whimsical.nu/wp-content/uploads/2008/06/webdevtoolbar1.gif'><img src="http://whimsical.nu/wp-content/uploads/2008/06/webdevtoolbar1.gif" alt="" title="Web Developer Toolbar" width="150" height="150" class="alignleft size-full wp-image-187" align="left" /></a>Chris Pederick&#8217;s <a href="http://chrispederick.com/work/web-developer/">Web Developer Toolbar</a> is impossible to live without. It&#8217;s lightweight and contains a lot of helpful tools: disabling cache to make sure you see your <acronym title="Cascading Style Sheets">CSS</acronym> updates, cookie manipulation, <acronym title="Cascading Style Sheets">CSS</acronym> lookups, markup and style tools for debugging, browser resizer, viewing generated source (for all those whizzy <acronym title="JavaScript">JS</acronym> things), and more. If you&#8217;re a developer and you don&#8217;t have this on Firefox yet&#8230; <em>what cave have you been living in?!</em></p>
</li>
<li>
<h4>Firebug</h4>
<p><a href='http://whimsical.nu/wp-content/uploads/2008/06/firebug1.gif'><img src="http://whimsical.nu/wp-content/uploads/2008/06/firebug1.gif" alt="" title="Firebug" width="150" height="150" class="alignleft size-full wp-image-188" align="left" /></a>Actually, <a href="http://getfirebug.com/">Firebug</a> vied with the Web Developer Toolbar for the &#8220;must have&#8221; spot, with the toolbar winning simply because it&#8217;s lighter and more mainstream: even if you&#8217;re a hobbyist making personal websites during your free time, the toolbar is useful. Firebug is also a must-have, but mainly for more heavy duty stuff, and especially for debugging purposes: completely clueless what styles are messing things up on a certain element? Lost as to what is happening to your variables when running <acronym title="JavaScript">JS</acronym>? Firebug makes digging into code easy. I can&#8217;t count the number of times Firebug has saved me hours of trawling through <acronym title="Cascading Style Sheets">CSS</acronym> or numerous <code>alert()</code> calls.</p>
</li>
<li>
<h4>Multiple Internet Explorer installations</h4>
<p><a href='http://whimsical.nu/wp-content/uploads/2008/06/ie1.png'><img src="http://whimsical.nu/wp-content/uploads/2008/06/ie1.png" alt="" title="Internet Explorer 7" width="150" height="150" class="alignleft size-full wp-image-190" align="left" /></a>There are numerous multiple <acronym title="Internet Explorer">IE</acronym> tools out there, but the one I personally use on my Windows test machine is <a href="http://tredosoft.com/Multiple_IE">TredoSoft&#8217;s Multiple <acronym title="Internet Explorer">IE</acronym></a>. I really only test for <acronym title="Internet Explorer 6">IE6</acronym> and IE7, though (I should install IE8 soon, too&#8230;). It&#8217;s a bit of a pain, but that&#8217;s the way life rolls. The <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672d-4511-bb3e-2d5e1db91038&#038;displaylang=en"><acronym title="Internet Explorer">IE</acronym> Developer Toolbar</a> is also a must-have for <acronym title="Internet Explorer">IE</acronym>-proofing your website. I hope they update the toolbar to include a debugger soon.</p>
<p>Naturally, you will also need other browsers installed, according to what you wish to test with. I test according to <a href="http://developer.yahoo.com/yui/articles/gbs/">Yahoo!&#8217;s list of A-grade browsers</a>, even for my personal work (well, in varying degrees, as I don&#8217;t have multiple images of Windows sitting in my personal machine, for instance).</p>
</li>
<li>
<h4>YSlow</h4>
<p><a href='http://whimsical.nu/wp-content/uploads/2008/06/yslow1.gif'><img src="http://whimsical.nu/wp-content/uploads/2008/06/yslow1.gif" alt="" title="YSlow" width="150" height="150" class="alignleft size-full wp-image-189" align="left" /></a><a href="http://developer.yahoo.com/yslow/">YSlow</a> analyzes my pages&#8217; load times. I typically only use this nearer to the end of development, to check if I need to combine more images into sprites, chunk together <acronym title="Cascading Style Sheets">CSS</acronym> and <acronym title="JavaScript">JS</acronym>, etc. It&#8217;s definitely a good guideline checker for webdev best practices, which may or may not be critical for you, depending on what you are working on.</p>
<p>YSlow takes into consideration <a href="http://developer.yahoo.com/performance/index.html#rules">Yahoo!&#8217;s rules for high performance websites</a>, which every web geek into making websites should read through at least once.</p>
</li>
<li>
<h4>Fiddler and/or Tamper Data</h4>
<p><a href='http://whimsical.nu/wp-content/uploads/2008/06/fiddler1.png'><img src="http://whimsical.nu/wp-content/uploads/2008/06/fiddler1.png" alt="" title="Fiddler" width="150" height="150" class="alignleft size-full wp-image-191" align="left" /></a>These two are mostly useful for deeper digging into the communication between your website and the server, and may or may not be applicable for the type of work you do. I find it highly useful for verifying form submissions&#8217; raw data and <acronym title="Asynchronous JavaScript and XML">AJAX</acronym> requests &#8212; you can stop the data transmission, fudge up the content, and release it, which helps you trap bugs and issues.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/966">Tamper Data</a> is a nifty Firefox extension for this purpose, and <a href="http://www.fiddlertool.com/fiddler/">Fiddler</a> is an <acronym title="HyperText Transfer Protocol">HTTP</acronym> debugger tool, much more robust than Tamper Data. Unfortunately, Fiddler is not available on Mac OSX &#8212; I&#8217;ve been looking for a good alternative for a while now (<a href="http://www.parosproxy.org/index.shtml">Paros</a> looks like an interesting alternative, but for some reason I can&#8217;t get it to start monitoring traffic).</p>
</li>
</ol>
<p>So those are the top 7 tools I use for working with code. What are yours?</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/06/27/frontend-friday-tools-of-the-trade/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Heading Tags</title>
		<link>http://whimsical.nu/2008/02/24/heading-tags/</link>
		<comments>http://whimsical.nu/2008/02/24/heading-tags/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 03:35:39 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[h1]]></category>
		<category><![CDATA[h2]]></category>
		<category><![CDATA[h3]]></category>
		<category><![CDATA[headers]]></category>
		<category><![CDATA[heading tags]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/2008/02/24/heading-tags/</guid>
		<description><![CDATA[A while back, maybe three years back and from the time I started using CSS, I used to do a couple of markup quirks (that incidentally made it easier to spot copycats, but that&#8217;s another story). I used CSS classes all over the place, like below: &#60;div class="content"&#62; &#60;div class="divTitle"&#62;Some title&#60;/div&#62; &#60;div class="divSubTitle"&#62;Some sub heading&#60;/div&#62; &#60;p&#62;My content went here, in ordinary P tags.&#60;/p&#62; &#60;/div&#62; It worked for me. But starting from around two years back, I finally weaned myself off of using the semantically-blank DIV tags (where appropriate) and use proper HTML markup. My biggest reason for this is lesser...]]></description>
			<content:encoded><![CDATA[<p>A while back, maybe three years back and from the time I started using <acronym title="Cascading Style Sheets">CSS</acronym>, I used to do a couple of markup quirks (that incidentally made it easier to spot copycats, but that&#8217;s another story). I used <acronym title="Cascading Style Sheets">CSS</acronym> classes all over the place, like below:</p>
<pre><code>&lt;div class="content"&gt;
&lt;div class="divTitle"&gt;Some title&lt;/div&gt;
&lt;div class="divSubTitle"&gt;Some sub heading&lt;/div&gt;
&lt;p&gt;My content went here, in ordinary P tags.&lt;/p&gt;
&lt;/div&gt;</code></pre>
<p>It worked for me. <strong>But starting from around two years back, I finally weaned myself off of using the semantically-blank DIV tags (where appropriate) and use proper <acronym title="HyperText Markup Language">HTML</acronym> markup.</strong> My biggest reason for this is <em>lesser code</em>, and <em>my page is &#8220;prettier&#8221; when the <acronym title="Cascading Style Sheets">CSS</acronym> is turned off</em>. Observe:</p>
<pre><code>&lt;div id="content"&gt;
&lt;h1&gt;Some title&lt;/h1&gt;
&lt;h2&gt;Some sub heading&lt;/h2&gt;
&lt;p&gt;My content went here, in still ordinary P tags.&lt;/p&gt;
&lt;/div&gt;</code></pre>
<p>In terms of style control, it was easily done via <acronym title="Cascading Style Sheets">CSS</acronym> anyway; and if I wanted a completely blank stylesheet anyway, a nice <acronym title="Cascading Style Sheets">CSS</acronym> reset will do that for me. (A word of note though: <em><acronym title="Cascading Style Sheets">CSS</acronym> reset does have its pros and cons.</em> Personally I&#8217;m still a bit on the fence as to whether I&#8217;d go for using one that reset all the native styles or not, above the paddings and margins.)</p>
<p>An interesting post on heading tags, including a possible system/technique on using them, was posted by Matt Snider: <a href="http://mattsnider.com/architecture/semantic-design/when-to-use-heading-tags/">When to Use Heading Tags</a>. It&#8217;s a good, interesting read.</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/02/24/heading-tags/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

