<?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>justaddwater.dk &#187; CSS</title>
	<atom:link href="http://justaddwater.dk/category/webstandards/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://justaddwater.dk</link>
	<description>Instant Usability &#38; Web Standards</description>
	<lastBuildDate>Thu, 10 Jun 2010 08:23:32 +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>Script identifying CSS shorthand possibilities</title>
		<link>http://justaddwater.dk/2009/10/21/script-identifying-css-shorthand-possibilities/</link>
		<comments>http://justaddwater.dk/2009/10/21/script-identifying-css-shorthand-possibilities/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 12:29:17 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1211</guid>
		<description><![CDATA[For my own convenience I created this script to identify css files where colors like #aaaaaa can be rewritten in the short form #aaa
(saves bandwith, but can also make it easier to identify similar colors)

grep -nE '#([0-9a-f])\1([0-9a-f])\2([0-9a-f])\3' **/*.css

output from a random project:

css/actions.css:19:  color: #000000;
css/actions.css:38:  color: #000000 !important;
css/actions.css:53:  color: #ffffff !important;
css/admin.css:90:	color: #cccccc;
css/admin.css:94:	color: #aaaaaa [...]]]></description>
			<content:encoded><![CDATA[<p>For my own convenience I created this script to identify css files where colors like #aaaaaa can be rewritten in the short form #aaa</p>
<p>(saves bandwith, but can also make it easier to identify similar colors)</p>
<pre>
<div class="codesnip-container" >grep -nE '#([0-9a-f])\1([0-9a-f])\2([0-9a-f])\3' **/*.css</div>
</pre>
<p>output from a random project:</p>
<pre>
<div class="codesnip-container" >css/actions.css:19:  color: #000000;
css/actions.css:38:  color: #000000 !important;
css/actions.css:53:  color: #ffffff !important;
css/admin.css:90:	color: #cccccc;
css/admin.css:94:	color: #aaaaaa !important;</div>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/10/21/script-identifying-css-shorthand-possibilities/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Print CSS Background Logo Hack</title>
		<link>http://justaddwater.dk/2009/09/29/print-css-background-logo-hack/</link>
		<comments>http://justaddwater.dk/2009/09/29/print-css-background-logo-hack/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 09:08:58 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[webdevelopment]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/2009/09/29/print-css-background-logo-hack/</guid>
		<description><![CDATA[I learned this nice little hack to bypass the standard browser setting that normally prevents background images from being printed. 
The hack makes use of converting the background-image to a list item with an image. 

/* Hack, to trick the browser to print another logo
   Unfortunetaly, Firefox on Windows doesn't show logo on [...]]]></description>
			<content:encoded><![CDATA[<p>I learned this nice little hack to bypass the standard browser setting that normally prevents background images from being printed. </p>
<p>The hack makes use of converting the background-image to a list item with an image. </p>
<pre>
<div class="codesnip-container" >/* Hack, to trick the browser to print another logo
   Unfortunetaly, Firefox on Windows doesn't show logo on print
    — see Mozilla bug 133490 for further details */
#header {
  display: list-item;
  list-style-image: url(../images/logo_print.gif);
  list-style-position: inside;
	margin: 0 !important;
  padding: 0 !important;
	height: 50pt;
}</div>
</pre>
<p>This way, you don&#8217;t have to fall back to inserting an image tag in your HTML for the logo. Instead, just have an a element that contains the corporate logo text, and nothing all.</p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/09/29/print-css-background-logo-hack/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>CSS Styling Buttons Problem with Underlined Text</title>
		<link>http://justaddwater.dk/2009/09/16/css-styling-buttons-problem-with-underlined-text/</link>
		<comments>http://justaddwater.dk/2009/09/16/css-styling-buttons-problem-with-underlined-text/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 08:32:56 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[input]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=1141</guid>
		<description><![CDATA[I ran into the challenge the other day to style a&#60;button&#62; element to make it look like a link (with underline and everything).
Unfortunately, the &#60;button&#62; element does not react to text-decoration: underline;
But according to a discussion at the CSS Creator forum, there is a way out:
I was just messing around with it and for some [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into the challenge the other day to style a&lt;button&gt; element to make it look like a link (with underline and everything).</p>
<p>Unfortunately, the &lt;button&gt; element does not react to text-decoration: underline;</p>
<p>But according to <a title="CSS Forum: [Solved?] Doctype prevents underline in button input" href="http://csscreator.com/node/25902">a discussion at the CSS Creator forum</a>, there is a way out:</p>
<blockquote cite="http://csscreator.com/node/25902"><p>I was just messing around with it and for some reason this doesn&#8217;t work:</p>
<div class="codesnip-container" >input {text-decoration:underline;}</div>
<p>but this does:</p>
<div class="codesnip-container" >input {text-decoration:underline;float:left;}</div>
<p>and</p>
<div class="codesnip-container" >input{text-decoration:underline;display:block;}</div>
<p>and</p>
<div class="codesnip-container" >input{text-decoration:underline;position:absolute;}</div>
<p>Don&#8217;t ask me&#8230;  I can&#8217;t explain this one.</p></blockquote>
<p>Interesting!</p>
<p>I ended up implementing it as
<div class="codesnip-container" >display:inline-block;</div>
<p> which also works fine. Here is my final rules for styling buttons as links</p>
<blockquote>
<pre>.clickable, button.tertiary, input.tertiary{
  color: #339;
  text-decoration: underline;
  display: inline-block; /* else underline won't work */
  cursor: pointer;
  border: none;
  background-color: transparent;
  font-size: 1em;
  padding: 0;
}
.clickable:hover, button.tertiary:hover, input.tertiary:hover{
  text-decoration: underline;
  color: #669;
}</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/09/16/css-styling-buttons-problem-with-underlined-text/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS Fun: Flag Deprecated HTML Tags</title>
		<link>http://justaddwater.dk/2009/01/08/css-fun-flag-deprecated-html-tags/</link>
		<comments>http://justaddwater.dk/2009/01/08/css-fun-flag-deprecated-html-tags/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 10:47:14 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[css webdevelopment deprecated html validation]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=990</guid>
		<description><![CDATA[<a href="/2009/01/08/css-fun-flag-d…ated-html-tagscss-fun-flag-deprecated-html-tags/"><img src="http://justaddwater.dk/wp-content/uploads/2009/01/blink-and-flag-deprecated-font-b-i-tags.gif" alt="" title="blink-and-flag-deprecated-font-b-i-tags" width="249" height="165" class="alignnone size-full wp-image-991" /></a>]]></description>
			<content:encoded><![CDATA[<p>Here is a little fun CSS snippet that helped me identify deprecated HTML on a recent project. Put these lines into the CSS file of your website:</p>
<blockquote><div class="codesnip-container" >/* Watch out for invalid/deprecated HTML in CMS */<br />
b{font-size: x-large; background-color: fuchsia; color: yellow; font-weight: normal;}<br />
i{font-size: x-large; background-color: lime; color: blue; font-style: normal}<br />
font{background-color: aqua; color: red}<br />
b,i,font{text-decoration: blink;}</div>
</blockquote>
<p><a href="http://justaddwater.dk/wp-content/uploads/2009/01/blink-and-flag-deprecated-font-b-i-tags.gif"><img src="http://justaddwater.dk/wp-content/uploads/2009/01/blink-and-flag-deprecated-font-b-i-tags.gif" alt="" title="blink-and-flag-deprecated-font-b-i-tags" width="249" height="165" class="alignnone size-full wp-image-991" /></a></p>
<p>This was really useful for identifying dirty HTML that was generated from a Microsoft-based CMS. </p>
<p>Coloring and blinking text makes the editors aware that something is wrong. Two major advantages for this approach:</p>
<ul>
<li>Instant attention on HTML validation errors (also for non-developers)</li>
<li>Developers spend less time on hunting down invalid HTML that constantly sneaks into the web application.</li>
</ul>
<p>These lines may also be useful to you &#8212; unless you are able to guard your HTML before it&#8217;s inserted in your application (something that was not possible at this project).</p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2009/01/08/css-fun-flag-deprecated-html-tags/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>IE CSS Bug: Limited @include Statements</title>
		<link>http://justaddwater.dk/2008/07/01/ie-css-bug-limited-include-statements/</link>
		<comments>http://justaddwater.dk/2008/07/01/ie-css-bug-limited-include-statements/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 12:57:14 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[Browser]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=939</guid>
		<description><![CDATA[I found out that Internet explorer only interprets 32 @include statements in CSS for a webpage. The rest is silently ignored. 
Tested with IE7. Has anybody tried this with IE8?
For more info see:
Internet Explorer issue &#8211; maximum of 32 CSS @import
PS. Silent ignorance is just about the worst form for ignorance when coding. The least [...]]]></description>
			<content:encoded><![CDATA[<p>I found out that Internet explorer only interprets 32 @include statements in CSS for a webpage. The rest is silently ignored. </p>
<p>Tested with IE7. Has anybody tried this with IE8?</p>
<p>For more info see:</p>
<p><a href="http://www.agum.com/web/2008/03/11/internet-explorer-issue-maximum-of-32-css-import/" rel="bookmark" title="Agnum.com: Internet Explorer issue - maximum of 32 CSS @import">Internet Explorer issue &#8211; maximum of 32 CSS @import</a></p>
<p>PS. Silent ignorance is just about the worst form for ignorance when coding. The least they could do was to display an error in the error console.</p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2008/07/01/ie-css-bug-limited-include-statements/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Fixes to Common CSS Problems</title>
		<link>http://justaddwater.dk/2008/06/16/fixes-to-common-css-problems/</link>
		<comments>http://justaddwater.dk/2008/06/16/fixes-to-common-css-problems/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 14:10:22 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/?p=932</guid>
		<description><![CDATA[Just home again from two weeks vacation, I found this in my delicious popular feed (i usually scan the delicious popular feed for links others find interesting).
Using CSS to Fix Anything: 20+ Common Bugs and Fixes
Good explanations to some of the usual I run into. For instance, the double margin float bug in IE 6 [...]]]></description>
			<content:encoded><![CDATA[<p>Just home again from two weeks vacation, I found this in my delicious popular feed (i usually scan the delicious popular feed for links others find interesting).</p>
<p><a href="http://www.noupe.com/css/using-css-to-fix-anything-20-common-bugs-and-fixes.html" title="Noupe.com: Using CSS to Fix Anything: 20+ Common Bugs and Fixes">Using CSS to Fix Anything: 20+ Common Bugs and Fixes</a></p>
<p>Good explanations to some of the usual I run into. For instance, the double margin float bug in IE 6 </p>
<p><img src="http://noupe.com/img/cb11.gif" alt="double margin float bug" /></p>
<p>There are also examples of simple round corners (similar to the ones I have <a href="http://justaddwater.dk/2008/05/26/jquery-rounded-corners-technorati-style/">described last month</a>), links to good explanations on float theory, and more.</p>
<p><small>Technorati Tags: <a href="http://technorati.com/tag/css" rel="tag">css</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2008/06/16/fixes-to-common-css-problems/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Debugging CSS: My Best Productivity Tip Ever</title>
		<link>http://justaddwater.dk/2007/04/30/debugging-css-my-best-productivity-tip-ever/</link>
		<comments>http://justaddwater.dk/2007/04/30/debugging-css-my-best-productivity-tip-ever/#comments</comments>
		<pubDate>Sun, 29 Apr 2007 22:07:26 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/2007/04/30/debugging-css-my-best-productivity-tip-ever/</guid>
		<description><![CDATA[Firebug keeps surprising me. I&#8217;ve recently been working on code for several web designs and this little trick helped me to understand existing HTML and CSS much faster. Just to give an example I use our Justaddwater RSS feed page (but could be any page).
Before you start, get Firebug for Firefox (if you haven&#8217;t got [...]]]></description>
			<content:encoded><![CDATA[<p>Firebug keeps surprising me. I&#8217;ve recently been working on code for several web designs and this little trick helped me to understand existing HTML and CSS much faster. Just to give an example I use our Justaddwater RSS feed page (but could be any page).</p>
<p>Before you start, <a href="http://www.getfirebug.com/">get Firebug</a> for Firefox (if you haven&#8217;t got it already).</p>
<ol>
<li> Press F12 and the Firebug window appears below in the browser window</li>
<li>Start the HTML inspector and mouse over any element, you want to learn about.<br />
<a href="http://justaddwater.dk/wp-content/uploads/2007/04/firebug-css-tip-start-html-inspector.png" title="firebug-css-tip-start-html-inspector.png"><img src="http://justaddwater.dk/wp-content/uploads/2007/04/firebug-css-tip-start-html-inspector-thumb.png" alt="firebug-css-tip-start-html-inspector-thumb.png" /></a></li>
<li>Now, you can see the HTML, the hierachy,and the CSS rules. For me it has been very useful, that overridden CSS rules are marked with strikethrough text. That&#8217;s a very handy information when CSS specificity plays in with a trick or two.</li>
<li>Press escape to stop inspector mode, and move mouse down to CSS rules.</li>
<li>Mouse over the CSS rules reveal a small icon to toggle the line. See screenshot animation below.</li>
</ol>
<p><img src="http://justaddwater.dk/wp-content/uploads/2007/04/firebug-css-bugfix-toggle.gif" alt="firebug-css-bugfix-toggle.gif" /></p>
<p>This trick will probably completely replace my use of &#8220;edit CSS&#8221; in <a href="https://addons.mozilla.org/en-US/firefox/addon/60" title="Web developer toolbar Firefox Add-on">Webdeveloper toolbar</a>, the nifty <a href="https://addons.mozilla.org/en-US/firefox/addon/2104" title="CSSViewer Firefox Add-on">CSSViewer add-on</a>, and the <a href="http://slayeroffice.com/tools/modi/v2.0/modi_help.html" title="Slayeroffice: Modi2 (mouse over DOM inspector) by Steve Chipmann">mouseover DOM inspector</a> bookmarklet.</p>
<p>Related info:</p>
<ul>
<li>Justaddwater: <a href="http://justaddwater.dk/2005/11/30/web-developers-collection-of-browser-tools/" rel="bookmark" title="Permanent Link: Web developer’s collection of browser tools">Web developer’s collection of browser tool</a> (November 2005)</li>
<li><a href="http://www.getfirebug.com/keyboard.html">Firebug keyboard shortcuts</a></li>
</ul>
<p><small>Technorati Tags: <a href="http://technorati.com/tag/css" rel="tag">css</a>, <a href="http://technorati.com/tag/debug" rel="tag"> debug</a>, <a href="http://technorati.com/tag/debugging" rel="tag"> debugging</a>, <a href="http://technorati.com/tag/style+editor" rel="tag"> style editor</a>, <a href="http://technorati.com/tag/css+view" rel="tag"> css view</a>, <a href="http://technorati.com/tag/firefox+plugin" rel="tag"> firefox plugin</a>, <a href="http://technorati.com/tag/firefox+add-on" rel="tag"> firefox add-on</a>, <a href="http://technorati.com/tag/modi2" rel="tag"> modi2</a>, <a href="http://technorati.com/tag/slayeroffice" rel="tag"> slayeroffice</a>, <a href="http://technorati.com/tag/firebug" rel="tag"> firebug</a>, <a href="http://technorati.com/tag/productivity" rel="tag"> productivity</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2007/04/30/debugging-css-my-best-productivity-tip-ever/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>E-Texteditor For Windows</title>
		<link>http://justaddwater.dk/2007/04/28/e-texteditor-for-windows/</link>
		<comments>http://justaddwater.dk/2007/04/28/e-texteditor-for-windows/#comments</comments>
		<pubDate>Fri, 27 Apr 2007 22:55:38 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/2007/04/28/e-texteditor-for-windows/</guid>
		<description><![CDATA[I have been looking a fast, intuitive editor for my Windows laptop.
Now I stopped looking. E-texteditor for windows is very intuitive and easy to use.  I highly recommend watching the screencast (a short tour of some of the best features). Although it&#8217;s still in beta, it seems so much better than the alternatives.
I&#8217;m using [...]]]></description>
			<content:encoded><![CDATA[<p>I have been looking a fast, intuitive editor for my Windows laptop.</p>
<p>Now I stopped looking. E-texteditor for windows is very intuitive and easy to use.  I highly recommend watching the screencast (a short tour of some of the best features). Although it&#8217;s still in beta, it seems so much better than the alternatives.</p>
<p>I&#8217;m using it for HTML, CSS, JavaScript, Ruby on Rails editing. And it just works.</p>
<p><a href="http://www.e-texteditor.com/index.html" title="E-texteditor homepage with screenshot"><img src="http://justaddwater.dk/wp-content/uploads/2007/04/e-texteditor-homepage.png" alt="e-texteditor-homepage.png" /></a></p>
<p>One note for avoiding future head-scratching: In order to get the keyboard shortcuts (so-called bundles) to work, I had to delete Cygwin and let E install it automatically. Afterwards I had to add packages manually: Subversion (svn)</p>
<p>Other improvements that would be handy:<br />
In HTML mode there is a shortcut &#8220;doctype [tab]&#8220;, but there is no shortcut for creating the rest of the HTML document. It&#8217;s probably easy to add (but  i&#8217;m not into doing it yet). Besides, I think an addition like this would be a benefit to everybody, so it should be included in the general bundle.</p>
<p>In Ruby files, when looking on Ruby on Rails, it defaults the files to Ruby (because they are and they end in .rb). However, there is a lot of functionality with regards to Rails, so it would actually work better, if .rb defaulted to Ruby. Here is a <a href="http://www.e-texteditor.com/forum/viewtopic.php?p=3361#3361" title="E-texteditor forum: Set Rails file from Ruby to Rails">workaround to add .rb files to Rails syntax</a>.</p>
<p>I also added a bug report &#8220;<a href="http://www.e-texteditor.com/forum/viewtopic.php?t=1120" title="E-Texteditor forum">Block selection should work without the mouse</a>&#8221; (guess I&#8217;m a usability geek).</p>
<p>The simple <a href="http://cheat.errtheblog.com/s/e/" title="ErrTheBlog E-texteditor cheatsheet.">cheatsheet for E-texteditor</a> at errtheblog is worth checking out, although it contains only the general shortcuts and not the Rails specific ones. Via: <a href="http://www.rubyinside.com/e-texteditor-a-windows-textmate-or-why-apple-should-buy-textmate-413.html" rel="bookmark" title="RubyInside: E-TextEditor: A Windows TextMate? (Or ">RubyInside</a>.</p>
<p><small>Technorati Tags: <a href="http://technorati.com/tag/editor" rel="tag">editor</a>, <a href="http://technorati.com/tag/e-texteditor" rel="tag"> e-texteditor</a>, <a href="http://technorati.com/tag/etexteditor" rel="tag"> etexteditor</a>, <a href="http://technorati.com/tag/windows" rel="tag"> windows</a>, <a href="http://technorati.com/tag/textmate" rel="tag"> textmate</a>, <a href="http://technorati.com/tag/html" rel="tag">  html</a>, <a href="http://technorati.com/tag/css" rel="tag"> css</a>, <a href="http://technorati.com/tag/javascript" rel="tag"> javascript</a>, <a href="http://technorati.com/tag/rails" rel="tag"> rails</a>, <a href="http://technorati.com/tag/ruby+on+rails" rel="tag"> ruby on rails</a>, <a href="http://technorati.com/tag/ruby" rel="tag"> ruby</a>, <a href="http://technorati.com/tag/rubyonrails" rel="tag"> rubyonrails</a>, <a href="http://technorati.com/tag/cygwin" rel="tag"> cygwin</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2007/04/28/e-texteditor-for-windows/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Rounded Corners the Technorati Way</title>
		<link>http://justaddwater.dk/2007/02/15/rounded-corners-the-technorati-way/</link>
		<comments>http://justaddwater.dk/2007/02/15/rounded-corners-the-technorati-way/#comments</comments>
		<pubDate>Thu, 15 Feb 2007 11:01:05 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/2007/02/15/rounded-corners-the-technorati-way/</guid>
		<description><![CDATA[It&#8217;s been a while where web standards don&#8217;t get the attention it deserves on this blog. In that spirit, here&#8217;s a behind-the-scenes view on how Technorati makes rounded corners on a faded background.

I remember Eric Meyer mentioned this solution back at a workshop in 2005 (before he could actually tell that it was for  [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while where web standards don&#8217;t get the attention it deserves on this blog. In that spirit, here&#8217;s a behind-the-scenes view on how Technorati makes rounded corners on a faded background.</p>
<p><img src="http://justaddwater.dk/wp-content/uploads/2007/02/technorati-rounded-corner-justadwater-rank-9980-mini.png" id="image549" alt="Technorati screenshot of box with rounded corners on faded background (showing Justaddwater Ranks no. 9980 on Technorati)" /></p>
<p>I remember Eric Meyer mentioned this solution back at a workshop in 2005 (before he could actually tell that it was for  Technorati — the redesign was unveiled a few days later).</p>
<h3>Technique</h3>
<p>HTML for the box:</p>
<pre>
<div class="codesnip-container" >
<div class="html4strict codesnip" style="font-family:monospace;"><span class="sc2">&lt;<a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">&quot;bloginfo-summary boxc&quot;</span>&gt;</span>
&nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/h2.html"><span class="kw2">h2</span></a>&gt;</span>..<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/h2.html"><span class="kw2">h2</span></a>&gt;</span>
&nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/ul.html"><span class="kw2">ul</span></a>&gt;</span>
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span>..<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/li.html"><span class="kw2">li</span></a>&gt;</span>
&nbsp; &nbsp; ..
&nbsp; <span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/ul.html"><span class="kw2">ul</span></a>&gt;</span>
&nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/b.html"><span class="kw2">b</span></a> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">&quot;cn tr&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/b.html"><span class="kw2">b</span></a>&gt;</span>
&nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/b.html"><span class="kw2">b</span></a> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">&quot;cn br&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/b.html"><span class="kw2">b</span></a>&gt;</span>
&nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/b.html"><span class="kw2">b</span></a> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">&quot;cn tl&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/b.html"><span class="kw2">b</span></a>&gt;</span>
&nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/b.html"><span class="kw2">b</span></a> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">&quot;cn bl&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/b.html"><span class="kw2">b</span></a>&gt;</span>
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a>&gt;</span></div>
</div>
</pre>
<p>The HTML is then styled with the following CSS:</p>
<pre>
<div class="codesnip-container" >
<div class="css codesnip" style="font-family:monospace;">div<span class="re1">.bloginfo-summary</span> <span class="br0">&#123;</span><span class="kw1">background</span><span class="sy0">:</span>
&nbsp; <span class="kw2">url</span><span class="br0">&#40;</span><span class="co2">http://static.technorati.com/static/css/img/bg/fade-lightgreen.png</span><span class="br0">&#41;</span> <span class="kw2">repeat-x</span><span class="sy0">;</span>
&nbsp; <span class="kw1">float</span><span class="sy0">:</span><span class="kw1">left</span><span class="sy0">;</span>margin-<span class="kw1">bottom</span><span class="sy0">:</span><span class="re3">20px</span><span class="sy0">;</span>padding<span class="sy0">:</span><span class="re3">10px</span><span class="sy0">;</span>width<span class="sy0">:</span><span class="re3">690px</span><span class="br0">&#125;</span>
<span class="coMULTI">/* Large radius image backgrounds */</span>
<span class="re1">.boxc</span> <span class="br0">&#123;</span><span class="kw1">position</span><span class="sy0">:</span><span class="kw2">relative</span><span class="sy0">;</span><span class="br0">&#125;</span>
<span class="re1">.boxc</span> b<span class="re1">.cn</span> <span class="br0">&#123;</span> <span class="kw1">height</span><span class="sy0">:</span> <span class="re3">10px</span><span class="sy0">;</span> <span class="kw1">width</span><span class="sy0">:</span> <span class="re3">10px</span><span class="sy0">;</span> <span class="kw1">background</span><span class="sy0">:</span>
&nbsp;<span class="kw2">url</span><span class="br0">&#40;</span><span class="co2">http://static.technorati.com/static/css/img/corners/white.png</span><span class="br0">&#41;</span> <span class="kw2">no-repeat</span><span class="sy0">;</span>
&nbsp;<span class="kw1">position</span><span class="sy0">:</span><span class="kw2">absolute</span><span class="sy0">;</span>
&nbsp;<span class="br0">&#125;</span>
<span class="re1">.boxc</span> b<span class="re1">.tl</span> <span class="br0">&#123;</span><span class="kw1">top</span><span class="sy0">:</span> <span class="re3">-1px</span><span class="sy0">;</span> <span class="kw1">left</span><span class="sy0">:</span> <span class="re3">-1px</span><span class="sy0">;</span> <span class="kw1">background-position</span><span class="sy0">:</span> <span class="kw1">top</span> <span class="kw1">left</span><span class="sy0">;</span><span class="br0">&#125;</span>
<span class="re1">.boxc</span> b<span class="re1">.tr</span> <span class="br0">&#123;</span><span class="kw1">top</span><span class="sy0">:</span> <span class="re3">-1px</span><span class="sy0">;</span> <span class="kw1">right</span><span class="sy0">:</span> <span class="re3">-1px</span><span class="sy0">;</span> <span class="kw1">background-position</span><span class="sy0">:</span> <span class="kw1">top</span> <span class="kw1">right</span><span class="sy0">;</span><span class="br0">&#125;</span>
<span class="re1">.boxc</span> b<span class="re1">.bl</span> <span class="br0">&#123;</span><span class="kw1">bottom</span><span class="sy0">:</span> <span class="re3">-1px</span><span class="sy0">;</span> <span class="kw1">left</span><span class="sy0">:</span> <span class="re3">-1px</span><span class="sy0">;</span> <span class="kw1">background-position</span><span class="sy0">:</span> <span class="kw1">bottom</span> <span class="kw1">left</span><span class="sy0">;</span><span class="br0">&#125;</span>
<span class="re1">.boxc</span> b<span class="re1">.br</span> <span class="br0">&#123;</span><span class="kw1">bottom</span><span class="sy0">:</span> <span class="re3">-1px</span><span class="sy0">;</span> <span class="kw1">right</span><span class="sy0">:</span> <span class="re3">-1px</span><span class="sy0">;</span> <span class="kw1">background-position</span><span class="sy0">:</span> <span class="kw1">bottom</span> <span class="kw1">right</span><span class="sy0">;</span><span class="br0">&#125;</span>

<span class="coMULTI">/* IE Filters */</span>
&nbsp; &nbsp; <span class="sy0">*</span> html <span class="re1">.boxc</span> b<span class="re1">.bl</span> <span class="br0">&#123;</span><span class="kw1">bottom</span><span class="sy0">:</span><span class="re3">-2px</span><span class="br0">&#125;</span>
&nbsp; &nbsp; <span class="sy0">*</span> html <span class="re1">.boxc</span> b<span class="re1">.br</span> <span class="br0">&#123;</span><span class="kw1">bottom</span><span class="sy0">:</span><span class="re3">-2px</span><span class="br0">&#125;</span>
&nbsp; &nbsp; <span class="sy0">*</span> html <span class="re1">.boxc</span> b<span class="re1">.cn</span> <span class="br0">&#123;</span><span class="kw1">background-image</span><span class="sy0">:</span>
&nbsp; &nbsp; &nbsp; &nbsp;<span class="kw2">url</span><span class="br0">&#40;</span><span class="co2">http://static.technorati.com/static/css/img/corners/white.gif</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">line-height</span><span class="sy0">:</span> <span class="re3">1px</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">font-size</span><span class="sy0">:</span> <span class="re3">1px</span><span class="sy0">;</span>
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</div>
</pre>
<p>So, graphically displayed, the
<div class="codesnip-container" >&lt;b&gt;</div>
<p> elements are actually positioned in each corner with no content:</p>
<p><img src="http://justaddwater.dk/wp-content/uploads/2007/02/technorati-rounded-corner-html-tags-mini.png" id="image553" alt="Technorati screenshot of box with rounded corners on faded background showing HTML elements" /></p>
<p>Note that the background-image for the faded box is one thin sliced faded image:<br />
<img src="http://static.technorati.com/static/css/img/bg/fade-lightgreen.png" alt="technorati faded background slice" /></p>
<p>The corners is made with only one image that&#8217;s positioned differently depending on which corner it&#8217;s in. The image is actually a transparent circle on white background.</p>
<p style="background-color: #339933; color: #dddddd; height: 30px; line-height: 30px"><img src="http://static.technorati.com/static/css/img/corners/white.gif" alt="technorati rounded corner image" /> shown on dark background for clarity.</p>
<p>So I <a href="http://justaddwater.dk/wp-content/uploads/2007/03/technorati-style-rounded-corners.html" title="Example page: technorati-style rounded corners">included the final example on a separate page</a> (because the Wordpress editor doesn&#8217;t let me add the HTML code precisely as it&#8217;s required)</p>
<p><a href="http://justaddwater.dk/wp-content/uploads/2007/03/technorati-style-rounded-corners.html" title="Example page: technorati-style rounded corners">example page: technorati-style rounded corners</a></p>
<p>More info<br />
Eric Meyer: <a href="http://meyerweb.com/eric/thoughts/2005/06/21/technorati-redesigns/">Technorati Redesigns</a> (June 2005)<br />
Smileycat: <a href="http://www.smileycat.com/miaow/archives/000044.html">CSS Rounded Corners Roundup</a></p>
<p><small>Technorati Tags: <a href="http://technorati.com/tag/web+standards" rel="tag">web standards</a>, <a href="http://technorati.com/tag/css" rel="tag"> css</a>, <a href="http://technorati.com/tag/html" rel="tag"> html</a>, <a href="http://technorati.com/tag/rounded+corners" rel="tag"> rounded corners</a>, <a href="http://technorati.com/tag/technorati" rel="tag"> technorati</a>, <a href="http://technorati.com/tag/tantek+celic" rel="tag"> tantek celic</a>, <a href="http://technorati.com/tag/eric+meyer" rel="tag"> eric meyer</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2007/02/15/rounded-corners-the-technorati-way/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Who Invented the Spacer.gif (Part 2)</title>
		<link>http://justaddwater.dk/2007/02/11/who-invented-the-spacergif-part-2/</link>
		<comments>http://justaddwater.dk/2007/02/11/who-invented-the-spacergif-part-2/#comments</comments>
		<pubDate>Sun, 11 Feb 2007 18:48:48 +0000</pubDate>
		<dc:creator>Jesper Rønn-Jensen</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://justaddwater.dk/2007/02/11/who-invented-the-spacergif-part-2/</guid>
		<description><![CDATA[All of a sudden, <a href="http://www.directaccess.tv/" title="Joe Kleinberg (directaccess.tv)">Joe Kleinberg</a> posted a comment on "<a href="http://justaddwater.dk/2006/03/03/who-invented-the-spacergif/" title="Justaddwater.dk: Who invented the Spacer.gif?">Who invented the Spacer.gif</a>", with the claim that he actually invented the technique [before David Siegel]:]]></description>
			<content:encoded><![CDATA[<p>All of a sudden, <a href="http://www.directaccess.tv/" title="Joe Kleinberg (directaccess.tv)">Joe Kleinberg</a> posted a comment on &#8220;<a href="http://justaddwater.dk/2006/03/03/who-invented-the-spacergif/" title="Justaddwater.dk: Who invented the Spacer.gif?">Who invented the Spacer.gif</a>&#8220;, with the claim that he actually invented the technique [before David Siegel]:</p>
<blockquote cite="http://justaddwater.dk/2006/03/03/who-invented-the-spacergif/#comment-77886"><p>Not to crash anyones party, but as far as I know, I actually came up with it first. I was working in San Francisco at Young and Rubicam, a major ad agency. I was part of a division called RPM,</p>
<p>We were in charge of designing for marketing and such. We had Chevron as a client, and they were going to launch an important campaign, it was a car character, like the cars from the Pixar movie last year. This was their new mascot.</p>
<p>We were designing a site for it. I had already gotten pretty good at HTML and worked out the spacer for my design problems, tables didn&#8217;t work right, and so many things were not cross browser compatible.</p>
<p>I named it spacer, just a quirky wording I thought appropriate, since it wasn&#8217;t actually a space, and if I was doing a text string search, I wanted it to 1. stand out, and 2. not interfere with the word &#8217;space&#8217; itself.</p></blockquote>
<p>That&#8217;s an interesting update to the story, and it also deserves an update in the wikipedia article on <a href="http://en.wikipedia.org/wiki/Spacer_GIF" title="Wikipedia: Spacer.gif">Spacer.gif</a>.</p>
<p>I emailed Joe to ask him if any screenshots, pictures, hardcopies were left from that site, and got this reply:</p>
<blockquote><p>Jesper,</p>
<p>Hey man. Well, if you looked at my website, you will notice that I moved many times in the last 21 years. I was never very good at saving work samples, what I had saved is in France (if it wasn&#8217;t trashed) with my ex-wife, I am in Florida now.</p>
<p>So in response, no samples available. It&#8217;s all pure thought anyway. It&#8217;s about the idea.</p>
<p>For the Chevron project, I found the cars with a quick google search: <a href="http://www.chevroncars.com/meet/">www.chevroncars.com/meet/</a></p>
<p>The red, green, white and dirty car were the first ones launched. We made animated gifs with the eyes blinking, actually, I did, but it was my designer friend Michael who lead me to the &#8216;gif builder&#8217; program.</p>
<p>We also did web work for Diamond Walnuts and Birdseye Frozen food, I made a site called FrancePlanetTours.com. I shared the spacer.gif solution freely with the other artists, I believe in openness&#8211; it would be silly to try and own every idea, and ideas can be stolen anyway.</p></blockquote>
<p>So here it is. The story unveils itself more than ten years after the technique was invented. Actually it&#8217;s hard to understand today what all these spacer.gif&#8217;s are still doing on websites that don&#8217;t follow web standards. But in 1996 there was no such thing as decent CSS (*).</p>
<p>Tables and images had just appeared in recent browsers, so at that time, <strong>putting transparent pixels in table cells was the only way to achieve fancy layouts</strong>.</p>
<p><small>(*) Actually the first CSS recommendation was published in December 1996 but it took three years before the first browser with decent css support was released (Internet Explorer 5 for Mac).</small></p>
<p><small>Technorati Tags: <a href="http://technorati.com/tag/anti+webstandards" rel="tag">anti webstandards</a>, <a href="http://technorati.com/tag/anti+usability" rel="tag">  anti usability</a>, <a href="http://technorati.com/tag/spacer+gif" rel="tag">  spacer gif</a>, <a href="http://technorati.com/tag/table+based+layout" rel="tag">  table based layout</a>, <a href="http://technorati.com/tag/david+siegel" rel="tag">  david siegel</a>, <a href="http://technorati.com/tag/transparent+gif" rel="tag">  transparent gif</a>, <a href="http://technorati.com/tag/transparent+pixel" rel="tag">  transparent pixel</a>, <a href="http://technorati.com/tag/joe+kleinberg" rel="tag"> joe kleinberg</a>, <a href="http://technorati.com/tag/wikipedia" rel="tag"> wikipedia</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwater.dk/2007/02/11/who-invented-the-spacergif-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
