<?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>selfthinker &#187; web development</title>
	<atom:link href="http://blog.selfthinker.org/tag/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.selfthinker.org</link>
	<description>The world according to me</description>
	<lastBuildDate>Wed, 07 Dec 2011 01:52:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>In search of a good CMS</title>
		<link>http://blog.selfthinker.org/2011/10/21/in-search-of-a-good-cms/</link>
		<comments>http://blog.selfthinker.org/2011/10/21/in-search-of-a-good-cms/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 00:23:11 +0000</pubDate>
		<dc:creator>selfthinker</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.selfthinker.org/?p=400</guid>
		<description><![CDATA[I just spent a few days trying to get an overview of all the different CMS out there nowadays. I restricted my search to free OpenSource PHP CMS. Those are still hundreds, but at least that rules out some like ExpressionEngine, CushyCMS (not free) and Plone, dotCMS, Alfresco, Umbraco, Radiant (not PHP) and DokuWiki, WordPress, Serendipity (not a CMS). (I was surprised that, according to several sources, WordPress is the most [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent a few days trying to get an overview of all the different <abbr title="Content Management Systems">CMS</abbr> out there nowadays.<br />
I restricted my search to <strong>free OpenSource PHP CMS</strong>. Those are still hundreds, but at least that rules out some like <a href="http://expressionengine.com/">ExpressionEngine</a>, <a href="http://www.cushycms.com/en">CushyCMS</a> (not free) and <a href="http://plone.org/">Plone</a>, <a href="http://dotcms.com/">dotCMS</a>, <a href="http://www.alfresco.com/">Alfresco</a>, <a href="http://umbraco.com/">Umbraco</a>, <a href="http://radiantcms.org/">Radiant</a> (not PHP) and <a href="http://www.dokuwiki.org/">DokuWiki</a>, <a href="http://wordpress.org/">WordPress</a>, <a href="http://www.s9y.org/">Serendipity</a> (not a CMS). (I was surprised that, according to several sources, WordPress is <strong>the most popular CMS</strong> by far! Although I can see how you can include it in your definition of a CMS, I only wanted to concentrate on those which were meant to be used as one.)</p>
<ol>
<li>I had a look at about <strong>100</strong> different CMS at <a href="http://php.opensourcecms.com/">opensourceCMS.com</a>. (Their demo for each CMS listed there is a pretty cool feature that let&#8217;s you at least see one of the most important parts of a CMS at once: the admin interface.) Then I did a bit of research, i.e. googling what others use and like and don&#8217;t like and tried a few others which were not listed at opensourceCMS.com.<br />
A few really popular CMS failed already at that stage: <a href="http://www.joomla.org/">Joomla!</a>, <a href="http://typo3.org/">TYPO3</a>, <a href="http://www.cmsmadesimple.org/">CMS Made Simple</a>, <a href="http://www.xoops.org/">XOOPS</a>, <a href="http://e107.org/">e107</a> and <a href="http://www.silverstripe.com/">SilverStripe</a>. (I.e. their admin interface failed to convince me, I haven&#8217;t had a look beyond that at that point).</li>
<li>In the end I ended up with <strong>18</strong> different CMS I installed and tested more thoroughly.</li>
<li>I will go into detail about <strong>7</strong> of them below&#8230;</li>
</ol>
<p><span id="more-400"></span></p>
<p>But first&#8230;</p>
<h2>What makes a good CMS?</h2>
<p>In my opinion there are 4 points you have to consider:</p>
<dl>
<dt>Usability of the admin interface</dt>
<dd>Unfortunately that doesn&#8217;t seem to be very important to most developers. But I think it&#8217;s so important, I wouldn&#8217;t recommend using any CMS with an amazing backend, if its admin interface is crap.</dd>
<dt>Extensibility</dt>
<dd>It should be easy to create all the plugins and templates you need without hacking the core.</dd>
<dt>Sustainability</dt>
<dd>The community should be alive, at least a few contributors to core, plugins and templates existing, the project&#8217;s history should be healthy and the code secure.</dd>
<dt>Performance</dt>
<dd>It should use resources in a responsible way, scale on large projects and caching is vital.</dd>
</dl>
<p>How much can you trust my verdict on those 4 points? Well, I&#8217;m more of a front-end than a back-end developer and I haven&#8217;t used any of the listed CMS in real-life projects except one. It might well be that I will change my mind about a few aspects after having properly worked with them. But I have used a fair amount of other CMS and can compare most features.<br />
So, I&#8217;d say at this stage I can judge the usability of the admin interface 100%, extensibility 50%, sustainability 50%, performance 0%.</p>
<p>I wouldn&#8217;t necessarily consider the quantity of features or extensions as important. As I didn&#8217;t have a certain use case in mind, I was looking for CMS in general. Obviously there is no &#8220;best&#8221; CMS, as each individual choice always depends on so many things you need to consider. But at least it&#8217;s easy to make a first rough decision on the category you need: For smaller projects you don&#8217;t need a full blown CMS and it&#8217;s more harmful to choose e.g. Drupal for a 12-page brochure website. In those cases you just need a <strong>lite CMS</strong>.</p>
<h3>The problem with <abbr title="What You See Is What You Get">WYSIWYG</abbr> editors</h3>
<p>One important point in the admin interface is how editors can edit the content. There are two ways it can go wrong:</p>
<ul>
<li>don&#8217;t provide just a WYSIWYG editor</li>
<li>don&#8217;t provide just an HTML or simple text editor</li>
</ul>
<p>Unfortunately those two extremes can be found quite a lot in many CMS. The problem is: If you let your editors edit the content with a WYSIWYG editor, it nearly always destroys the integrity, validity and accessibility of the code and the design of the website. On the other hand, just using HTML is obviously no use to non-technical people and just a simple text editor doesn&#8217;t leave you with enough power and flexibility over the text.</p>
<p>The middle and in my opinion best way is using a text markup editor for e.g. <a href="http://en.wikipedia.org/wiki/Textile_(markup_language)">Textile</a> or <a href="http://en.wikipedia.org/wiki/Markdown">Markdown</a>. Although most clients will be reluctant to try it, make them use it for at least a week, and you&#8217;ll see that it&#8217;s easier for them than you think. If the editor includes a toolbar, the better. In case your clients are really extremely untechnical, a WYSIWYG editor is fine, <strong>as long as it excludes harmful markup</strong>, i.e. strip down its functionality (like WordPress does) or use a <abbr title="What You See Is What You Mean">WYSIWYM</abbr> editor (like <a href="http://www.wymeditor.org/">WYMeditor</a>).</p>
<p>You have to balance usability with doing the right thing. It&#8217;s important that developers understand that usability is vital for clients and clients understand what harm can be done by choosing to use a full-blown WYSIWYG editor.<br />
In my opinion, a rich CMS which doesn&#8217;t provide the right tool here (as a plugin if need be), is an unprofessional choice.</p>
<hr />
<h2>The Verdict</h2>
<p>The CMS in the lite category which didn&#8217;t make it into the final round: <a href="http://www.pluck-cms.org/">pluck</a>, <a href="http://symphony-cms.com/">Symphony</a>, <a href="http://www.websitebaker2.org/">WebsiteBaker</a> and <a href="http://krneky.com/en/wondercms">WonderCMS</a>. The latter nearly made it, because I think it&#8217;s a brilliant idea to write such a simple and small CMS (11 KB download), but it&#8217;s not very client-friendly.</p>
<p>The CMS in the rich category which couldn&#8217;t make it: <a href="http://www.kryn.org/">Kryn.cms</a> (which has an interesting admin interface: it looks like a desktop with several windows), <a href="http://modx.com/">MODX</a>, <a href="http://textpattern.com/">Textpattern</a> (I so wanted to love it, but just can&#8217;t) and <a href="http://zikula.org/">Zikula</a>.</p>
<p>And finally, here are the remaining seven winners:</p>
<h3>Category: Lite</h3>
<h4><a href="http://get-simple.info/">GetSimple</a></h4>
<div class="box">
<script type="text/javascript" src="http://www.ohloh.net/p/374511/widgets/project_basic_stats.js"></script>
<ul>
<li><a href="http://get-simple.info/">Website</a></li>
<li><a href="http://php.opensourcecms.com/scripts/details.php?scriptid=330&amp;name=GetSimple%20CMS">Demo</a></li>
<li>Download size: 0.5—1 MB</li>
<li>Number of extensions: 10—100</li>
</ul>
<div class="factoids"><script type="text/javascript" src="http://www.ohloh.net/p/374511/widgets/project_factoids.js"></script></div>
</div>
<p>It was nearly a draw between <a href="http://template-cms.org/">Template CMS</a> (which is the simplest and the smallest of these 4), <a href="http://www.elefantcms.com/">Elefant</a> (which has the most promising back-end and is the only one of these 4 which needs a database), <a href="http://gpeasy.com/">gp|Easy</a> (which has the most functionalities of these 4 and an inline editor) and <strong>GetSimple</strong>. They are all very similar in functionality, but if I had to decide between them, I would choose GetSimple, mainly for its clean and most intuitive admin interface.</p>
<p>GetSimple stores its data in XML files, so doesn&#8217;t need a database (which can be important in simple setups). It features a simple, stripped-down WYSIWYG editor. Most things I missed in the core can be extended by plugins (e.g. cache and custom fields) and it seems to be more stable than its contenders.</p>
<h4><a href="http://staceyapp.com/">Stacey</a></h4>
<div class="box">
<script type="text/javascript" src="http://www.ohloh.net/p/490046/widgets/project_basic_stats.js"></script>
<ul>
<li><a href="http://staceyapp.com/">Website</a></li>
<li>Download size: 0—0.5 MB</li>
<li>Number of extensions: 1—10</li>
</ul>
<div class="factoids"><script type="text/javascript" src="http://www.ohloh.net/p/490046/widgets/project_factoids.js"></script></div>
</div>
<p>Stacey is different. You might argue it&#8217;s not even a CMS, because it <strong>hasn&#8217;t got an admin interface</strong> at all. Instead it uses text files and other assets (images, pdfs, etc) in a certain folder structure to build the website and uses Markdown to parse those text files.<br />
Stacey&#8217;s own templating language is very easy and simple, it&#8217;s build with nice and clean <abbr title="Object-Oriented Programming">OOP</abbr> and a proper cache is already built-in. The main negative points are the missing interface and that you cannot swap themes easily.</p>
<p>But I found a simple solution to the missing interface problem: Combine Stacey with <a href="http://onefilecms.com/">OneFileCMS</a>!<br />
Despite its name, OneFileCMS is not a CMS. It&#8217;s an online file manager with a simple text editor, which consists of one single PHP file. Just copy that file into Stacey&#8217;s &#8220;./content/&#8221; folder and rename it to &#8220;index.php&#8221;. Then you can go to your Stacey-build website&#8217;s URL and append &#8220;content&#8221; (e.g. &#8220;example.com/content&#8221;) and behold, you can login and edit your Stacey files through a simple interface.<br />
Although this solution makes it much easier, it&#8217;s admittedly still not very suitable for non-technical people.</p>
<div class="cl"></div>
<h3>Category: Rich</h3>
<h4><a href="http://www.concrete5.org/">concrete5</a></h4>
<div class="box">
<script type="text/javascript" src="http://www.ohloh.net/p/32714/widgets/project_basic_stats.js"></script>
<ul>
<li><a href="http://www.concrete5.org/">Website</a></li>
<li><a href="http://php.opensourcecms.com/scripts/details.php?scriptid=14&#038;name=concrete5">Demo</a></li>
<li>Download size: 5—10 MB</li>
<li>Number of extensions: 100—1000</li>
</ul>
<div class="factoids"><script type="text/javascript" src="http://www.ohloh.net/p/32714/widgets/project_factoids.js"></script></div>
</div>
<p>Concrete5 has a really good and most intuitive admin interface. The editing is done nearly inline. (Well, you can see the original page, its areas and some controls while you&#8217;re editing it, but the editing itself happens in a modal window.) Its concept of different block types you can add to any area (not just e.g. WYSIWYG content, but also navigations, videos, page lists, etc) makes it very flexible. This block concept is similar to REDAXO&#8217;s concept of modules, but in concrete5 it&#8217;s done in a much nicer way. But unfortunately all of those fancy editing options come with a price: The essential parts of the admin won&#8217;t work without JavaScript.</p>
<p>One thing which some people might consider an issue: Some of concrete5&#8242;s add-ons cost money. Personally, I am fine with that. The only issue which could arise from it is that it will be impossible to support unmaintained add-ons.</p>
<p>Its OOP back-end follows <abbr title="Model–View–Controller">MVC</abbr> principles only half-heartedly, but seems quite powerful. As this CMS is getting more popular every day, it should be on everyone&#8217;s &#8220;must try out&#8221; list.</p>
<h4><a href="http://drupal.org/">Drupal</a></h4>
<div class="box">
<script type="text/javascript" src="http://www.ohloh.net/p/3189/widgets/project_basic_stats.js"></script>
<ul>
<li><a href="http://drupal.org/">Website</a></li>
<li><a href="http://php.opensourcecms.com/scripts/details.php?scriptid=191&#038;name=Drupal">Demo</a></li>
<li>Download size: 1—3 MB</li>
<li>Number of extensions: 1000—10000</li>
</ul>
<div class="factoids"><script type="text/javascript" src="http://www.ohloh.net/p/3189/widgets/project_factoids.js"></script></div>
</div>
<p>It&#8217;s daunting to write anything about Drupal. Because so many people hate it and so many people love it, and my knowledge about it only just scratched its surface.</p>
<p>From trying to find out why so many developers don&#8217;t like Drupal, I gathered it&#8217;s mainly because it&#8217;s so popular and therefore it&#8217;s often used in cases where it shouldn&#8217;t be used. (The same goes for WordPress, by the way.)</p>
<p>But from what I saw it&#8217;s up there among the top of the most popular CMS for a reason. I wouldn&#8217;t consider it to be the best out there, there are too many things I don&#8217;t like: The way you can switch between editing and viewing a page is against all common usability sense (the tabs involved don&#8217;t function as tabs), forms in the admin are confusing (they all look the same, no matter if they are for real content or just for meta content) and the back-end looks &#8220;historically grown&#8221;. But the concept of the different components working together looks right to me. And whenever I look up how something works, it becomes clearer to me how powerful it really is.</p>
<h4><a href="http://processwire.com/">ProcessWire</a></h4>
<div class="box">
<script type="text/javascript" src="http://www.ohloh.net/p/586993/widgets/project_basic_stats.js"></script>
<ul>
<li><a href="http://processwire.com/">Website</a></li>
<li><a href="http://php.opensourcecms.com/scripts/details.php?scriptid=561&#038;name=ProcessWire">Demo</a></li>
<li>Download size: 5—10 MB</li>
<li>Number of extensions: 10—100</li>
</ul>
<div class="factoids"><script type="text/javascript" src="http://www.ohloh.net/p/586993/widgets/project_factoids.js"></script></div>
</div>
<p>ProcessWire looks really exciting. The concept is good, the OOP back-end well thought-through and its API takes a refreshingly different approach as it is inspired by <a href="http://jquery.com/">jQuery</a>&#8216;s syntax.</p>
<p>Its <del datetime="2011-12-07T01:37:17+00:00">templating and</del> editing concept is similar to Drupal&#8217;s: Templates are populated with the help of fields. And the values of those fields are used in the templates. (It also utilizes a lot of small modules.)<br />
What I don&#8217;t like about this is that it means each template is fixed and less flexible (the same goes for Drupal). <del datetime="2011-12-07T01:37:17+00:00">And unfortunately it hasn&#8217;t got any concept of themes yet.</del> <ins datetime="2011-12-07T01:37:17+00:00">(While that is true, I learned that it&#8217;s intentional and an important part of its concept not to have themes.)</ins></p>
<p>It&#8217;s promising, but it somehow seems to me it&#8217;s not quite done yet (e.g. you cannot edit anything without JavaScript) and things might still change. I will definitely keep an eye it.</p>
<h4><a href="http://www.redaxo.org/">REDAXO</a></h4>
<div class="box">
<script type="text/javascript" src="http://www.ohloh.net/p/483005/widgets/project_basic_stats.js"></script>
<ul>
<li><a href="http://www.redaxo.org/">Website</a></li>
<li>Download size: 1—3 MB</li>
<li>Number of extensions: 100—1000</li>
</ul>
<div class="factoids"><script type="text/javascript" src="http://www.ohloh.net/p/483005/widgets/project_factoids.js"></script></div>
</div>
<p>REDAXO was my favourite CMS for a long time. Its module concept and editing flexibility is something I haven&#8217;t come across in any other CMS before. It might sound strange, but there are very few other CMS with which you can freely add any kind of content in any kind of order. But now concrete5 (see above) is a contender for that. </p>
<p>The only reason why I cannot really recommend this CMS is because its documentation (and website and even inline code comments) are mostly in German. <img src='http://blog.selfthinker.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  This is its biggest flaw and I think the main reason why it&#8217;s quite unknown in the CMS world.</p>
<p>One piece of news which gives some hope: Last year a fork of REDAXO, named <a href="http://www.sallycms.de/">Sally</a>, was born and it already looks really promising: It&#8217;s cleaner, faster and more open.<br />
But unfortunately the makers of Sally haven&#8217;t learned from their sister&#8217;s mistake: Everything is still only in German. Apart from that, they made the unprofessional choice to require PHP Short Open Tags. But they are still in pre-alpha stage, so let&#8217;s hope and check back in a few months.</p>
<h4><a href="http://www.wolfcms.org/">Wolf CMS</a></h4>
<div class="box">
<script type="text/javascript" src="http://www.ohloh.net/p/350429/widgets/project_basic_stats.js"></script>
<ul>
<li><a href="http://www.wolfcms.org/">Website</a></li>
<li><a href="http://php.opensourcecms.com/scripts/details.php?scriptid=334&#038;name=Wolf%20CMS">Demo</a></li>
<li>Download size: 1—3 MB</li>
<li>Number of extensions: 10—100</li>
</ul>
<div class="factoids"><script type="text/javascript" src="http://www.ohloh.net/p/350429/widgets/project_factoids.js"></script></div>
</div>
<p>Wolf CMS is my personal winner. It&#8217;s a fork of <a href="http://www.madebyfrog.com/">Frog CMS</a> which again is a PHP port of <a href="http://radiantcms.org/">Radiant CMS</a> (written in Ruby).<br />
Although it&#8217;s not as sophisticated as Drupal or concrete5 (and might even be seen as a lite CMS), it seems to be doing everything right. Its OOP MVC back-end is really clean and makes sense. The admin interface is extremely easy to use. Its core editor uses either Textile or Markdown (or PHP/HTML) with an editing toolbar.</p>
<p>Its main strength is simply its simplicity.</p>
<p>In my opinion there are only two things missing to make it perfect: The possibility to enter structured content (which also includes different types of content) and the possibility to store the layouts on the file system (which is also a flaw of REDAXO).<br />
What could also improve: More people should be using it! <img src='http://blog.selfthinker.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="cl"></div>
<hr />
<p><strong>Update (30 October 2011):</strong> I updated ProcessWire&#8217;s info box to show Ohloh widgets like the rest. (As it was not on Ohloh, I just created that project there myself.)</p>
<p><strong>Update (7 December 2011):</strong> I corrected some information for ProcessWire.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.selfthinker.org/2011/10/21/in-search-of-a-good-cms/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Trick Question: How many link states can be defined in CSS?</title>
		<link>http://blog.selfthinker.org/2011/07/10/trick-question-how-many-link-states-can-be-defined-in-css/</link>
		<comments>http://blog.selfthinker.org/2011/07/10/trick-question-how-many-link-states-can-be-defined-in-css/#comments</comments>
		<pubDate>Sun, 10 Jul 2011 12:03:40 +0000</pubDate>
		<dc:creator>selfthinker</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[quiz]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.selfthinker.org/?p=340</guid>
		<description><![CDATA[Hint: There is more than one correct answer (well, sort of). I would fail 4 and pass 3 of them, while 2 of the 3 correct answers would get extra points (because it&#8217;s rare knowledge). 1 2 4 5 8 16 20 1 Wrong. I hope, there&#8217;s no need to explain further. 2 Wrong. This [...]]]></description>
			<content:encoded><![CDATA[<p>Hint: There is more than one correct answer (well, sort of). I would fail 4 and pass 3 of them, while 2 of the 3 correct answers would get extra points (because it&#8217;s rare knowledge).</p>
<ol style="list-style-type: lower-alpha;">
<li>1</li>
<li>2</li>
<li>4</li>
<li>5</li>
<li>8</li>
<li>16</li>
<li>20</li>
</ol>
<p><span id="more-340"></span></p>
<h3>1</h3>
<p>Wrong.<br />
I hope, there&#8217;s no need to explain further.</p>
<h3>2</h3>
<p>Wrong.<br />
This answer might be given by beginners who think there&#8217;s only <code>a</code> and <code>a:hover</code>.</p>
<h3>4</h3>
<p>Still wrong.<br />
Although this answer might be given by most developers who think of <code>:link, :visited, :hover, :active</code>.</p>
<h3>5</h3>
<p>A good answer, but still wrong. (But I wouldn&#8217;t fail this one.)<br />
The one missing state from the 4 above is <code>:focus</code>. Professional web developers should always think about <code>:focus</code> for accessibility and usability reasons.</p>
<h3>8</h3>
<p>Nearly correct.<br />
This might surprise most of you, as nearly all CSS tutorials, books and other resources only talk about the aforementioned 5. The reason why there are more states is not that any is missing from those 5. The problem is that they are <strong>two different kinds of states</strong>, which are styled differently with <a href="http://www.w3.org/TR/REC-CSS2/selector.html#link-pseudo-classes">link pseudo-classes</a> and <a href="http://www.w3.org/TR/REC-CSS2/selector.html#dynamic-pseudo-classes">dynamic pseudo-classes</a>! A link is either visited or not visited, <strong>and</strong>, on top of that, a link is reacting to user interactions hover, active and focus. To make the difference clearer, ask yourself: How do you set a style to a visited link that is active?</p>
<p>All the 8 combinations are:</p>
<pre>
:link,
:link:hover,
:link:focus,
:link:active,
:visited,
:visited:hover,
:visited:focus,
:visited:active
</pre>
<p>In most cases web developers set link/visited and hover/active/focus to be the same. That makes sense, but from an usability and accessibility point of view, you might want to differentiate. At least you should think about it and, if you choose not to differentiate, you should make it a deliberate decision rather than forget about them.</p>
<h3>16</h3>
<p>Correct.<br />
I wrote &#8220;nearly correct&#8221; to this answer of &#8220;8&#8243;, because you can also combine the dynamic pseudo-classes (link pseudo-classes are mutually exclusive, while dynamic pseudo-classes are not). This gives much more possibilities, i.e.</p>
<pre>
:link:hover:focus,
:link:hover:active,
:link:focus:active,
:visited:hover:focus,
:visited:hover:active,
:visited:focus:active,
:link:hover:focus:active,
:visited:hover:focus:active
</pre>
<p>Admittedly, they are a bit ridiculous in most cases (especially the last two).</p>
<h3>20</h3>
<p>Wrong.<br />
I just put it there to confuse you. <img src='http://blog.selfthinker.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<h3>Further information</h3>
<p>These articles are very old, but still relevant:</p>
<ul>
<li><a href="http://dbaron.org/css/1999/09/links">Notes on suggesting link styles</a></li>
<li><a href="http://evolt.org/node/35541/">A revised method of defining link pseudo-classes</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.selfthinker.org/2011/07/10/trick-question-how-many-link-states-can-be-defined-in-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How a Cat got me lots of Visitors</title>
		<link>http://blog.selfthinker.org/2011/06/03/how-a-cat-got-me-lots-of-visitors/</link>
		<comments>http://blog.selfthinker.org/2011/06/03/how-a-cat-got-me-lots-of-visitors/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 01:10:12 +0000</pubDate>
		<dc:creator>selfthinker</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[joke]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.selfthinker.org/?p=299</guid>
		<description><![CDATA[When I blogged the funny picture of My Neighbour&#8217;s Sh*ved P*ssy, it had a side effect I didn&#8217;t expect: I got over 35,000 page views per month solely from searches for &#8220;sh*ved p*ssy&#8221; and all its variants. Okay, it&#8217;s actually not that surprising. But when I posted the picture, I didn&#8217;t think that far. However, [...]]]></description>
			<content:encoded><![CDATA[<p>When I blogged the funny picture of <a href="http://blog.selfthinker.org/2010/10/07/my-neighbours-shaved-pussy/">My Neighbour&#8217;s Sh*ved P*ssy</a>, it had a side effect I didn&#8217;t expect: I got over <strong>35,000 page views per month</strong> solely from searches for &#8220;<strong>sh*ved p*ssy</strong>&#8221; and all its variants.</p>
<div id="attachment_313" class="wp-caption alignright" style="width: 160px"><a href="http://blog.selfthinker.org/wp-content/uploads/2011/05/gwt_queries.png"><img src="http://blog.selfthinker.org/wp-content/uploads/2011/05/gwt_queries-150x150.png" alt="80 variations of &quot;Sh*ved P*ssy&quot;" width="150" height="150" class="size-thumbnail wp-image-313" /></a><p class="wp-caption-text">80 variations of &quot;Sh*ved P*ssy&quot; (click image to see all)</p></div>
<p>Okay, it&#8217;s actually not that surprising. But when I posted the picture, I didn&#8217;t think that far. However, the funniest thing is this list of <strong>80 search queries</strong> I found in my <a href="http://www.google.com/webmasters/tools/">Google Webmaster tools</a>, all more or less synonyms of the term &#8220;sh*ved p*ssy&#8221;.</p>
<p><em>(By the way, I&#8217;m not using the asterisks because I&#8217;m ashamed of writing the actual words. I just like to avoid to invite even more visitors who don&#8217;t really want to be here.)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.selfthinker.org/2011/06/03/how-a-cat-got-me-lots-of-visitors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS Cards (Socially) Compared</title>
		<link>http://blog.selfthinker.org/2011/05/28/css-cards-socially-compared/</link>
		<comments>http://blog.selfthinker.org/2011/05/28/css-cards-socially-compared/#comments</comments>
		<pubDate>Sat, 28 May 2011 00:16:35 +0000</pubDate>
		<dc:creator>selfthinker</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cards]]></category>
		<category><![CDATA[collaboration]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.selfthinker.org/?p=273</guid>
		<description><![CDATA[Since I wrote my CSS Playing Cards, I wondered how to best publish a comparison of all the various techniques of cards I found and how to keep it up-to-date. Then I found the answer in a great new service that&#8217;s perfect for this kind of thing: SocialCompare.com It lets you easily create and edit [...]]]></description>
			<content:encoded><![CDATA[<p>Since I wrote my <a href="http://blog.selfthinker.org/2010/08/23/css-playing-cards/">CSS Playing Cards</a>, I wondered how to best publish a comparison of all the various techniques of cards I found and how to keep it up-to-date.</p>
<p>Then I found the answer in a great new service that&#8217;s perfect for this kind of thing:<br />
<strong><a href="http://socialcompare.com/">SocialCompare.com</a></strong></p>
<p>It lets you easily create and edit comparison tables.<br />
You can compare just about anything you can think of. Anyone (well, any registered user) can edit the tables (i.e. items and criteria) or knock something together out of already existing items. It&#8217;s more future-proof as it&#8217;s easier to update and less error-prone (if the community is there to help to maintain it). It is well thought out: You can re-arrange items and criteria to see more easily what&#8217;s important to you.</p>
<p>This takes the wiki concept to the next level.<br />
If you love spreadsheets (like me), you&#8217;ll love SocialCompare.</p>
<p>Here is a preview of the <a href="http://socialcompare.com/en/comparison/css-playing-cards-pgnq7dx">Comparison of CSS Playing Cards</a> I created:</p>
<p><span id="more-273"></span></p>
<div style="background-color: #fff; margin-bottom: 1.5em;">
<iframe width="100%" height="450" src="http://socialcompare.com/en/w/css-playing-cards-pgnq7dx#nofoot;noround;noactions;noflags;header-font-size:12px;header-color:#555;header-border:none;header-padding:2px 5px;cell-font-size:12px;cell-border:none;cell-padding:2px;image-max-width:120px;image-max-height:90px" frameborder="0" scrolling="auto" marginheight="0" marginwidth="0"></iframe>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.selfthinker.org/2011/05/28/css-cards-socially-compared/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic is the new Reset</title>
		<link>http://blog.selfthinker.org/2011/05/08/basic-is-the-new-reset/</link>
		<comments>http://blog.selfthinker.org/2011/05/08/basic-is-the-new-reset/#comments</comments>
		<pubDate>Sun, 08 May 2011 20:25:35 +0000</pubDate>
		<dc:creator>selfthinker</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[reset]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.selfthinker.org/?p=241</guid>
		<description><![CDATA[I don&#8217;t like reset styles. (And I&#8217;m not the only one.) Instead I&#8217;m a fan of good basic styles. Don&#8217;t get me wrong, reset styles serve their purpose. They are good for beginners and many intermediates and can save them a lot of trouble. It&#8217;s better to use reset styles if you&#8217;re not sure why [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t like reset styles. (And <a href="http://snook.ca/archives/html_and_css/no_css_reset/">I&#8217;m not</a> <a href="http://meiert.com/en/blog/20080419/reset-style-sheets-are-bad/">the only one</a>.) Instead I&#8217;m a fan of good <strong>basic styles</strong>.</p>
<p>Don&#8217;t get me wrong, reset styles serve their purpose. They are good for beginners and many intermediates and can save them a lot of trouble. It&#8217;s better to use reset styles if you&#8217;re not sure why basic styles might be better than not to use any of those two concepts.<br />
<strong>Reset and basic styles alike should serve as a reminder to overwrite browser presets.</strong></p>
<p>I don&#8217;t see the reason why you might declare, say, the first headline to have no margin (<code>h1 {margin: 0;}</code>), only to redeclare it to have a bottom margin (<code>h1 {margin-bottom: 1em;}</code>) a few lines later.<br />
Basic styles should <strong>set</strong> all styles instead of <strong>resetting</strong> them. In order to make reset styles unnecessary, you only need to make sure to style every element and their necessary properties which <a href="http://meiert.com/en/blog/20070922/user-agent-style-sheets/">browser</a> <a href="http://www.iecss.com/">default</a> <a href="http://css-class.com/test/css/defaults/UA-style-sheet-defaults.htm">styles</a> might add. And declare everything else that makes sense in your case.</p>
<p>So, ideally you should set and reset what you need at the same time. That&#8217;s what I&#8217;m doing with my <strong>basic styles</strong>.</p>
<p>Most of these styles are quite universal. I tried to keep them as generic as possible (e.g. with many shades of grey). But they are not meant to be taken without adjusting them to each project. You most likely want to change everything I marked with &#8220;§font&#8221;, &#8220;§fsize&#8221; and &#8220;§colour&#8221;.</p>
<p>They are already part of my <a href="http://www.dokuwiki.org/template:starter">DokuWiki Starter template</a> and will therefore be part of the new (soon to come) DokuWiki default template. I will provide an <a href="http://www.selfthinker.org/basic.css">always up-to-date version</a> apart from the following current version (2011-05-08):</p>
<p><span id="more-241"></span></p>
<pre style="height: 20em; overflow: auto;">
/**
 * Basic Styles
 *
 * You will most likely want to change the font stacks, font sizes and colours. Search for the following:
 * * §font
 * * §fsize
 * * §colour
 *
 * @version 2011-05-08
 * @link    http://blog.selfthinker.org/2011/05/08/basic-is-the-new-reset/
 * @license CC0 [http://creativecommons.org/publicdomain/zero/1.0/]
 * @author  Anika Henke &lt;anika@selfthinker.org&gt;
 */

html {
    overflow-x: auto;
    overflow-y: scroll;
}
html, body {
    background-color: #fff; /* §colour  */
    color: #333; /* §colour */
    margin: 0;
    padding: 0;
    height: 100%;
}
body {
    font: normal 100%/1.4 Frutiger, "Frutiger Linotype", Univers, Calibri, Myriad, "Liberation Sans", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif; /* §fsize §font */
    /* default font size: 100% => 16px; 93.75% => 15px; 87.5% => 14px; 81.25% => 13px; 75% => 12px */
}

/*____________ headings ____________*/

h1, h2, h3, h4, h5, h6,
caption, legend {
    font-family: Constantia, Utopia, Lucidabright, Lucida, Georgia, serif; /* §font */
    font-weight: bold;
    line-height: 1.2;
    color: #666; /* §colour */
    background-color: inherit;
    padding: 0;
    clear: both;
}

h1 { font-size: 2.25em;  margin: 0 0 0.444em; } /* §fsize */
h2 { font-size: 1.5em;   margin: 0 0 0.666em; } /* §fsize */
h3 { font-size: 1.125em; margin: 0 0 0.888em; } /* §fsize */
h4 { font-size: 1em;     margin: 0 0 1.0em; } /* §fsize */
h5 { font-size: .875em;  margin: 0 0 1.1428em; } /* §fsize */
h6 { font-size: .75em;   margin: 0 0 1.333em; } /* §fsize */
/* bottom margin = 1 / font-size */

/*____________ basic margins and paddings ____________*/

p, ul, ol, dl, pre, table,
hr, blockquote, fieldset, address {
    margin: 0 0 1.4em 0; /* bottom margin = line-height */
    padding: 0;
}

div {
    margin: 0;
    padding: 0;
}

/*____________ lists ____________*/

ul, ol {
    margin-left: 1.5em;
    padding: 0;
}
li, dd {
    margin: 0 0 0 1.5em;
    padding: 0;
}
dt {
    font-weight: bold;
    margin: 0;
    padding: 0;
}

li ul, li ol, li dl,
dl ul, dl ol, dl dl {
    margin: 0;
}
li li {
    font-size: 100%;
}

ul             { list-style: disc outside; }
ol             { list-style: decimal outside; }
ol ol          { list-style-type: lower-alpha; }
ol ol ol       { list-style-type: upper-roman; }
ol ol ol ol    { list-style-type: upper-alpha; }
ol ol ol ol ol { list-style-type: lower-roman; }

/*____________ tables ____________*/

table {
    border-collapse: collapse;
    empty-cells: show;
    border-spacing: 0;
    border: 1px solid #ccc; /* §colour */
}
caption {
    caption-side: top;
    text-align: left;
    margin: 0 0 .3em;
}
th, td {
    padding: .3em .5em;
    margin: 0;
    vertical-align: top;
    text-align: left;
    border: 1px solid #ccc; /* §colour */
}
th {
    font-weight: bold;
    background-color: #eee; /* §colour */
    color: inherit;
}

/*____________ links ____________*/

a {
    background-color: inherit;
}
a:link, a:visited {
    text-decoration: none;
}
a:link {
    color: #00c; /* §colour */
}
a:visited {
    color: #606; /* §colour */
}
a:link:hover, a:visited:hover,
a:link:focus, a:visited:focus,
a:link:active, a:visited:active {
    text-decoration: underline;
}
a:link:focus, a:visited:focus {
    outline: 1px dotted;
}
a:link:active, a:visited:active {
    color: #c00; /* §colour */
}

/*____________ forms ____________*/

form {
    display: inline;
    margin: 0;
    padding: 0;
}
fieldset {
    padding: 1em 1em 0;
    border: 1px solid #999;
}
legend {
    margin: 0;
    padding: 0 .1em;
}
label {
    vertical-align: middle;
    cursor: pointer;
}
input, textarea, button,
select, optgroup, option {
    font: inherit;
    color: inherit;
    /* background-color destroys button look */
    line-height: 1;
    margin: 0;
    vertical-align: middle;
}
input[type=text], input[type=password], input.text, textarea {
    padding: .1em;
}
input[type=radio], input[type=checkbox], input.check {
    padding: 0;
}
input[type=submit], input.button, button {
    cursor: pointer;
}
input[disabled], button[disabled],
input[readonly], button[readonly] {
    cursor: auto;
}
optgroup { font-style: italic; font-weight: bold; }
option   { font-style: normal; font-weight: normal; }

/*____________ misc ____________*/

img {
    border-width: 0;
    vertical-align: middle;
    color: #666; /* §colour */
    background-color: transparent;
    font-style: italic;
}

hr {
    border-style: solid;
    border-width: 1px 0 0;
    text-align: center;
    height: 0;
    width: 100%;
    clear: both;
}

acronym, abbr {
    cursor: help;
    border-bottom: 1px dotted;
    font-style: normal;
}

pre, code, samp, kbd {
    font-family: Consolas, "Andale Mono WT", "Andale Mono", "Bitstream Vera Sans Mono", "Liberation Mono", Monaco, "Courier New", monospace; /* §font */
    font-size: 1em;
    direction: ltr;
    text-align: left;
}
pre {
    overflow: auto;
}

blockquote {
    padding: 0 1.25em;
    border: solid #ccc; /* §colour */
    border-width: 0 0 0 .25em;
}
q:before, q:after {
    content: '';
}

sub, sup {
    font-size: .8em;
    line-height: 1;
}
sub {
    vertical-align: sub;
}
sup {
    vertical-align: super;
}

/*____________ text direction ____________*/

[dir=rtl] caption,
[dir=rtl] th {
    text-align: right;
}
[dir=ltr] caption,
[dir=ltr] th {
    text-align: left;
}

[dir=rtl] ul, [dir=rtl] ol {
    margin-right: 1.5em;
    margin-left: 0;
}
[dir=ltr] ul, [dir=ltr] ol {
    margin-left: 1.5em;
    margin-right: 0;
}
[dir=rtl] li, [dir=rtl] dd {
    margin: 0 1.5em 0 0;
}
[dir=ltr] li, [dir=ltr] dd {
    margin: 0 0 0 1.5em;
}
[dir=rtl] blockquote {
    border-width: 0 .25em 0 0;
}
[dir=ltr] blockquote {
    border-width: 0 0 0 .25em;
}

/*____________ general classes ____________*/

.box {
    margin-bottom: 1.4em;
    padding: 1em 1em .2em;
    background-color: #ddd; /* §colour */
    color: inherit;
}

/* hide something in an accessible way */
.a11y {
    position: absolute;
    left: -99999px;
    top: -99999px;
    width: 0;
    height: 0;
    font-size: 0;
    overflow: hidden;
    display: inline;
}

.clear {
    clear: both;
    height: 0;
    line-height: 0;
    font-size: 1px;
    visibility: hidden;
}

/* one of the many clearfix versions */
.group {
    display: inline-block;
}
.group {
    display: block;
}
.group:before,
.group:after {
    content: "";
    display: table;
}
.group:after {
    clear: both;
}
</pre>
<p>As I am constantly learning, these styles are subject to change and improve. What will be added at some point: Basic styles for HTML5 and printing.</p>
<p>If there is any interest, I could explain most of my reasons for nearly all of the styles in subsequent posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.selfthinker.org/2011/05/08/basic-is-the-new-reset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Annotated Casanova Synopsis Wiki</title>
		<link>http://blog.selfthinker.org/2011/01/03/the-annotated-casanova-synopsis-wiki/</link>
		<comments>http://blog.selfthinker.org/2011/01/03/the-annotated-casanova-synopsis-wiki/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 12:38:38 +0000</pubDate>
		<dc:creator>selfthinker</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[annotations]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[collaboration]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[literature]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://blog.selfthinker.org/?p=224</guid>
		<description><![CDATA[One of my most favourite books ever is the Memoirs of Giacomo Casanova. A few years ago I read the version on Gutenberg.org which unfortunately has no annotations whatsoever. The lack of annotations is a real drawback, especially as they should explain facts which were known at his time and the contemporary reader has no [...]]]></description>
			<content:encoded><![CDATA[<p>One of my most favourite books ever is the <strong><a href="http://en.wikipedia.org/wiki/Histoire_de_ma_vie">Memoirs of Giacomo Casanova</a></strong>.<br />
A few years ago I read the <a href="http://www.gutenberg.org/ebooks/2981">version on Gutenberg.org</a> which unfortunately has no annotations whatsoever. The lack of annotations is a real drawback, especially as they should explain facts which were known at his time and the contemporary reader has no idea about or provide more background information on some people or translate his various Latin and other quotations.<br />
Therefore, I planned to either buy an annotated version or search for the missing information myself. (And in the end I did both.)</p>
<p>But while researching all the missing bits myself, why not share it and collaborate with others who would help researching? Sounds already like a wiki, eh?<br />
And then I read about and was fascinated by the history of the different editions and translations of the memoirs. The early editions are old enough to be in the Public Domain, so it&#8217;s easy to use them in the wiki as a basis for the annotations. So, why not present the most popular editions (French, English, German) side by side?</p>
<p>Well, that&#8217;s exactly what I did &#8230; I&#8217;m proud to present:<br />
<strong><a href="http://www.paralis.org/">Paralis.org &#8211; The Annotated Casanova Synopsis Wiki</a></strong></p>
<p>It&#8217;s a long way from being finished, but it&#8217;s a good start. Now I only need to keep it alive and search for collaborators.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.selfthinker.org/2011/01/03/the-annotated-casanova-synopsis-wiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Playing Cards</title>
		<link>http://blog.selfthinker.org/2010/08/23/css-playing-cards/</link>
		<comments>http://blog.selfthinker.org/2010/08/23/css-playing-cards/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 23:40:09 +0000</pubDate>
		<dc:creator>selfthinker</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[cards]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[gimmick]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.selfthinker.org/?p=185</guid>
		<description><![CDATA[Some days ago a friend of mine told me that he would be interested in using pure CSS playing cards for a personal project. A few people have tried CSS playing cards before. But I wasn&#8217;t satisfied with any of our findings, as ideally they should be semantic, accessible and scalable, they shouldn&#8217;t use more [...]]]></description>
			<content:encoded><![CDATA[<p>Some days ago a friend of mine told me that he would be interested in using pure <strong>CSS playing cards</strong> for a personal project. A few people have tried CSS playing cards before. But I wasn&#8217;t satisfied with any of our findings, as <strong>ideally they should be semantic, accessible and scalable, they shouldn&#8217;t use more markup than necessary and should be pleasing to the eye</strong>. So, I was up for the challenge and created them myself &#8230;<br />
<span id="more-185"></span></p>
<p>First, let&#8217;s recap what others have done before:</p>
<ul>
<li><a href="http://www.brainjar.com/css/cards/"><strong>Playing Cards with CSS</strong> by Mike Hall</a> was quite innovative at the time, but is very old by now (it is from 2001). Too much markup, only half semantic, but scalable and they don&#8217;t use any CSS3 goodness (because CSS3 didn&#8217;t exist back then).</li>
<li><a href="http://legitimatesounding.com/blog/XHTML_CSS_Playing_Cards.html"><strong>XHTML/CSS Playing Cards</strong> by Jerry Sievert</a> are half semantic, the amount of markup is okay-ish and they are the most accessible out of these four, but they are not scalable and don&#8217;t belong to the beautiful kind.</li>
<li><a href="http://htmyell.com/creating-playing-cards-with-css-html/"><strong>Creating playing cards with CSS &amp; HTML</strong> by Jamie Taylor</a> are quite beautiful, but are very unsemantic, not scalable and have a tad bit too much markup.</li>
<li><a href="http://dribbble.com/shots/37568-CSS-Playing-Cards"><strong>CSS Playing Cards</strong> by Kevin Thompson</a> are my personal favourites out of these four. They are really beautiful, are scalable (although the way they are built doesn&#8217;t display too well if the cards are too small) and plays neatly with CSS3. But although the class names are semantic, the markup (which again, is too much) is not semantic at all and completely inaccessible, i.e. it&#8217;s empty and contains no information about the cards if you turn CSS off.</li>
</ul>
<p>Why my CSS Playing Cards are better? Well, they contain less markup, they are much more semantic and accessible (so they even make sense in Lynx), they are perfectly scalable and good looking.<br />
The only negative thing: The CSS only works in modern browsers. (Tested on Win Firefox 3.6.8, Opera 10.61 and Chrome. Internet Explorer 8 cannot deal with many of the CSS3 goodness, but what makes the code unusable in IE8 is the lack of support for the &#8220;:nth-child(n)&#8221; selector. I implemented a rudimentary fix, though.)</p>
<p>And here&#8217;s the proof. This is the basic markup (only two spans in one div):</p>
<pre>
&lt;div class="card rank-7 spades"&gt;
    &lt;span class="rank"&gt;7&lt;/span&gt;
    &lt;span class="suit"&gt;&amp;spades;&lt;/span&gt;
&lt;/div>
</pre>
<p>Here is one example of a hand:</p>
<div class="playingCards fourColours faceImages rotateHand" style="padding-top: 2em; overflow: hidden;">
<ul class="hand" style="float: left;">
<li>
<div class="card rank-2 diams"><span class="rank">2</span><span class="suit">&diams;</span></div>
</li>
<li>
<div class="card rank-3 hearts"><span class="rank">3</span><span class="suit">&hearts;</span></div>
</li>
<li>
<div class="card rank-4 spades"><span class="rank">4</span><span class="suit">&spades;</span></div>
</li>
<li>
<div class="card rank-5 clubs"><span class="rank">5</span><span class="suit">&clubs;</span></div>
</li>
<li>
<div class="card rank-6 diams"><span class="rank">6</span><span class="suit">&diams;</span></div>
</li>
<li>
<div class="card rank-7 hearts"><span class="rank">7</span><span class="suit">&hearts;</span></div>
</li>
<li>
<div class="card rank-8 spades"><span class="rank">8</span><span class="suit">&spades;</span></div>
</li>
<li>
<div class="card rank-9 clubs"><span class="rank">9</span><span class="suit">&clubs;</span></div>
</li>
<li>
<div class="card rank-10 diams"><span class="rank">10</span><span class="suit">&diams;</span></div>
</li>
<li>
<div class="card rank-j hearts"><span class="rank">J</span><span class="suit">&hearts;</span></div>
</li>
<li>
<div class="card rank-q spades"><span class="rank">Q</span><span class="suit">&spades;</span></div>
</li>
<li>
<div class="card rank-k clubs"><span class="rank">K</span><span class="suit">&clubs;</span></div>
</li>
<li>
<div class="card rank-a diams"><span class="rank">A</span><span class="suit">&diams;</span></div>
</li>
</ul>
<div id="attachment_190" class="wp-caption alignright" style="width: 289px"><img src="http://blog.selfthinker.org/wp-content/uploads/2010/08/css-playing-cards-example.png" alt="" title="" width="279" height="185" class="size-full wp-image-190" /><p class="wp-caption-text">And this is how it looks in Opera</p></div>
<div class="clear"></div>
</div>
<p>Want more? You can see <strong><a href="http://blog.selfthinker.org/wp-content/uploads/2010/08/cards/examples.html">more examples</a></strong> or you can implement them and <a href="http://github.com/selfthinker/CSS-Playing-Cards">check out the code on GitHub</a> as I open-sourced it, of course.</p>
<hr />
<strong>Update</strong> (17 October 2010):<br />
Shortly after I published this, another variant surfaced the web:<br />
<a href="http://sixrevisions.com/css/css3-card-trick-a-fun-css3-experiment/"><strong>CSS3 Card Trick: A Fun CSS3 Experiment</strong> by Alexander Dawson</a> has cards which are not scalable at all, only half semantic and (like all the others) use too much markup, but are really beautiful and stylish.</p>
<p><strong>Update</strong> (2 December 2010):<br />
And I found another version:<br />
<a href="http://www.yaus.com/jeff/2009/07/23/css-cards/"><strong>CSS Cards</strong> by Jeff Yaus</a> are semantic, highly scalable, a bit weird looking, have the least markup of all so far, but are unfortunately not accessible at all.</p>
<p><strong>Last Update</strong> (28 May 2011):<br />
And I found another variety&#8230; But from now on I won&#8217;t update this post anymore, but will update my <strong><a href="http://socialcompare.com/en/comparison/css-playing-cards-pgnq7dx">Comparison of CSS Playing Cards</a></strong> on <a href="http://socialcompare.com/">SocialCompare.com</a> instead.</p>
<p><strong>Really Last Update</strong> (12 June 2011):<br />
I just updated my CSS Playing Cards. <a href="https://github.com/selfthinker/CSS-Playing-Cards/zipball/master">Get the new version from GitHub</a>.<br />
And additionally I built a <strong><a href="http://selfthinker.github.com/CSS-Playing-Cards/">beautiful new project page</a></strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.selfthinker.org/2010/08/23/css-playing-cards/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CSS Mini-Me</title>
		<link>http://blog.selfthinker.org/2010/03/03/css-mini-me/</link>
		<comments>http://blog.selfthinker.org/2010/03/03/css-mini-me/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 01:36:13 +0000</pubDate>
		<dc:creator>selfthinker</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[gimmick]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.selfthinker.org/?p=158</guid>
		<description><![CDATA[A few days ago I was trying to find my &#8220;body colours&#8221;. I took a photo of my face and colour-picked the most representative bits of my skin, hair, lips and eyes. While the results in themselves (#dcc09b, #3a2810, #b0625e, #3b453d) were nice but also completely unimportant, I wondered what else I could do with [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I was trying to find my &#8220;body colours&#8221;. I took a photo of my face and colour-picked the most representative bits of my skin, hair, lips and eyes. While the results in themselves (<span style="background-color: #dcc09b; color: #000;" title="skin">#dcc09b</span>, <span style="background-color: #3a2810; color: #fff;" title="hair">#3a2810</span>, <span style="background-color: #b0625e; color: #000;" title="lips">#b0625e</span>, <span style="background-color: #3b453d; color: #fff;" title="eyes">#3b453d</span>) were nice but also completely unimportant, I wondered what else I could do with that information.</p>
<p>I first thought about personalising my online CV to match these colours (with hair colour at the top, lip colour at the bottom and eye colour for links, etc). But somehow my body colours don&#8217;t make good website colours.</p>
<div class="photo">
<div class="head">
<div class="hair">
<div class="face">
<div class="eyel"></div>
<div class="eyer"></div>
<div class="lips"></div>
</div>
</div>
</div>
<div class="text">me</div>
</div>
<p>Instead I played around with those colours and created a pure HTML and CSS &#8220;image&#8221; of myself (the core code consists of just five divs). <span lang="fr">Et voilà</span>, here it is.</p>
<p>You will only see the full beauty of it if you use a modern browser (and can see). It&#8217;s funny how IE6 still shows something which is recognisable as a face, but turns it into some kind of a monster:</p>
<div id="attachment_159" class="wp-caption aligncenter" style="width: 289px"><img src="http://blog.selfthinker.org/wp-content/uploads/2010/03/minime_browsers.png" alt="" title="" width="279" height="171" class="size-full wp-image-159" /><p class="wp-caption-text">Beauty is in the eyes of the browser</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.selfthinker.org/2010/03/03/css-mini-me/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Silent Twittering</title>
		<link>http://blog.selfthinker.org/2009/06/27/silent-twittering/</link>
		<comments>http://blog.selfthinker.org/2009/06/27/silent-twittering/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 20:50:12 +0000</pubDate>
		<dc:creator>selfthinker</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[information overload]]></category>
		<category><![CDATA[joke]]></category>
		<category><![CDATA[micro blogging]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.selfthinker.org/?p=118</guid>
		<description><![CDATA[I am not a &#8216;Twitter person&#8217;. Watching Hugh Laurie a few weeks ago on Friday Night with Jonathan Ross saying he is none as well was a joy. But when he uttered the following joke, he gave away a splendid idea for a sensational new micro blogging site: I&#8217;m not a &#8216;Twitter person&#8217; &#8230; I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>I am not a &#8216;<a href="http://twitter.com/">Twitter</a> person&#8217;. Watching <a href="http://en.wikipedia.org/wiki/Hugh_Laurie">Hugh Laurie</a> a few weeks ago on <a href="http://en.wikipedia.org/wiki/Friday_Night_with_Jonathan_Ross">Friday Night with Jonathan Ross</a> saying he is none as well was a joy. But when he uttered the following joke, he gave away a splendid idea for a sensational new micro blogging site:</p>
<blockquote>
<p>I&#8217;m <strong>not</strong> a &#8216;Twitter person&#8217; &#8230; I&#8217;m more of a &#8216;<strong>Shh</strong> person&#8217;. I subscribed to this &#8216;<strong>Shh</strong> network&#8217;, where you write something down, but don&#8217;t send it anywhere.</p>
</blockquote>
<p>I thought someone might have picked this idea up or had the same idea before, but my short search for such an (obviously hoax) service was unsuccessful. So, I created one myself:</p>
<p><strong><a href="http://shh.selfthinker.org/">Shh&#8230;</a></strong></p>
<p>Apart from the fun of &#8220;cloning&#8221; Twitter, writing a better front-end code and having the satisfying feeling of implementing a small project all in one day, I also had the idea of twittering silence on twitter itself. You can follow my as interesting as everybody else&#8217;s tweets on:</p>
<p><strong><a href="http://twitter.com/_shh">@_shh</a></strong></p>
<p>By the way, I needed the underscore because a twitter user called &#8216;shh&#8217; already existed &#8230; as did &#8216;shhh&#8217; &#8230; and &#8216;shhhh&#8217; &#8230; and &#8216;shhhhh&#8217; &#8230; I could have taken &#8216;shhhhhhhhhhhhhhh&#8217;, but maybe that wouldn&#8217;t have been such a good idea. Seems a bit desperate, doesn&#8217;t it?</p>
<p>These two projects are really a bit unrelated. They serve the purpose of linking to each other. (Yeah, my middle name is &#8220;PR&#8221;. Or was it &#8220;SEO&#8221;? Where is your birth certificate when you need it?)<br />
And, of course, they share the same philosophy: <strong>&#8220;Silent twittering&#8221; for fun and more privacy awareness</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.selfthinker.org/2009/06/27/silent-twittering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sliding Doors Squared</title>
		<link>http://blog.selfthinker.org/2009/03/29/sliding-doors-squared/</link>
		<comments>http://blog.selfthinker.org/2009/03/29/sliding-doors-squared/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 20:06:48 +0000</pubDate>
		<dc:creator>selfthinker</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[rounded corners]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.selfthinker.org/?p=91</guid>
		<description><![CDATA[A few days ago I was searching for the best production usable solution for rounded corners in XHTML/CSS. I know there is no perfect solution, as many people have different needs and each new technique has its disadvantages. But I finally found something very close to it &#8230; What I was looking for: usable in [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I was searching for the best production usable solution for rounded corners in XHTML/CSS. I know there is no perfect solution, as many people have different needs and each new technique has its disadvantages. But I finally found something very close to it &#8230;</p>
<p><span id="more-91"></span> What I was looking for:</p>
<ul>
<li>usable in a production environment: should work in all major browsers</li>
<li>should satisfy designers: should make it possible to have fancy borders, gradient backgrounds, drop shadows, etc</li>
<li>should satisfy coders: usable, accessible, semantic (to a certain extent), no JavaScript, not too many unnecessary extra elements or hacks</li>
<li>flexible: resizable, shrink-wrappable, same code for big boxes or small link buttons, easy to maintain, easy to adjust</li>
<li>optional: creating them should not involve too much work</li>
</ul>
<p>Nearly every technique I used before needed a fixed width or had only two rounded corners or had other drawbacks. I had only found one single technique that fulfilled all my basic needs, but was not very handy to use and had other limitations (such as no way to do a decent hover effect, difficult to maintain and one annoying bug in IE 6).</p>
<p>While I was searching for a new technique I came across one which already came quite close: <a href="http://www.456bereastreet.com/archive/200705/creating_bulletproof_graphic_link_buttons_with_css/">Creating bulletproof graphic link buttons with CSS</a></p>
<p>But this technique has a few drawbacks:</p>
<ul>
<li>Additional to one big background image with all of the necessary elements in it, it also uses a second one just for the corners.</li>
<li>It cannot handle fancy backgrounds.</li>
<li>It doesn&#8217;t allow nesting of elements with rounded corners.</li>
<li>Using the same technique for other elements needs adjusting.</li>
<li>No fancy hover effects are possible.</li>
</ul>
<p>So, I fiddled around with it and improved and enhanced it. Here is how:</p>
<div id="attachment_108" class="wp-caption alignleft" style="width: 230px"><img class="size-full wp-image-108 "  src="http://blog.selfthinker.org/wp-content/uploads/2009/03/original.png" alt="" width="220" height="90" /><p class="wp-caption-text">The original solution</p></div>
<h3>0. The Original</h3>
<p>I won&#8217;t repeat what Roger Johansson wrote in his <a href="http://www.456bereastreet.com/archive/200705/creating_bulletproof_graphic_link_buttons_with_css/">original article</a>. I recommend reading it first to understand what I&#8217;m talking about.</p>
<p class="demo"><a href="http://blog.selfthinker.org/wp-content/uploads/2009/03/rounded-corners/0__the_original.html">Step 0: The Original (Demo)</a></p>
<h3>1. One Background Image</h3>
<p>The first thing I wanted to get rid of is this strange second background image. Although the <code>corner.gif</code> image contains all of the four corners with a lot of transparent space in between them, the original technique uses it only for the top right and bottom right corner. So, at least 90% of that image is not really needed.</p>
<p>I soon noticed that the bottom right corner does not need to use <code>corner.gif</code>, but can use the normal <code>button.gif</code> just like the rest. So, the only thing to fix was the top right corner.</p>
<p>Every other corner is easy to position because each previous element has a padding exactly where the following element cannot overlap the previous corner. The only tricky bit is the first corner that isn&#8217;t &#8220;protected&#8221; by a previous padding: the top left one. To &#8220;protect&#8221; the top left corner nonetheless, I just gave the first span a left margin, which I removed again from the second span with a negative margin of the same value. <span lang="fr">Et voilà</span>, no second image needed.</p>
<p class="demo"><a href="http://blog.selfthinker.org/wp-content/uploads/2009/03/rounded-corners/1__one_background_image.html">Step 1: One Background Image (Demo)</a></p>
<h3>2. One Span Less</h3>
<p>Then I wondered: Why are there <strong>five</strong> background image placements and not <strong>four</strong>? The last innermost span has the background strangely attached to &#8220;right center&#8221;. And sure enough, I could safely delete the last span and thus could get rid of one unneeded span (13 characters per rounded element after all).<br />
The padding from that deleted span is plainly added to the preceding span.</p>
<p class="demo"><a href="http://blog.selfthinker.org/wp-content/uploads/2009/03/rounded-corners/2__one_span_less.html">Step 2: One Span Less (Demo)</a></p>
<h3>3. Fancier Background</h3>
<p>Why should it be &#8220;tricky to give the button a non-flat background colour&#8221;? Mainly because the last, innermost span defines what the major part of the button looks like. Only because the original version chose that to be from the bottom right (and therefore without the 6px on the top and on the left) it is difficult to use an image with a gradient higher than 6px. It could use a much bigger gradient on the bottom without any problems, though.</p>
<p>But as gradients are mostly found at the top, I  simply turned the order around from &#8220;top left &gt; top right &gt; bottom left &gt; bottom right&#8221; to &#8220;bottom left &gt; bottom right &gt; top left &gt; top right&#8221;. And now you can have much higher gradients (as high as the container could get minus the 6px at the bottom).</p>
<p class="demo"><a href="http://blog.selfthinker.org/wp-content/uploads/2009/03/rounded-corners/3__fancier_background.html">Step 3: Fancier Background (Demo)</a></p>
<h3>4. Rearrangement</h3>
<p>Then I rearranged the code a bit, basically to removed things unrelated to the link nature from <code>.button:link</code>, etc and to move every occurrence of the background image to one single line, so that it&#8217;s easier to exchange.</p>
<p>I also fixed a bug in IE 6 introduced with the fancier background changes: IE 6 doesn&#8217;t like a bottom padding on the now innermost span.</p>
<p class="demo"><a href="http://blog.selfthinker.org/wp-content/uploads/2009/03/rounded-corners/4__rearrangement.html">Step 4: Rearrangement (Demo)</a></p>
<h3>5. Hover</h3>
<p>With those changes it is much easier to exchange the background image on hover with just a few more lines of code.</p>
<p class="demo"><a href="http://blog.selfthinker.org/wp-content/uploads/2009/03/rounded-corners/5__hover.html">Step 5: Hover (Demo)</a></p>
<h3>6. Hoverissimo</h3>
<p>Some time ago my boss wished a link button that exchanges the gradient on hover from top to bottom. With this technique the only problem was the aforementioned problem that you can either have a link button with its main background at the top or at the bottom. To be able to exchange these background gradient positions, I had to turn the order of the background position around again (as in Step 3) as they were before, but this time only for the hover state.</p>
<p class="demo"><a href="http://blog.selfthinker.org/wp-content/uploads/2009/03/rounded-corners/6__hoverissimo.html">Step 6: Hoverissimo (Demo)</a></p>
<h3>7. Other Button Types</h3>
<p>Now adding other different button types is a piece of cake: Simply add another class for each new type and give it a different background image (and change the background and font colour accordingly, if necessary).</p>
<p class="demo"><a href="http://blog.selfthinker.org/wp-content/uploads/2009/03/rounded-corners/7__other_button_types.html">Step 7: Other Button Types (Demo)</a></p>
<h3>8.More Universal</h3>
<p>Now there are only two problems left: If you plan to use this code not only for link buttons, but also for bigger boxes with block elements, you cannot use the code as it is now. You could just exchange the spans with divs and duplicate each line in the CSS code to accommodate that. But what if you have to use another div in there?</p>
<p>Although I&#8217;ve normally long outgrown the &#8216;classitis&#8217; phase, in this case I think, using classes makes the code much more flexible to use. It reduces the CSS code, but increases the HTML again (by 42 characters per rounded element).<br />
And I normally like to give semantic class names, but here rounded corners itself have no semantic meaning, so I contended myself with giving the classes names that are short and have a functional meaning instead. I also renamed &#8220;button&#8221; to &#8220;rounded&#8221;, because as soon as this technique isn&#8217;t used on a link button, its name would be erroneous.</p>
<p class="demo"><a href="http://blog.selfthinker.org/wp-content/uploads/2009/03/rounded-corners/8__more_universal.html">Step 8: More Universal (Demo)</a></p>
<div id="attachment_109" class="wp-caption alignright" style="width: 230px"><img class="size-full wp-image-109 " src="http://blog.selfthinker.org/wp-content/uploads/2009/03/new_solution.png" alt="" width="220" height="90" /><p class="wp-caption-text">The new solution</p></div>
<h3>9. Any Container</h3>
<p>Finally, with these former changes it is now possible to use this technique on any container, not only on links or inline elements, but on bigger boxes, too. And these rounded containers can even contain other rounded containers.</p>
<p class="demo"><a href="http://blog.selfthinker.org/wp-content/uploads/2009/03/rounded-corners/9__any_container.html">Step 9: Any Container (Demo)</a></p>
<h3>Final Code</h3>
<p>My final basic code (without the &#8220;hoverissimo&#8221; code for the sake of brevity):</p>
<pre>&lt;a class="rounded &lt;type&gt;" href="#"&gt;
  &lt;span class="i1 bg"&gt;&lt;span class="i2 bg"&gt;&lt;span class="i3 bg"&gt;
    Link
  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/a&gt;

&lt;div class="rounded &lt;type&gt;"&gt;
  &lt;div class="i1 bg"&gt;&lt;div class="i2 bg"&gt;&lt;div class="i3 bg"&gt;
    &lt;p&gt;Block level content&lt;/p&gt;
  &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;</pre>
<pre>.rounded,
.rounded .bg {
  background-repeat: no-repeat;
  display: block;
}
.rounded {
  float:left;
  background-position:left bottom;
}
.rounded .i1 {
  padding:0 0 9px;
  background-position:right bottom;
  margin-left: 6px;
}
.rounded .i2 {
  padding:0 0 0 6px;
  background-position:left top;
  margin-left: -6px;
}
.rounded .i3 {
  padding:9px 12px 0 6px /* no bottom padding because of IE6 */;
  background-position:right top;
}</pre>
<pre>/* for each type */
.&lt;type&gt;,
.&lt;type&gt; .bg {
  background-image: url(&lt;type_image&gt;.gif);
  background-color: &lt;type_background_colour&gt;;
  color: &lt;type_font_colour&gt;;
}
/* for hover effect on links */
a.&lt;type&gt;:hover,
a.&lt;type&gt;:hover .bg {
  background-image: url(&lt;type_hover_image&gt;.gif);
}
/* left out :link, :visited, :active and :focus state
   for documenting purposes and readability */</pre>
<div id="attachment_107" class="wp-caption aligncenter" style="width: 625px"><img class="size-full wp-image-107 " src="http://blog.selfthinker.org/wp-content/uploads/2009/03/new_solution_box.png" alt="" width="615" height="314" /><p class="wp-caption-text">The final result: The same technique for the box and the link button within</p></div>
<p>I called this technique <strong>&#8220;Sliding Doors Squared&#8221;</strong>, because it is basically an enhanced version of the <a href="http://www.alistapart.com/articles/slidingdoors/">Sliding Doors technique</a>. Although this technique is great and recommended for two rounded corners with a flexible width or four rounded corners with a fixed width, it cannot be used for completely flexible rounded corners. The &#8220;Sliding Doors Squared&#8221; technique uses the Sliding Doors technique not only horizontally, but also vertically and therefore fills this gap.</p>
<p>Despite all its advantages, there are some disadvantages:</p>
<ul>
<li>the background image has to be rather large (the maximum width and height of the container are defined by the width and height of the background image)</li>
<li>CSS sprites cannot be used for hover effects (at least not before CSS3), so there will be two requests and a flicker at first</li>
<li>the corners must not be transparent</li>
</ul>
<p>As yet I have tested this technique in <strong>IE 6, IE 7, Firefox 3, Opera 9 and Chrome</strong> and it behaves very well so far without any differences or even hacks (no, not even for IE 6!).</p>
<p>For just two rounded corners or simple four rounded corners with a fixed width this might be overkill. <strong>But as soon as you need more flexibility or need an easy way to use drop shadows, fancy borders, gradients or link states, this is the ultimate technique to use.</strong></p>
<p>PS: After I finished the code I took a look at the comments for the original article and realised that the first two steps were already solved in there. That could have saved me about 30 minutes, but at least playing with the code got me going further.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.selfthinker.org/2009/03/29/sliding-doors-squared/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

