<?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>Gorm Casper’s blog</title>
	<atom:link href="http://www.gormcasper.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gormcasper.com</link>
	<description>— it’s about web design, programming, and your mind</description>
	<lastBuildDate>Mon, 25 Jan 2010 14:22:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSS &#8212; Variables and Cascading</title>
		<link>http://www.gormcasper.com/2010/01/25/css-variables-and-cascading/</link>
		<comments>http://www.gormcasper.com/2010/01/25/css-variables-and-cascading/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 14:22:00 +0000</pubDate>
		<dc:creator>Gorm Casper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.gormcasper.com/?p=123</guid>
		<description><![CDATA[Here&#8217;s a quick thought. Something I will try to incorporate more in my work with css.
I think the number one wish for css, is the introduction of variables. It is at least, a very common attribute in css frameworks suchs as LESS or Sass.
But the word &#8220;cascading&#8221; is in the acronym for a reason, and [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick thought. Something I will try to incorporate more in my work with <code>css</code>.</p>
<p>I think the number one wish for <code>css</code>, is the introduction of variables. It is at least, a very common attribute in <code>css</code> frameworks suchs as LESS or Sass.</p>
<p>But the word &#8220;cascading&#8221; is in the acronym for a reason, and even though that doesn&#8217;t <em>quite</em> solve the lack of variables, it actually does take a pretty good shot at it.</p>
<p>Here&#8217;s an example of some pretty generic code:</p>
<pre>h1 {
  font-size: 200%;
  color: green;
}

a:link, a:visited {
  text-decoration: none;
  color: green;
}</pre>
<p>With the introduction of variables, it could look like this:</p>
<pre>@contrastColor = green;

h1 {
  font-size: 200%;
  color: @contrastColor;
}

a:link, a:visited {
  text-decoration: none;
  color: @contrastColor;
}</pre>
<p>This is good if we want to change the color green to another. We only have to change it one place. But this is, as I said, not possible without the use of one framework or another. So what can we do instead?</p>
<pre><span>/* Contrast Color */</span>
h1, a:link, a:visited { color: green; }

h1 {
  font-size: 200%;
}

a:link, a:visited {
  text-decoration: none;
}</pre>
<p>As I said, this is something I will try to incorporate more in my style sheets, so I haven&#8217;t actually got any experience on it. But <code>css</code> is designed with this in mind (at least I&#8217;m guessing it is), so why try to <em>fight</em> the system instead of learning to play with <em>with</em> it? I imagine that on a large scale it can create very complex style sheets unless the code is rigorously commented and kept neat, but that&#8217;s not too scary. At least as long as you&#8217;re the only person working on the <code>css</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gormcasper.com/2010/01/25/css-variables-and-cascading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mind &#8212; Stop hyping yourself up</title>
		<link>http://www.gormcasper.com/2010/01/15/mind-stop-hyping-yourself-up/</link>
		<comments>http://www.gormcasper.com/2010/01/15/mind-stop-hyping-yourself-up/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 18:09:03 +0000</pubDate>
		<dc:creator>Gorm Casper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.gormcasper.com/?p=120</guid>
		<description><![CDATA[I read Eat that Frog, a popular time management book by Bryan Tracy, the other day, and in it I found this:
One of the simplest and yet most powerful ways to get yourself started is to repeat the words, &#8220;Do it now! Do it now! Do it now!&#8221;
over and over to yourself. (p.104)
This might be [...]]]></description>
			<content:encoded><![CDATA[<p>I read <em>Eat that Frog</em>, a popular time management book by Bryan Tracy, the other day, and in it I found this:</p>
<blockquote><p>One of the simplest and yet most powerful ways to get yourself started is to repeat the words, &#8220;Do it now! Do it now! Do it now!&#8221;<br />
over and over to yourself. (p.104)</p></blockquote>
<p>This might be good advice for sales people (the kind who has to be hyped up all the time), but this stuff never ever worked for me; and I honestly think this advice is downright counterproductive.</p>
<p><img src="http://g81.dk/a/blog_img/tereza.png" alt="Mother Tereza was hyped?" /></p>
<p>It&#8217;s not that I am immune to programming (though trashing my TV did help), but staying hyped for any serious duration of time is simply impossible; and it&#8217;s counterproductive in the sense that once you come back down from your &#8220;high&#8221;, you&#8217;re going to be even less productive and able to stay focused, than you were before you hyped yourself up. And don&#8217;t even get me started on what happens if you try to hype yourself up every day over several days or weeks. It&#8217;s inhumane, and if you&#8217;ve put yourself in a situation where it is expected of you to be that, and work like that; my suggestion is that you seriously reconsider your priorities in life.</p>
<p>Be smarter than that. You are not some sort of mindless robot. <a href="/2010/01/14/mind-dont-do-it-now/">Plan</a>, and work steadily, solving one thing at a time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gormcasper.com/2010/01/15/mind-stop-hyping-yourself-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mind &#8212; Don&#8217;t do it now</title>
		<link>http://www.gormcasper.com/2010/01/14/mind-dont-do-it-now/</link>
		<comments>http://www.gormcasper.com/2010/01/14/mind-dont-do-it-now/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 21:07:13 +0000</pubDate>
		<dc:creator>Gorm Casper</dc:creator>
				<category><![CDATA[mind]]></category>
		<category><![CDATA[time management]]></category>

		<guid isPermaLink="false">http://www.gormcasper.com/?p=114</guid>
		<description><![CDATA[You hear it all the time. &#8220;Do it now&#8221;, &#8220;Just do it!&#8221;, and whatever variation of this you can think of.
Sure. If there is some specific task that you have been procrastinating on&#8230; just f*cking do it. But don&#8217;t listen to that advice if you are searching for information about how to stay productive over [...]]]></description>
			<content:encoded><![CDATA[<p>You hear it all the time. &#8220;Do it now&#8221;, &#8220;Just do it!&#8221;, and whatever variation of this you can think of.</p>
<p>Sure. If there is some specific task that you have been procrastinating on&#8230; just f*cking do it. But don&#8217;t listen to that advice if you are searching for information about how to stay productive over long periods of time.</p>
<p>You need careful planning for that. Very careful planning. Why? A few reasons: First, you absolutely need to know what you are doing, why you are doing it, and for how long. It sounds fairly obvious, but it is not. At least not for my fellow students, or for my colleges at work. Even I fall into reading a book, not sure what I am looking for or why I am doing it. It almost always fails. I end up thinking the book is no good, when in fact I just don&#8217;t know why I am reading it.</p>
<p>I put a time limit to almost everything I do (16 minutes left to finish this post &mdash; sorry, no picture today), mainly because working in bursts is the only way to keep the work focused.</p>
<p>Second, you want to limit useless work as much as possible. This is best done with careful planning. Spend as much time finding out what needs to be done, and the easiest way to go about it; as you do on actually working. Whenever I am not working, I always keep my <a href="/2010/01/09/mind-todo-list-on-paper/">todo-list</a> right next to me so I can constantly revise it.</p>
<p>Third, overall picture. This is really simple. You just want to make sure, that whatever you do in your daily life, somehow follows a bigger plan. You need to be going somewhere, or your life will get stuck really quickly. Again&#8230; planning.</p>
<p>I hardly think that it is possible to plan in enough detail. As long as you keep your mind open a long the way, and ask yourself, if the work you are currently doing, is getting you any closer to your goal. This is especially important when studying. &#8220;Is what I am reading now, actually giving me information I didn&#8217;t know about the subject I need to learn? Is it doing so fast enough? Is it going into enough detail?&#8221; and so on.</p>
<p>Plan. In the beginning you will find out that you don&#8217;t know for how long you should make yourself work. You will probably overestimate yourself and get frustrated with not being able to stay focused for the entire duration. This is fine however. If you find, that after 20 minutes you can&#8217;t stay focused any longer; set the time limit to 20 minutes next time. Just be aware that the time you can stay focused varies a great deal from activity to activity. You tend to be able to stay focused for longer if the activity involves physical movement. But just experiment with it&#8230;</p>
<p>When time is up, write down what needs to be done next; and stop. What you wrote about what needs to be done next, goes on your todo-list. This way, next time, you will know exactly where to start.</p>
<p>Engineers do the planning, and the construction workers do the actual work. The engineers get paid a lot more because planning is actually the most difficult thing of the two. The same goes for planning your life. It takes skill to plan properly. But unlike for engineers, you actually have a lot of room for failure. You life won&#8217;t repeat itself, but the days will. Work will.</p>
<p>Don&#8217;t do it now. Plan now, and do it when you know what, why and for how long.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gormcasper.com/2010/01/14/mind-dont-do-it-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Design &#8212; Nobody cares about what else you have to say</title>
		<link>http://www.gormcasper.com/2010/01/10/design-nobody-cares-about-what-else-you-have-to-say/</link>
		<comments>http://www.gormcasper.com/2010/01/10/design-nobody-cares-about-what-else-you-have-to-say/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 15:56:38 +0000</pubDate>
		<dc:creator>Gorm Casper</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.gormcasper.com/?p=110</guid>
		<description><![CDATA[It&#8217;s 16:56 right now, and looking at my browsing history I have looked at roughly 50 different websites today. I have been busy with studyin, so today it&#8217;s probably less than it could have been, or will be in a few hours (writing this post is the last thing on my todo-list).
When I come to [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s 16:56 right now, and looking at my browsing history I have looked at roughly 50 different websites today. I have been busy with studyin, so today it&#8217;s probably less than it could have been, or will be in a few hours (writing this post is the last thing on my <a href="/2010/01/09/mind-todo-list-on-paper/">todo-list</a>).</p>
<p>When I come to a website, I do so in the pursuit of something. Usually I found it via google, or some rss feed pointed me in the direction of it. I did not come to randomly browse around your website and see if I can find anything of use. Nobody does. It simply does not work that way. Why? Because it is inefficient.</p>
<p>So with that in mind, let&#8217;s look a at a typical website layout.</p>
<p><img src="http://g81.dk/a/blog_img/layout01.png" alt="Website layout 01" /></p>
<p>And here is what I see&#8230; or try to see.</p>
<p><img src="http://g81.dk/a/blog_img/layout02.png" alt="Website layout 02" /></p>
<p>I don&#8217;t care about what your header looks like or what the menu items are. I especially don&#8217;t care what your logo looks like. No, I won&#8217;t remember it. Whatever you put in your sidebar is there to distract me while I am trying to read what you wrote, and nothing else. There is no other reason to put it there. I might read it, but there is one thing you can be certain about: If I stop reading the content, and start reading that, it&#8217;s because the content is boring and/or useless to me, and you can be sure I won&#8217;t follow you on twitter or read what you were born.</p>
<p>Instead, put information in the footer, and provide me with an easy way to get to the front page (just to save me the trouble of doing it myself in the address bar), where I can find the information I need.</p>
<p>In this age of trying to please the user best way possible, I am surprised at how common this type of layout is. How everyone seems to want to cram every possible detail and option into every single subpage. Don&#8217;t do that. Give me what I came for, and give me an easy way to find more in case I do want that. That&#8217;s it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gormcasper.com/2010/01/10/design-nobody-cares-about-what-else-you-have-to-say/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mind &#8212; Todo-list on paper</title>
		<link>http://www.gormcasper.com/2010/01/09/mind-todo-list-on-paper/</link>
		<comments>http://www.gormcasper.com/2010/01/09/mind-todo-list-on-paper/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 16:36:30 +0000</pubDate>
		<dc:creator>Gorm Casper</dc:creator>
				<category><![CDATA[mind]]></category>
		<category><![CDATA[time management]]></category>

		<guid isPermaLink="false">http://www.gormcasper.com/?p=96</guid>
		<description><![CDATA[If I could give one productivity advice, it would be this.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a simple way to boost your productivity: Have a simple, small todo-list on a piece of paper.</p>
<p>It looks like this:</p>
<p><img src="http://g81.dk/a/blog_img/todolist.png" alt="todo-list" /></p>
<p>That&#8217;s my list for today. As you can see, most of the items are crossed out, of course meaning I completed the task, and one item is changed (from &#8220;Django&#8221; to &#8220;Javascript&#8221;).</p>
<p>I am not telling you to skip all your fancy tools for time management. Only partially anyway. I can&#8217;t speak for all, but personally I&#8217;ve found that I am productive with a list like this lying next to me at the desk (as <a href="/2010/01/07/mind-clean-out-your-place/">the only thing</a>). It doesn&#8217;t get much faster, or more visually appealing than this. It doesn&#8217;t get much simpler either. A lot can be built in a web app with fancy AJAX calls and everything, but nothing beats the speed, and especially, the versatility of a tiny todo-list like this one.</p>
<h2>Purpose of it</h2>
<p>The purpose is this:</p>
<ul>
<li>It simplifies things, and has no way for you to hit refresh, play with check boxes, or anything like that.</li>
<li>It makes what you need to do, visual.</li>
<li>It creates a place for you to jot down ideas as they pop up, so you can instantly forget them again and focus on what you&#8217;re doing.</li>
</ul>
<h2>How I work with it</h2>
<p>You can work with it in several ways. Here&#8217;s how I do it. </p>
<p>The list is created the night before. I move over whatever I didn&#8217;t do from the list the day before, and try to go into specifics about especially my studies.</p>
<p>I write general terms on the front (Wash, study, check email, food, etc), together (if needed) with a specific time period that I will spend on it. (Good for reading, answering mails, etc). Then on the back, I go into a bit of detail. For instance, on my note above, it says &#8220;&#189; bachelor&#8221; (&#8220;&#189;&#8221; = half an hour), but no specifics. On the back, I have it set in stone what needs to be done (more on this in a later post).</p>
<p>I cross out items as they are completed.</p>
<p>I carry it around with me, and things get added to it, as they pop up in my head &mdash; even during other work. At first I didn&#8217;t allow myself to look at the note while for instance studying; but if I just write things that pop up in my head down (uncritically), I can let it go, and concentrate on what I&#8217;m supposed to be doing. This, however, is the only distraction I allow myself.</p>
<p>At the end of the day, I move over things I didn&#8217;t have time for (if there are any), and throw it out. I don&#8217;t save it. It&#8217;s a work tool, and it has served its purpose beautifully.</p>
<h2>Try it</h2>
<p>You probably came here to see if you could pick up some golden bullet for becoming instantly productive; and I gave you an easy to do idea. It&#8217;s easy to follow, easy to implement, doesn&#8217;t require that you change to a different operating system (although I can recommend Linux), or anything of the sort. It&#8217;s easy in every sense and you have nothing to lose.</p>
<p>Try it for one week. Half a week. One day. It doesn&#8217;t matter that much for how long you try it, as long as you do try it. Just remember to keep it simple.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gormcasper.com/2010/01/09/mind-todo-list-on-paper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mind &#8212; Clean out your place</title>
		<link>http://www.gormcasper.com/2010/01/07/mind-clean-out-your-place/</link>
		<comments>http://www.gormcasper.com/2010/01/07/mind-clean-out-your-place/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 22:22:35 +0000</pubDate>
		<dc:creator>Gorm Casper</dc:creator>
				<category><![CDATA[mind]]></category>

		<guid isPermaLink="false">http://www.gormcasper.com/?p=76</guid>
		<description><![CDATA[Here&#8217;s an experiment I did with the place I live. I wrote this because I suggest you do the same.
Lately I have been reading about all the things we have to deal with in everyday life. All the things that demands our attention. Everything from the dog, to finding things, to analyzing socials situations, and [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an experiment I did with the place I live. I wrote this because I suggest you do the same.</p>
<p>Lately I have been reading about all the things we have to deal with in everyday life. All the things that demands our attention. Everything from the dog, to finding things, to analyzing socials situations, and constantly deciding whether to check the email now or later. When you start thinking about this, you realize what a ridiculous number of choices we make every single day, you begin to understand why humans tend to love <strong>simplicity</strong> and <strong>generalizations</strong>&#8230; and you begin to appreciate them yourself.</p>
<p>So I decided (in the middle of studying for my exam) to see what I could do about the place where I live (procrastination anyone?). Here&#8217;s what I did:</p>
<ol>
<li>Went to my attic and was happy to find it as good as empty, except for some boxes I&#8217;d used for moving in. Perfect.</li>
<li>Brought down 4 of them and started packing things up. Everything, except:
<ul>
<li>Tables, chairs, bed, sofa, etc.</li>
<li>My laptop and my new external monitor.</li>
<li>Bank papers.</li>
<li>Study books and basic study materials like pen and paper.</li>
<li>Some of my <em>very</em> classical literature (see my other post on books to read).</li>
<li>Art: My violin on the wall, a babushka from Moscow, vase from Morocco, chessboard from Turkey, Buddha from Laos, and some other interesting and inspirational things.</li>
</ul>
</li>
<li>Moved everything to the attic.</li>
<li>Kept one drawer empty. It&#8217;s the buffer zone for letters, and <em>must</em> be empty before I go to bed every night.</li>
</ol>
<p><img src="http://g81.dk/a/blog_img/table.png" alt="my table" style="display:block;margin:10px auto;" /></p>
<p>The goal was to remove so much from especially my living room, that I would have a feeling of missing something. In that case, I could just go to the attic and get it back. No biggie. I could have removed my art too, but I regularly have visitors over, and I want the place to look inspiring and fresh &mdash;not like a prison cell.</p>
<p>Everything I did not move to the attic got a very specific place to be. Usually somewhere out of sight. I did not want to have &ldquo;boring&rdquo; things lying around at all. And by &ldquo;boring&rdquo; I mean everything that can <em>not</em> be used as a conversation starter. A slightly odd definition, I know; but think about it. You can&#8217;t start conversations about pen and paper, so I got that out of the way. Same is true for bank papers, etc. Out of the way with that too. What you <em>can</em> start conversations about, is books for studying. It is pieces of pottery that I dug up somewhere in Palestine, or the <a href="http://images.google.com/images?q=tibloc">tibloc</a> lying in my window next to coins from different places I visited. So they&#8217;re all in. Lying around, making me feel at home and new visitors welcomed.</p>
<p>So how did it go? Very well&#8230;</p>
<ol>
<li>I have not been missing a thing.[<a href="#star">*</a>]</li>
<li>It probably saved me at my exam (in fact I aced it).</li>
<li>I now treat my place with respect. That is, I never let papers or other stuff just lying around.</li>
<li>It&#8217;s <em>much</em> easier to clean.</li>
<li>Every single person who has visited me (new friends as well as old ones) has complimented the place.</li>
<li>I have more time than ever before. I can feel my mind beginning to think more structured now.</li>
<li>I&#8217;m on top of things. Studying ahead of things, etc.</li>
</ol>
<p>Even though I love what I have done, I have not forgotten about my initial experiment. I wanted to remove so much, that I would be forced to go up there, and get it back down. I wanted to find out, what I <em>really</em> need, and the only way to do that, is to first remove too much. So, I will be doing it again. Removing dictionaries, my Tintins, and finding better storage for folders and paper that I can&#8217;t do without.</p>
<p><span id="star" style="font-size:16px;color:#666;border-top:3px solid #ccc;display:block;padding-top:10px;">* Except for an envelope. But since I didn&#8217;t have any stamps either, I had to go to the post office anyway, and of course just bought an envelope there and then.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gormcasper.com/2010/01/07/mind-clean-out-your-place/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS &#8212; Speech bubble with no images</title>
		<link>http://www.gormcasper.com/2010/01/03/css-speech-bubble-with-no-images/</link>
		<comments>http://www.gormcasper.com/2010/01/03/css-speech-bubble-with-no-images/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 20:35:40 +0000</pubDate>
		<dc:creator>Gorm Casper</dc:creator>
				<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.gormcasper.com/?p=47</guid>
		<description><![CDATA[
 
Hello world

The speech bubble above contains no images. Instead it&#8217;s done with creative use of css. First the html:
&#60;div class="box"&#62;
  &#60;span&#62;&#38;nbsp;&#60;/span&#62;
  &#60;p&#62;Hello world&#60;/p&#62;
&#60;/div&#62;
The css is where the magic happens:
.box {
  background: #ccc;
  padding: 20px;
  width: 300px;
  position: relative; /* This is the only really important part */
}

.box>span {
 [...]]]></description>
			<content:encoded><![CDATA[<div style="background:#ccc;padding:20px;width:300px;position:relative;margin:10px 0;">
<span style="position:absolute;width:1px;height:1px;right:-10px;top:10px;border-top:7px solid transparent;border-bottom:7px solid transparent;border-left: 10px solid #ccc;"> </span></p>
<p style="font:13px/1 sans;margin:0;">Hello world</p>
</div>
<p>The speech bubble above contains <strong>no images</strong>. Instead it&#8217;s done with creative use of <code>css</code>. First the <code>html</code>:</p>
<pre>&lt;div class="box"&gt;
  &lt;span&gt;&amp;nbsp;&lt;/span&gt;
  &lt;p&gt;Hello world&lt;/p&gt;
&lt;/div&gt;</pre>
<p>The <code>css</code> is where the magic happens:</p>
<pre>.box {
  background: #ccc;
  padding: 20px;
  width: 300px;
  position: relative; <span>/* This is the only really important part */</span>
}

.box>span {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  font-size: 0;
  line-height: 1px;
  right: -10px; <span>/* Determines the length of the tail */</span>
  top: 10px;
  border-top: 7px solid transparent; <span>/* Angle of the triangle. */</span>
  border-bottom: 7px solid transparent;
  border-left: 10px solid #ccc; <span>/* The triangle */</span>
}</pre>
<p>First the <code>&lt;span&gt;</code> is positioned outside the box, and the size of it made small. This is because we are not interested in the box itself (it will never turn into a triangle), but rather, its left border. To explain, have a look at this:</p>
<div style="margin:10px auto;width:1px;height:1px;border-top:20px solid #06c;border-right:20px solid red;border-bottom:20px solid orange;border-left:20px solid green;"> </div>
<p>This is a <code>&lt;div&gt;</code> with <code>width</code> and <code>height</code> of 1px, and 20px borders in different colors. In the example above we are interested in the &#8220;green&#8221; border. We make it have the same background color as the box itself, and make the other borders transparent (in fact the right border is not even there).</p>
<p>It should be said that ie6 has terrible support for &#8220;transparent&#8221; as color; but it <em>can</em> be done. The <code>css</code> will then look like this:</p>
<pre>.box>span {
  display: block;
  font-size: 0;
  height: 1px;
  width: 1px;
  position: absolute;
  left: -10px;
  top: 10px;
  border-left:10px solid #ccc;
  border-top:7px solid transparent;
  border-bottom:7px solid transparent;
  _border-top-color:cyan; <span>/* No 'transparent' borders in ie6 */</span>
  _border-bottom-color:cyan;
  _filter:chroma(color="cyan"); <span>/* filter out the cyan color */</span>
}</pre>
<p>Notice that this uses an ie6 hack. ie6 is the only browser (as far as I know) that ignores the &#8220;_&#8221;, so it&#8217;s <em>very</em> useful for hacks. I generally suggest, however, to just ignore ie6 and start enjoy coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gormcasper.com/2010/01/03/css-speech-bubble-with-no-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mind &#8212; Books to read</title>
		<link>http://www.gormcasper.com/2009/12/29/mind-books-to-read/</link>
		<comments>http://www.gormcasper.com/2009/12/29/mind-books-to-read/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 15:59:56 +0000</pubDate>
		<dc:creator>Gorm Casper</dc:creator>
				<category><![CDATA[mind]]></category>

		<guid isPermaLink="false">http://www.gormcasper.com/?p=37</guid>
		<description><![CDATA[Arsene Hodali has written an article on books to read, and just responding (as I did) with my own suggestions seemed not good enough to me. There is quite a few things to be said about reading books, namely classic literature.
I have read quite a lot of books. Fictional and non-fictional alike, and let me [...]]]></description>
			<content:encoded><![CDATA[<p>Arsene Hodali has written an article on <a href="http://www.danceproof.com/2009/12/09/10-fictional-books-that-will-fk-up-your-reality-and-make-you-smarter/">books to read</a>, and just responding (as I did) with my own suggestions seemed not good enough to me. There is quite a few things to be said about reading books, namely classic literature.</p>
<p>I have read quite a lot of books. Fictional and non-fictional alike, and let me say this: I have never read a self-development book that came even close to what some of the classic literature have done for me. Sure, in the short term I might have gotten a rush out of it, and felt all pumped up; but that&#8217;s nothing in comparison to the long term understanding I&#8217;ve gotten out of for instance Anna Karénin.</p>
<p>Here&#8217;s advice for you if you&#8217;re new to classical literature and don&#8217;t know where to begin.</p>
<ol>
<li><strong>Beginning titles.</strong> If you haven&#8217;t really opened what is considered a classic book since 5th grade, then here are some titles to start out with:
<ul>
<li>Demian (Hermann Hesse) &mdash; Good for youngsters and adults alike. Very straight forward exploration of critical thought.</li>
<li>Watership Down (Richard Adams) &mdash; I personally like it for its understanding of what leadership means; but as with Animal Farm (by Orwell) it&#8217;s a fantastic caricature of our society.</li>
<li>The Unbearable Lightness of Being &mdash; Exploration into the <em>heavy</em> (= eternal return, sincerity, etc,) and <em>light</em> (= only live once, make the most of it, etc.) life. My personal favorite book.</li>
</ul>
</li>
<li><strong>Make time for it.</strong> Reading books takes time, but not more time than you have. Take out and hour, or even half an hour, to read. Carry the book you&#8217;re currently reading around with you, and open it whenever there&#8217;s some sort of waiting time.</li>
<li><strong>Read about what you are reading.</strong> Since what you&#8217;re reading is classic literature, someone somewhere will have written something about it. Spend 15 minutes on reading it, so you have some sort of an introduction to the book. You won&#8217;t (shouldn&#8217;t) always agree wit the &#8220;introduction&#8221; (or the book itself for that matter), which is fine. It&#8217;s just to make sure that you get something out of reading it. That said&#8230;
<li><strong>Quit the book if you don&#8217;t like it.</strong> You read for you. It might be the biggest master piece ever written; but if you&#8217;re not getting anything out of reading it, give it back to the library and pick something else up.</li>
<li><strong>Libraries are your friend.</strong> Libraries have classical books in abundance. Use them, or lose them. Lots of classic books can be found online though.</li>
<li><strong>Read quality.</strong> That&#8217;s why you are (or should be) reading classic literature.</li>
<li><strong>Don&#8217;t evaluate right away.</strong> Some of the best books I have read, I didn&#8217;t like when I closed the last page. But I find myself returning to some of its ideas or comparing my own life to that of the protagonists over and over again.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.gormcasper.com/2009/12/29/mind-books-to-read/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS &#8212; Full vertical column</title>
		<link>http://www.gormcasper.com/2009/12/28/css-full-vertical-sidebar/</link>
		<comments>http://www.gormcasper.com/2009/12/28/css-full-vertical-sidebar/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 10:35:00 +0000</pubDate>
		<dc:creator>Gorm Casper</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.gormcasper.com/?p=22</guid>
		<description><![CDATA[The css problem of the vertical column is a common one. Say you have a website with a sidebar that has a colored background, and you want it to extend all the way to the bottom even when you can&#8217;t control the amount of content in the content area or even sidebar (and thus knowing [...]]]></description>
			<content:encoded><![CDATA[<p>The <code>css</code> problem of the vertical column is a common one. Say you have a website with a sidebar that has a colored background, and you want it to extend all the way to the bottom even when you can&#8217;t control the amount of content in the content area or even sidebar (and thus knowing its height).</p>
<p>Here&#8217;s an example of what I&#8217;m talking about:</p>
<div style="border:1px solid #000;width:500px;margin:10px auto;"
<div style="padding: 10px;width:130px;background:#fdb;float:right;">Sidebar</div>
<div style="padding:10px;margin-right:150px;background:#e0e0e0;">Content area<br/><br/><br/><br/><br/>&#8230; that may extend far down</div>
</div>
<p>So we want the <span style="background:#fdb;">sidebar</span> to extend all the way to the bottom. The <code>css</code> solution is not at all intuitive.</p>
<pre>#wrapper {
  overflow: hidden;
}

#sidebar {
  padding-bottom: 999em; <span>/* or any large number */</span>
  margin-bottom: -999em; <span>/* equally large number */</span>
}</pre>
<p>Applied to the example above, it will make it look like this:</p>
<div style="border:1px solid #000;width:500px;margin:10px auto;overflow:hidden;"
<div style="padding: 10px;width:130px;background:#fdb;float:right;padding-bottom:999em;margin-bottom:-999em;">Sidebar</div>
<div style="padding:10px;margin-right:150px;background:#e0e0e0;">Content area<br/><br/><br/><br/><br/>&#8230; that may extend far down</div>
</div>
<p>It works by creating a huge amount of padding at the bottom of the sidebar container, and then taking it all away again with the margin. This would make the sidebar flow far out of the surrounding container (<code>overflow</code>), so we add <code>overflow: hidden;</code> to hide whatever spills out.</p>
<p>In case you have a lot of content in the sidebar, you may want to apply the same to the content area to make sure that extends to the bottom as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gormcasper.com/2009/12/28/css-full-vertical-sidebar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery &#8211; write &#8220;Password&#8221; in a password field and not dots</title>
		<link>http://www.gormcasper.com/2009/12/20/jquery-write-password-in-a-password-field-and-not-dots/</link>
		<comments>http://www.gormcasper.com/2009/12/20/jquery-write-password-in-a-password-field-and-not-dots/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 09:02:58 +0000</pubDate>
		<dc:creator>Gorm Casper</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.wp.gormcasper.com/?p=8</guid>
		<description><![CDATA[A jquery-based solution to creating a password field with the label inside (and not show up as stars) the input field.]]></description>
			<content:encoded><![CDATA[<p>In my work with <a href="http://place2book.com">Place2Book</a>, and many times before, I&#8217;ve had to make some sort of minimal login form with the labels inside the input fields.</p>
<p>This creates a challenge, as a default value in a password field will be displayed exactly as the password they type in; as dots, stars, or whatever.</p>
<pre>&lt;input type="password" value="password" /&gt;</pre>
<p>The solution is to create two &#8220;password fields&#8221;. One fake, that displays the text you want them to see. When this is focused, it quickly replaces itself with the proper password field.</p>
<p>It looks something like this (html and jQuery mixed):</p>
<pre>&lt;input type="password" class="login_password" /&gt;
&lt;input type="text" class="fake_password" value="Password" /&gt;

===

$(".login_password").hide();
$(".fake_password").show();

$("input.fake_password").focus(function(){
  $(this).hide().prev().show().focus();
});</pre>
<p>That&#8217;s the gist of it, but of course there is more to it.</p>
<p>I <a href="http://github.com/casperin/Login-Fields/tree/master">created a repository</a> on GitHub with all the code &#8211; fully commented.</p>
<p>It&#8217;s tested in: FF 3.0, FF 3.5, Opera 9.64, Chrome 2.0, and IE 7.0.</p>
<p>The README reads as follows:</p>
<blockquote><p><span class="first-letter">“</span>Created by Gorm Casper (gormcasper.com) &#8211; v.1.0</p>
<p>Use as you please.</p>
<p>This is a method for creating a minimal login form with the following abilities:</p>
<ul>
<li>Labels inside the input fields (as default value)</li>
<li>Shows &#8220;password&#8221; in the password box and not stars, dots or whatever</li>
<li>Label disappears on focus</li>
<li>Labels are different from whatever is typed into the fields (in the example it&#8217;s grayed out)</li>
<li>Still allows users without js to login without too much hazzle</li>
</ul>
</blockquote>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gormcasper.com/2009/12/20/jquery-write-password-in-a-password-field-and-not-dots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
