<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <link href="https://friendlybit.com/feed/" rel="self" type="application/atom+xml" />
    <link href="https://friendlybit.com/" rel="alternate" type="text/html" />
    <updated>2010-01-11T01:04:33+01:00</updated>
    <id>https://friendlybit.com</id>
    <title type="html">Friendly Bit - Web development blog</title>
    <subtitle>Friendly Bit is a blog by Emil Stenström, a Swedish web developer that occasionally gets ideas of how to improve the internet.</subtitle>
    
        <entry>
            <title type="html">Rendering a web page – step by step</title>
            <link href="http://friendlybit.com/css/rendering-a-web-page-step-by-step/" rel="alternate" type="text/html" title="Rendering a web page – step by step" />
            <published>2010-01-11T01:04:33+01:00</published>
            <updated>2010-01-11T01:04:33+01:00</updated>
            <id>http://friendlybit.com/css/rendering-a-web-page-step-by-step/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Have you ever thought about what happens when you surf the web? It&#39;s not as simple as it seems: You type an URL into address bar in your preferred browser....</summary>
            <content type="html" xml:base="http://friendlybit.com/css/rendering-a-web-page-step-by-step/">
                &lt;p&gt;Have you ever thought about what happens when you surf the web? It&#39;s not as simple as it seems:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You &lt;strong&gt;type an URL&lt;/strong&gt; into address bar in your preferred browser.&lt;/li&gt;
&lt;li&gt;The browser &lt;strong&gt;parses the URL&lt;/strong&gt; to find the protocol, host, port, and path.&lt;/li&gt;
&lt;li&gt;It &lt;strong&gt;forms a HTTP request&lt;/strong&gt; (that was most likely the protocol)&lt;/li&gt;
&lt;li&gt;To reach the host, it first needs to &lt;strong&gt;translate&lt;/strong&gt; the human readable host &lt;strong&gt;into an IP number&lt;/strong&gt;, and it does this by doing a DNS lookup on the host&lt;/li&gt;
&lt;li&gt;Then a &lt;strong&gt;socket needs to be opened&lt;/strong&gt; from the user&#39;s computer to that IP number, on the port specified (most often port 80)&lt;/li&gt;
&lt;li&gt;When a connection is open, the &lt;strong&gt;HTTP request is sent&lt;/strong&gt; to the host&lt;/li&gt;
&lt;li&gt;The host &lt;strong&gt;forwards the request&lt;/strong&gt; to the server software (most often Apache) configured to listen on the specified port&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;server inspects the request&lt;/strong&gt; (most often only the path), and &lt;strong&gt;launches the server plugin needed&lt;/strong&gt; to handle the request (corresponding to the server language you use, PHP, Java, .NET, Python?)&lt;/li&gt;
&lt;li&gt;The plugin gets access to the full request, and starts to prepare a HTTP response.&lt;/li&gt;
&lt;li&gt;To construct the response a &lt;strong&gt;database&lt;/strong&gt; is (most likely) &lt;strong&gt;accessed&lt;/strong&gt;. A database search is made, based on parameters in the path (or data) of the request&lt;/li&gt;
&lt;li&gt;Data from the database, together with other information the plugin decides to add, is &lt;strong&gt;combined into a long string&lt;/strong&gt; of text (probably HTML).&lt;/li&gt;
&lt;li&gt;The plugin &lt;strong&gt;combines&lt;/strong&gt; that data with some meta data (in the form of HTTP headers), and &lt;strong&gt;sends the HTTP response&lt;/strong&gt; back to the browser.&lt;/li&gt;
&lt;li&gt;The browser receives the response, and &lt;strong&gt;parses the HTML&lt;/strong&gt; (which with 95% probability is broken) in the response&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;DOM tree is built&lt;/strong&gt; out of the broken HTML&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;New requests are made&lt;/strong&gt; to the server for each new resource that is found in the HTML source (typically images, style sheets, and JavaScript files). Go back to step 3 and repeat for each resource.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stylesheets are parsed&lt;/strong&gt;, and the rendering information in each gets attached to the matching node in the DOM tree&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Javascript is parsed and executed&lt;/strong&gt;, and DOM nodes are moved and style information is updated accordingly&lt;/li&gt;
&lt;li&gt;The browser &lt;strong&gt;renders the page&lt;/strong&gt; on the screen according to the DOM tree and the style information for each node&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;You&lt;/strong&gt; &lt;strong&gt;see&lt;/strong&gt; the page on the screen&lt;/li&gt;
&lt;li&gt;You get annoyed the whole process was too slow.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I, too, get annoyed when the above steps take longer than one tenth of a second. But now at least I have some documentation to look at, while waiting the remaining fractions of a second before the page renders.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.flickr.com/photos/amboo213/115034446/sizes/s/&#34;&gt;&lt;img class=&#34;alignnone&#34; title=&#34;Spoiled dog - by amboo213 on Flickr&#34; src=&#34;http://farm1.static.flickr.com/45/115034446_8bf43c2273_m.jpg&#34; alt=&#34;Spoiled dog&#34; width=&#34;240&#34; height=&#34;180&#34; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Spoiled we are, all of us.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(Feel free to add more steps, through the comments…)&lt;/em&gt;&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Position: fixed CSS templates</title>
            <link href="http://friendlybit.com/css/position-fixed-css-templates/" rel="alternate" type="text/html" title="Position: fixed CSS templates" />
            <published>2009-12-31T15:14:26+01:00</published>
            <updated>2009-12-31T15:14:26+01:00</updated>
            <id>http://friendlybit.com/css/position-fixed-css-templates/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">In 2006 I wrote an article about simulating Frames and Iframes and from time to time, I get questions of how to make modifications to the templates...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/position-fixed-css-templates/">
                &lt;p&gt;In 2006 I wrote an article about &lt;a href=&#34;/css/frames-or-iframes-with-css/&#34;&gt;simulating Frames and Iframes&lt;/a&gt; and from time to time, I get questions of how to make modifications to the templates presented. But one big thing has changed since 2006: &lt;strong&gt;Perfect support for IE6 is no longer mandatory&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;So yesterday, when Brandon Cobb of &lt;a href=&#34;http://superfighter.com/&#34;&gt;Super Fighter Team&lt;/a&gt; asked about a design with a fixed header, fixed left column, and scrolling right column, I thought I&#39;d renew my take on &lt;a href=&#34;/css/frames-or-iframes-with-css/&#34;&gt;simulating frames&lt;/a&gt; with CSS (The original article is still good for background information, so I still recommend reading it).&lt;/p&gt;
&lt;h2 id=&#34;position-fixed-css-templates&#34;&gt;Position: fixed CSS templates&lt;a href=&#34;#position-fixed-css-templates&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The idea is this: Instead of specifying what parts of the page should scroll, we can &lt;strong&gt;specify what parts should stay fixed when scrolling&lt;/strong&gt;. This makes it easier to deal with several fixed parts of the same layout, but also allows us do to things frames cannot do.&lt;/p&gt;
&lt;p&gt;So what&#39;s the trick? Well, &lt;code&gt;position: fixed&lt;/code&gt; does exactly what we want. It works just like &lt;code&gt;position: absolute&lt;/code&gt;, but it stays still when the page is scrolled. So it&#39;s really just a matter of making sure things don&#39;t overlap.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/files/fixed/fixedtopandleft.html&#34; data-no-instant&gt;Demo: Fixed top, fixed left, scrolling right&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/files/fixed/fixedtop.html&#34; data-no-instant&gt;Demo: Fixed top, scrolling bottom&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;/files/fixed/fixedleft.html&#34; data-no-instant&gt;Demo: Fixed left, scrolling right&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Try resizing the page, and see how the scrolling works&lt;/strong&gt;. The templates have been tested in: Fx 3.5, IE8, IE7, IE6 (see note below), Opera 10, Safari 4; all on Windows. Let me know if you can test it on more browsers, or find bugs.&lt;/p&gt;
&lt;p&gt;You&#39;re of course free to use this templates as you see fit, with or without a link back, commercially or not. Consider it public domain.&lt;/p&gt;
&lt;h2 id=&#34;fixes-for-ie6&#34;&gt;Fixes for IE6&lt;a href=&#34;#fixes-for-ie6&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As I&#39;ve said, these designs don&#39;t act the same in IE6. Instead of some parts being fixed, the whole page scrolls in IE6. The good thing about this is that  &lt;strong&gt;IE6 users won&#39;t see that your site is &amp;quot;broken&amp;quot;&lt;/strong&gt;, they will just get another design. And as the number of IE6 users goes towards zero, your design will be more and more consistent :). The fallback is very simple, IE6 gets &lt;code&gt;position: absolute&lt;/code&gt; instead of fixed, using the &lt;a href=&#34;http://www.webdevout.net/css-hacks#in_css-important&#34;&gt;!important hack&lt;/a&gt; (you should probably use &lt;a href=&#34;http://www.quirksmode.org/css/condcom.html&#34;&gt;conditional comments&lt;/a&gt; instead).&lt;/p&gt;
&lt;p&gt;Hope these templates are useful for some of you!&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">SpriteMe – Combine images and get fewer HTTP requests</title>
            <link href="http://friendlybit.com/css/spriteme-combine-images-and-get-fewer-http-requests/" rel="alternate" type="text/html" title="SpriteMe – Combine images and get fewer HTTP requests" />
            <published>2009-09-19T17:09:02+02:00</published>
            <updated>2009-09-19T17:09:02+02:00</updated>
            <id>http://friendlybit.com/css/spriteme-combine-images-and-get-fewer-http-requests/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Those of you that care about website performance have probably read about combining images, something that&#39;s called &#34;CSS sprites&#34;. The idea is that by using...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/spriteme-combine-images-and-get-fewer-http-requests/">
                &lt;p&gt;Those of you that care about website performance have probably read about combining images, something that&#39;s called &amp;quot;CSS sprites&amp;quot;. The idea is that by using the same (somewhat larger) image several times, you get fewer HTTP requests to your site, and therefore speed it up. Problem is, most of your images are CSS background images, that are positioned using clever background-positions and repeats.&lt;/p&gt;
&lt;p&gt;Now, this makes to tricky to combine images. Something that repeats horizontally can&#39;t be combined with something that repeats vertically (unless there&#39;s transparency involved), and wide images can&#39;t be combined with narrow ones. So combining is usually tedious, manual work, both to combine the images and then calculate the new background-positions required.&lt;/p&gt;
&lt;p&gt;Lucky for us then, that there is a tool called &lt;a href=&#34;http://spriteme.org/&#34;&gt;SpriteMe&lt;/a&gt;, available as a bookmarklet (a bookmark containing javascript), and as an excellent &lt;a href=&#34;http://spriteme.org/demo.php&#34;&gt;online demo&lt;/a&gt; that walks you through how it works. SpriteMe does all the hard work for you, you just have to copy and paste both the combined images, and the new background rules, to your site.&lt;/p&gt;
&lt;p&gt;Decreasing the number of HTTP requests have never been simpler. Well done &lt;a href=&#34;http://www.stevesouders.com/&#34;&gt;Steve Souders&lt;/a&gt;!&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Techniques to use when IE6 dies</title>
            <link href="http://friendlybit.com/css/techniques-to-use-when-ie6-dies/" rel="alternate" type="text/html" title="Techniques to use when IE6 dies" />
            <published>2009-08-26T23:54:51+02:00</published>
            <updated>2009-08-26T23:54:51+02:00</updated>
            <id>http://friendlybit.com/css/techniques-to-use-when-ie6-dies/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Everyone except Microsoft themselves are talking about the death of IE6. I&#39;ve tried motivating people to drop support, arguing that you at least can show...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/techniques-to-use-when-ie6-dies/">
                &lt;p&gt;Everyone &lt;a href=&#34;http://www.eweek.com/c/a/Windows/Microsoft-Internet-Explorer-6-Support-Continues-Despite-Calls-for-PhaseOut-307122/&#34;&gt;except Microsoft themselves&lt;/a&gt; are talking about the death of IE6. I&#39;ve tried &lt;a href=&#34;/browsers/motivation-for-building-for-ie6/&#34;&gt;motivating people to drop support&lt;/a&gt;, arguing that you at least can show IE6 users a message. Many have replied with &amp;quot;but our IT department doesn&#39;t let us…&amp;quot;, and I can say nothing more than that the IT department is filled with humans. Which means they are lazy, and upgrade when people whine enough about it. It&#39;s a shame it has to be that way, that we have to &lt;a href=&#34;http://www.ie6nomore.com/corporate-users.html&#34;&gt;punish people for their IT departments&lt;/a&gt;, but that&#39;s how it has to be.&lt;/p&gt;
&lt;p&gt;As &lt;strong&gt;web developers&lt;/strong&gt;, we should be the ones complaining the loudest. We have so much to win on IE6:s death it&#39;s silly. Just look at the below list of things IE6 can&#39;t do, but IE7 can (the next worst browser):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Native PNG alpha transparency without silly hacks.&lt;/li&gt;
&lt;li&gt;Several selectors: Child selector (&amp;quot;&amp;gt;&amp;quot;), Adjacent sibling selector (&amp;quot;+&amp;quot;), Attribute selectors ([attr=value]), and &lt;a href=&#34;http://www.w3.org/TR/css3-selectors/#general-sibling-combinators&#34;&gt;General sibling selector&lt;/a&gt; (&amp;quot;~&amp;quot;, CSS3)&lt;/li&gt;
&lt;li&gt;Min-height, Max-height, Min-width, Max-width&lt;/li&gt;
&lt;li&gt;Multiple class/id selectors in the same ruleset (ie. .class1.class2 { … })&lt;/li&gt;
&lt;li&gt;:hover on all elements, not just links&lt;/li&gt;
&lt;li&gt;position: fixed&lt;/li&gt;
&lt;li&gt;Native XMLHTTP (Without ActiveX)&lt;/li&gt;
&lt;li&gt;International Domain Names (IDN), the ability to use UTF-8 chars in domains&lt;/li&gt;
&lt;li&gt;Page zoom that zooms the whole page (don&#39;t worry about zoom)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is a huge step forward for us web developers. Huge! Bigger then when CSS3 comes out, because we won&#39;t be able to use that one for years. Someone is pushing the front of what&#39;s possible, I&#39;m pushing for the front of what&#39;s &lt;strong&gt;usable&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;What can you do to help me get everything in the above list? And, did I forget something?&lt;/p&gt;
&lt;p&gt;Sources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://www.quirksmode.org/css/contents.html&#34;&gt;CSS Compatibility charts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://blogulate.com/content/new-features-of-internet-explorer-7/&#34;&gt;IE6 vs IE7 - New features in Internet Explorer 7&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">A couple of sites I’ve launched</title>
            <link href="http://friendlybit.com/css/a-couple-of-sites-ive-launched/" rel="alternate" type="text/html" title="A couple of sites I’ve launched" />
            <published>2009-02-16T18:18:02+01:00</published>
            <updated>2009-02-16T18:18:02+01:00</updated>
            <id>http://friendlybit.com/css/a-couple-of-sites-ive-launched/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Lots of opinions here lately, and very few concrete examples of work I&#39;ve done. I thought I&#39;d take a few minutes of your time and talk about those projects...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/a-couple-of-sites-ive-launched/">
                &lt;p&gt;Lots of opinions here lately, and very few concrete examples of work I&#39;ve done. I thought I&#39;d take a few minutes of your time and talk about those projects here.&lt;/p&gt;
&lt;p&gt;All of the sites I&#39;ve built are in &lt;strong&gt;Swedish&lt;/strong&gt;. The reason for Swedish is just that they are so much easier to write for. Since English is not my native language, everything takes a little bit longer when having to struggle with vocabulary.&lt;/p&gt;
&lt;p&gt;All of the sites are built with &lt;strong&gt;Django&lt;/strong&gt;, a framework I&#39;ve had great success with, which feels both well architectured and easy to get started with (a very unusual combination). Django also lets me write the HTML I want, without getting in the way.&lt;/p&gt;
&lt;p&gt;(By the way: there&#39;s a &lt;a href=&#34;http://groups.google.com/group/django-stockholm&#34;&gt;Django User Group&lt;/a&gt; forming in Stockholm if you&#39;re interested. First meeting this friday)&lt;/p&gt;
&lt;h2 id=&#34;uttrakadse&#34;&gt;Uttråkad.se&lt;a href=&#34;#uttrakadse&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The first one to launch was &lt;a href=&#34;http://www.uttr%C3%A5kad.se&#34;&gt;Uttråkad.se - hitta saker att göra&lt;/a&gt;, a site for everyone that have too much time on their hands. I guess the english version would be &amp;quot;bored.com&amp;quot;, which kinda tells you what the site is about, right? :) Anyway, we&#39;ve played around with having the site very open, with no registration needed at all.&lt;/p&gt;
&lt;p&gt;I would say the launch has been a good one, with an &lt;a href=&#34;http://www.metro.se/se/article/2008/12/16/19/0353-45/index.xml&#34;&gt;article in metro&lt;/a&gt; the first week of launch, 153 activities posted, and about 70 daily unique visitors. It has been a fun project to be a part of, and it&#39;s been developed together with three friends in a group we call &lt;a href=&#34;http://openworks.se&#34;&gt;openworks&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Are you bored? Then play around with Uttråkad a bit :)&lt;/p&gt;
&lt;h2 id=&#34;kundose&#34;&gt;Kundo.se&lt;a href=&#34;#kundose&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;With our first project barely launched we decided to join an even called 24 hour business camp. The idea was simple: prepare a business idea, and build and launch it in 24 hours. Said and done: 92 entrepreneurs gathered at a luxurious conference center and presented 52 new sites 24 hours later. It was simply the best conference I&#39;ve been to, and an extreme energy boost to be in a group of doers like that.&lt;/p&gt;
&lt;p&gt;Anyway, we launched &lt;a href=&#34;http://kundo.se&#34;&gt;Kundo - kundtjänst på nätet&lt;/a&gt; after 24 hours, a site that companies can use to embed a feedback-widget on their site. Translates to something like &amp;quot;CustomerO.com&amp;quot;, it&#39;s clearly influenced from &lt;a href=&#34;http://getsatisfaction.com/&#34;&gt;Getsatisfaction&lt;/a&gt; but in Swedish.  There&#39;s clearly a need for better ways for companies to communicate with their customers in Sweden too.&lt;/p&gt;
&lt;p&gt;After the camp we still had some bugs and important features missing, so yesterday me and Björn sat down and squashed all the major ones. So, do you know of a company that needs to take better care of their customers? For free. Send them a link to &lt;a href=&#34;http://kundo.se&#34;&gt;Kundo&lt;/a&gt;. Thanks! :)&lt;/p&gt;
&lt;h2 id=&#34;samhallsentreprenorse&#34;&gt;Samhallsentreprenor.se&lt;a href=&#34;#samhallsentreprenorse&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I&#39;ve also been busy with Django at work. &lt;a href=&#34;http://www.samhallsentreprenor.se/&#34;&gt;Samhallsentreprenor.se&lt;/a&gt; is a meeting place for people that work in projects that somehow help their local (or global) community. These are people that are incredibly motivated to do good, a group that&#39;s of course great to work for.&lt;/p&gt;
&lt;p&gt;We&#39;ve released new versions of the site about every 10 days, so development is fast, and through the development blog people can directly influence future features.&lt;/p&gt;
&lt;p&gt;So, do you have ideas for projects that can help people around you? &lt;a href=&#34;http://samhallsentreprenor.se/&#34;&gt;Sign up on the site and start talking to people&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;two-more-projects&#34;&gt;Two more projects…&lt;a href=&#34;#two-more-projects&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;… are under development and will be announced when they are done. There&#39;s no lack of things to do in my world :)&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Interface developers and security</title>
            <link href="http://friendlybit.com/css/interface-developers-and-security/" rel="alternate" type="text/html" title="Interface developers and security" />
            <published>2009-01-24T00:30:44+01:00</published>
            <updated>2009-01-24T00:30:44+01:00</updated>
            <id>http://friendlybit.com/css/interface-developers-and-security/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">You live in a new era, when demanding that people register on your site is no longer enough. There&#39;s far too many other sites out that that you&#39;re already a...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/interface-developers-and-security/">
                &lt;p&gt;You live in a &lt;strong&gt;new era&lt;/strong&gt;, when demanding that people register on your site is no longer enough. There&#39;s far too many other sites out that that you&#39;re already a member of, you don&#39;t need another one. You need to trust people.&lt;/p&gt;
&lt;p&gt;You also want people to contribute to your sites with content somehow. Text is not enough, you want all kinds of &amp;quot;rich&amp;quot; content, and you want people to be able to place them how they want on your page. I mean, we live in a &lt;strong&gt;new era&lt;/strong&gt; after all.&lt;/p&gt;
&lt;p&gt;Problem is, this &lt;strong&gt;new era thingie talk&lt;/strong&gt; makes people forget the basics. Even though this is the future, and we&#39;re all bored with &amp;quot;just&amp;quot; hypertext, we can&#39;t allow random people to add HTML to our sites. Why? Ask myspace about the &lt;a href=&#34;http://namb.la/popular/tech.html&#34;&gt;Samy worm&lt;/a&gt; from 2005, a little piece of clever front-end code that took their servers flying. What did they do wrong? They tried to let untrusted people embed HTML on their profile pages.&lt;/p&gt;
&lt;p&gt;But they even had this clever filter, which cleaned the code first! Well, long story short, using a div with the style attribute set to a background image that points to a javascript url actually execute the javascript in IE6. Didn&#39;t think of that did you? So what about the fact that both IE6 and IE7 execute vbscripts in urls prefixed with &amp;quot;vbscript:&amp;quot;, just like with javascript. Didn&#39;t know that? Ohhh. Perhaps then you shouldn&#39;t be trying to let unknown people embed HTML on your site?&lt;/p&gt;
&lt;p&gt;Many of these security issues stem from the fact that ordinary well-educated computer scientists &lt;strong&gt;don&#39;t know enough about interface development&lt;/strong&gt;, HTML, CSS and javascript, and discount them as being something that &amp;quot;anyone&amp;quot; could do. &amp;quot;Even my aunt made this puppy site in like 3 days, how hard can it be?!&amp;quot;.&lt;/p&gt;
&lt;p&gt;I&#39;ve always thought that interface development have an undeserved reputation of being easier than &amp;quot;real programming&amp;quot;; something that you can let rookies work with, something that no &amp;quot;real&amp;quot; programmer would ever want. &amp;quot;No, I want to work with hard stuff, not that webby stuff&amp;quot;.&lt;/p&gt;
&lt;p&gt;If you are in a position where people actually think that, perhaps security could be the way to lift interface development to its proper status. So why not read up on &lt;a href=&#34;http://en.wikipedia.org/wiki/Cross-site_scripting&#34;&gt;Cross Site Scripting (XSS)&lt;/a&gt;, look at examples of vulnerabilities, and pick a couple of examples of &lt;a href=&#34;http://www.xssed.com/&#34;&gt;big sites that are vulnerable&lt;/a&gt;. While you&#39;re at it, why not read up on &lt;a href=&#34;http://en.wikipedia.org/wiki/Cross-site_request_forgery&#34;&gt;Cross-site request forgery (CSRF)&lt;/a&gt; too?&lt;/p&gt;
&lt;p&gt;These are real issues that &lt;strong&gt;someone&lt;/strong&gt; needs to take into account when building websites. My guess is that the fancy computer scientists will have a very long way to go before grasping this stuff. &amp;quot;Why does IE6 parse &#39;java   script:&#39; as if there where no space in the middle?&amp;quot;. You know who&#39;s not surprised? Every damn interface developer out there.&lt;/p&gt;
&lt;p&gt;So. Go out there, and teach them silly math people how it&#39;s done, and what your HTML, CSS and javscript-knowledge is worth. Show them that logic isn&#39;t the way we do things around here, that anything can happen when IE6 boots. And… whatever you do… think very hard before letting people embed HTML on your site.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">OpenID, Nofollow removed, Comment counts, and IE7 fixes</title>
            <link href="http://friendlybit.com/css/openid-nofollow-removed-comment-counts-and-ie7-fixes/" rel="alternate" type="text/html" title="OpenID, Nofollow removed, Comment counts, and IE7 fixes" />
            <published>2008-10-19T15:48:03+02:00</published>
            <updated>2008-10-19T15:48:03+02:00</updated>
            <id>http://friendlybit.com/css/openid-nofollow-removed-comment-counts-and-ie7-fixes/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">I&#39;m added a few features to the site: OpenID support: Instead of typing your name and e-mail you could instead sign in with an OpenID-enabled URL. Or you...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/openid-nofollow-removed-comment-counts-and-ie7-fixes/">
                &lt;p&gt;I&#39;m added a few features to the site:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OpenID support&lt;/strong&gt;: Instead of typing your name and e-mail you could instead sign in with an OpenID-enabled URL. Or you could completely ignore it, and go on as usual.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Nofollow restriction removed&lt;/strong&gt;: WordPress by default adds rel=&amp;quot;nofollow&amp;quot; to all links that people write in comments. It&#39;s a good way to decrease the impact of spam. Thing is, I strictly moderate comments, and have three plugins that prevent spam (Akismet, Spam Karma 2, and Bad Behavior). Since spam really isn&#39;t a problem, I&#39;ve decided to remove the nofollow from your links, if you&#39;ve posted more than three comments.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Comment counts&lt;/strong&gt;: To make it easier to see who you can trust and not in the comments I&#39;ve added a comment count next to the name. Damn, I&#39;ve commented a lot :)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;IE7 fixes&lt;/strong&gt;: There were script errors in IE7 since I&#39;m trying to do funky stuff with opacity on the search field. I&#39;ve fixed that. Also, the number of subscribers wasn&#39;t visible in IE7. They are now.&lt;/p&gt;
&lt;p&gt;Over and out.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">IE7 hover bug: z-index ignored (and other properties)</title>
            <link href="http://friendlybit.com/css/ie7-hover-bug-z-index-ignored-and-other-properties/" rel="alternate" type="text/html" title="IE7 hover bug: z-index ignored (and other properties)" />
            <published>2008-10-12T20:17:04+02:00</published>
            <updated>2008-10-12T20:17:04+02:00</updated>
            <id>http://friendlybit.com/css/ie7-hover-bug-z-index-ignored-and-other-properties/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">I&#39;m implementing a rather different design right now for an intranet, and have found a bug I thought you&#39;d like to know about. If you restyle things with...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/ie7-hover-bug-z-index-ignored-and-other-properties/">
                &lt;p&gt;I&#39;m implementing a rather different design right now for an intranet, and have found a bug I thought you&#39;d like to know about. If you restyle things with :hover, you might have to add an extra property for the rule to be applied in IE7.&lt;/p&gt;
&lt;p&gt;How is this design different? Well, it built on columns that are overlapping each other. When you hover one of the columns, that column get placed on top (temporarily). You think you need javascript for this? You don&#39;t (if you can live with not supporting IE6).&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;menu&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;content&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;sidebar&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;z-index&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;menu&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;hover&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;content&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;hover&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;sidebar&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;hover&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;z-index&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Simple isn&#39;t it? Now you just have to absolutely position the three columns. By the way, working with absolute positioning is ok as long as you don&#39;t need a cleared footer below the three columns. Strange that not more people use this.&lt;/p&gt;
&lt;p&gt;Anyway, the above doesn&#39;t work in IE7. It should, because IE7 supports :hover on all elements, including my &amp;quot;div columns&amp;quot;. Some googling led me to an old IE6 bug where some elements are ignored on links. The bug talks about IE6 and the color property being ignored, but the same seems to apply to IE7 and z-index.&lt;/p&gt;
&lt;p&gt;So, long story short, just add &lt;code&gt;display: block&lt;/code&gt; to the hover rule and everything works fine. As the link above dictates, many different rules work, the important thing is that it must be a new rule, which you &lt;strong&gt;haven&#39;t used before&lt;/strong&gt; on that element. But you don&#39;t set display: block; on divs, do you? So it should work fine.&lt;/p&gt;
&lt;p&gt;Hope it helps some frustrated soul out there :) And long live funky designs.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Yellow fade with CSS and a simple image</title>
            <link href="http://friendlybit.com/css/yellow-fade-with-css-and-a-simple-image/" rel="alternate" type="text/html" title="Yellow fade with CSS and a simple image" />
            <published>2008-10-04T20:19:09+02:00</published>
            <updated>2008-10-04T20:19:09+02:00</updated>
            <id>http://friendlybit.com/css/yellow-fade-with-css-and-a-simple-image/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Via Think Vitamin I find a cool way to highlight the current element. Lots of people do this by calling some kind of javascript library, it&#39;s so common it&#39;s...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/yellow-fade-with-css-and-a-simple-image/">
                &lt;p&gt;Via &lt;a href=&#34;http://www.thinkvitamin.com/features/css/stay-on-target&#34;&gt;Think Vitamin&lt;/a&gt; I find a cool way to highlight the current element. Lots of people do this by calling some kind of javascript library, it&#39;s so common it&#39;s been dubbed the &lt;a href=&#34;http://www.37signals.com/svn/archives/000558.php&#34;&gt;yellow fade technique&lt;/a&gt;. But javascript isn&#39;t really needed, you just need CSS and an image.&lt;/p&gt;
&lt;p id=&#34;example&#34;&gt;
  First: you can jump to any id on the current page by appending #some-id-here to the url. This includes all the &#34;semantic&#34; ids you&#39;ve added to the page such as #content, #sidebar, and so on. Very useful if you want to point out a certain section of a page to a friend, just look at the source, try to find an id nearby, and add it to the url.
&lt;/p&gt;

&lt;p&gt;If you want to make things even easier on your own site, you can visually highlight things that get referenced via the above method. That&#39;s where the :target psuedo selector jumps in to save your day. Please note that :target is CSS3, and only currently works in &lt;a href=&#34;http://reference.sitepoint.com/css/pseudoclass-target&#34;&gt;non-crap browsers&lt;/a&gt;. But perhaps this effect is something not all users really need?&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;a&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;target&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;background&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mh&#34;&gt;#234af5&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This highlights all links that get referenced via the URL with a nice blue color. So they need an id added. Makes perfect sense for all kinds of documentation where you want to refer someone to a certain method or even sentence.&lt;/p&gt;
&lt;p&gt;But it gets better:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;target&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;background&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;url&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;/images/yellow-fade.gif&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We&#39;ve removed the limit of only targeting links with by using :target straight off. So all targeted elements will get affected by this rule. What next? Well, we use a small animated image to fade from one color to the next. It&#39;s a really easy way to add dynamics to a page.&lt;/p&gt;
&lt;p&gt;Try the effect by &lt;a href=&#34;#example&#34;&gt;jumping to the code example&lt;/a&gt; above.&lt;/p&gt;
&lt;p&gt;I really think this makes internal links a whole lot more useful, especially for jumping to the bottom of the page, where it&#39;s not possible for the browser to scroll down enough to get the targeted element to the top. Needless to say, I&#39;ve added this effect to this site too. Hope you can find something to use it for too.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">The Open Web: Can it deliver?</title>
            <link href="http://friendlybit.com/css/the-open-web-can-it-deliver/" rel="alternate" type="text/html" title="The Open Web: Can it deliver?" />
            <published>2008-09-01T22:58:08+02:00</published>
            <updated>2008-09-01T22:58:08+02:00</updated>
            <id>http://friendlybit.com/css/the-open-web-can-it-deliver/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">It&#39;s ringing through my head as Microsoft releases Silverlight, as Adobe forces another version of Flash or Air, and as Sun tries to push JavaFX into the...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/the-open-web-can-it-deliver/">
                &lt;p&gt;It&#39;s ringing through my head as Microsoft releases Silverlight, as Adobe forces another version of Flash or Air, and as Sun tries to push JavaFX into the spotlight. It&#39;s a dark whisper when I read how many still use old browsers (hello IE6!), or when I see Javascript being used poorly by otherwise knowledgeable programmers. It&#39;s getting obvious when people complain over how hard and hacky HTML and CSS is.&lt;/p&gt;
&lt;p&gt;People are simply not getting their job done fast enough. Just because we&#39;ve hacked and hacked to the point of getting used to it, doesn&#39;t mean our way of writing web apps is the best way. In the end it about delivering to end users or paying clients, and they care more about &lt;strong&gt;what&lt;/strong&gt; you deliver than &lt;strong&gt;how&lt;/strong&gt;. I&#39;m not saying we are working slower than before, it&#39;s the opposite, new tools makes web development less annoying. But I am saying that we get less work done in relation to the expectations.&lt;/p&gt;
&lt;p&gt;So what do they expect? Well, they want flashy effects. The want application behavior. They want snappy response times, bright colors, and &amp;quot;Wow!&amp;quot;-reactions. For our clients, the web is getting more crowded every day and they need to fight harder and harder for people&#39;s attention. That means you need to fight harder on their behalf.&lt;/p&gt;
&lt;p&gt;Say you are a pro open standards developer, like me. What tools do you have to grab people&#39;s attention? Valid HTML? DIVs with fading color? AJAX? No way man. A good Flash developer can get a wow reaction by the time you&#39;ve chosen doctype (or at least by the time you&#39;ve booted IE6).&lt;/p&gt;
&lt;p&gt;So you turn to Google, and look for the latest and hottest in standards development. And you find that you need to use Javascript and Flash (sIFR) to render custom fonts. You find that you need to use (Adobe) Photoshop to add highlights and shadows on your headers. You find that you have to hack severely to be able to use alpha transparent images. To do any kind of animation, you need a big Javascript library, because browser makers have not yet (yes, it&#39;s 2008) been able to collaborate on how the language should work.&lt;/p&gt;
&lt;p&gt;You say that standards have to take time. That everyone needs to come together and thoroughly discuss important issues. The right committees and councils needs to be formed. Meanwhile Microsoft prepares for the release of Silverlight 2.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Have you no sense of urgency?&lt;/strong&gt;&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Why adding variables to CSS is a good thing</title>
            <link href="http://friendlybit.com/css/why-adding-variables-to-css-is-a-good-thing/" rel="alternate" type="text/html" title="Why adding variables to CSS is a good thing" />
            <published>2008-08-07T16:29:24+02:00</published>
            <updated>2008-08-07T16:29:24+02:00</updated>
            <id>http://friendlybit.com/css/why-adding-variables-to-css-is-a-good-thing/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Via Simon Willison I find that Bert Bos, one of the creators of CSS, has written an article on why variables shouldn&#39;t be included in CSS3. I thought I&#39;d...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/why-adding-variables-to-css-is-a-good-thing/">
                &lt;p&gt;Via Simon Willison I find that Bert Bos, one of the creators of CSS, has written an article on why &lt;a href=&#34;http://www.w3.org/People/Bos/CSS-variables&#34;&gt;variables shouldn&#39;t be included in CSS3&lt;/a&gt;. I thought I&#39;d try to explain why I think &lt;strong&gt;they should&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&#34;professional-perspective&#34;&gt;Professional perspective&lt;a href=&#34;#professional-perspective&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Bert posts statistics of stylesheet usage from the W3C site, and means that most stylesheets are very small, and on those, variables are not really needed. I agree. You can get away with simple search-replace in those simple cases. But Bert also finds that there are bigger sheets: &amp;quot;largest hand-written style sheet: 1462 lines (bought from a Web design company)&amp;quot;. I work at one of those companies, and almost all CSS files I write exceed 1000 lines.&lt;/p&gt;
&lt;p&gt;In those cases, I think CSS variables would help me a lot. Especially for margins. Matching several margins together by copying the same value over and over again isn&#39;t maintainable. Search replace on a pixel value is a sure way to mess up your whole stylesheet: who says you only use 5px for those margins? So &lt;strong&gt;there is&lt;/strong&gt; a use case for some kind of variables.&lt;/p&gt;
&lt;h2 id=&#34;so-we-need-variables-but-how&#34;&gt;So we need variables, but how?&lt;a href=&#34;#so-we-need-variables-but-how&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Bert then suggests that those people should use a solution such as &lt;a href=&#34;http://interfacelab.com/variables-in-css-via-php/&#34;&gt;PHP to generate CSS&lt;/a&gt;. So we should invent a new language for generating CSS with PHP? And another language for generating CSS from Ruby, from Java, from .NET, and so on. Why shouldn&#39;t we go this way? It&#39;s the path HTML has taken. And this is a hard nut to crack. How is CSS different from HTML? Why should CSS have variables when HTML doesn&#39;t?&lt;/p&gt;
&lt;p&gt;I think the answer is that we should add variables to both languages. They are very similar in nature, so they should be treated the same. Because what has changed since when CSS was created is that we&#39;ve started building bigger and more complex sites. And if CSS starts to be too cumbersome to use, people will start looking elsewhere, to Flash, Air, Silverlight and so on. CSS needs to adapt to the more complex sites people are building today.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I&#39;d rather see CSS follow the times and add variables, than seeing frustrated professionals move to proprietary technologies&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&#34;so-what-about-beginners&#34;&gt;So what about beginners?&lt;a href=&#34;#so-what-about-beginners&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Bert&#39;s article deals a lot with beginners, and how it will be harder for them to understand another level of abstraction. Lets make it clear at first that CSS already is too hard for beginners. To make a very simple layout you need to understand floats (yes, almost everyone needs columns), and floating is really confusing (ever tried to explain float/clear to someone?). Even for someone like me, who has worked with CSS for years, floats still puzzle me regularly.&lt;/p&gt;
&lt;p&gt;People will give up on CSS when they encounter floats (yes, I&#39;ve seen this), not when they find CSS variables. They can just choose not to use variables, while they really need to know floats. Also, CSS variables are easier to understand than cascading values. I mean really, if I set font-size on body, why do my links get larger? That&#39;s a very similar concept that is central to CSS.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;a href=&#34;#summary&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;CSS Variables make it easier for professionals to do their job. It doesn&#39;t require inventing new template languages. It doesn&#39;t make the language overall harder either. The people that can handle floats and cascading, can handle variables too. &lt;strong&gt;We need variables&lt;/strong&gt;.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Don’t waste time writing HTML and CSS</title>
            <link href="http://friendlybit.com/css/dont-waste-time-writing-html-and-css/" rel="alternate" type="text/html" title="Don’t waste time writing HTML and CSS" />
            <published>2008-07-10T00:02:50+02:00</published>
            <updated>2008-07-10T00:02:50+02:00</updated>
            <id>http://friendlybit.com/css/dont-waste-time-writing-html-and-css/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">When you&#39;ve worked with front-end development for a while, you start thinking about effectiveness. So without further ado, here&#39;s my four best ways to be a...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/dont-waste-time-writing-html-and-css/">
                &lt;p&gt;When you&#39;ve worked with front-end development for a while, you start thinking about effectiveness. So without further ado, here&#39;s my four best ways to be a more effective front-end developer. Feel free to add more ideas as comments!&lt;/p&gt;
&lt;h2 id=&#34;1-do-you-need-html-or-css-for-this&#34;&gt;1. Do you need HTML or CSS for this?&lt;a href=&#34;#1-do-you-need-html-or-css-for-this&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Lots of times when I get stranded on hard problem and sit back, I realize that I really &lt;strong&gt;shouldn&#39;t be trying to use CSS to solve all layout problems&lt;/strong&gt;. Assuming a rounded corner box will have to scale in all directions (up to 8 images!), when it really is fixed width and height (1 image), is an indescribable waste of everyone&#39;s time. Look closely at the design you&#39;re trying to implement: does it really have to be as flexible and scalable as you think? Shifting to that mindset saves me hours of work per day.&lt;/p&gt;
&lt;p&gt;One thing that many developers forget is that not all designers care for exact pixels. If something is really hard to develop, walk over to their table and suggest a change. You&#39;ll soon start to notice that designers are real people too, and that they have as much flexibility as you do. It&#39;s just as easy to call them up, so don&#39;t let shyness waste your time.&lt;/p&gt;
&lt;h2 id=&#34;2-try-to-set-properties-once&#34;&gt;2. Try to set properties once&lt;a href=&#34;#2-try-to-set-properties-once&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When you know you have to do something (see above), try to &lt;strong&gt;do things once&lt;/strong&gt;. This is really tricky in both HTML and CSS, languages that have no variables, and generally makes code reuse a pain. But it is possible.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;With CSS&lt;/strong&gt;; set widths of elements once, and trust inner elements to fill their parent. That&#39;s the default behavior of block level elements, and you can set display: block, or width: 100% on most other elements. Don&#39;t set heights at all if you can avoid them, and let elements expand to fill their containers. Combine similar CSS selectors to avoid typing things twice, and make new ones for common properties when few properties differ. Use floats and clearing instead of absolute positioning, and you&#39;ll won&#39;t have to micromanage positions all the time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;With HTML&lt;/strong&gt;, make sure that you really know the template language. I&#39;ve fighted with ASP.NET, JSP, JSTL, Smarty, WordPress Themes, RHTML, and Django&#39;s Templating Language, and now know enough about all of them to be productive. You should never have to type the same structure out twice, even in HTML. If your template language have loops, if-clauses and includes you really have no excuse to copy large chunks of HTML around. Refactor your HTML and make your own life easy.&lt;/p&gt;
&lt;h2 id=&#34;3-learn-your-text-editor&#34;&gt;3. Learn your text editor&lt;a href=&#34;#3-learn-your-text-editor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When code reuse isn&#39;t possible, &lt;strong&gt;use search/replace&lt;/strong&gt; in your favorite text editor.&lt;/p&gt;
&lt;p&gt;Replacing all instances of one HTML tag name with another is about replacing &amp;quot;element&amp;gt;&amp;quot; with &amp;quot;element2&amp;gt;&amp;quot; (without the opening bracket). That way you replace both opening and ending tags at once. Check to see if your editor supports regular expressions in its search/replace tool. If it does you can save lots of time by learning it. Matching a HTML tag is &amp;quot;&amp;lt;[^&amp;gt;]+&amp;gt;&amp;quot;, a starting angel bracket, one or more non-brackets, followed by an ending angel bracket. Naive regexps can make you match the starting bracket of one tag and the end of another, which makes for a mess.&lt;/p&gt;
&lt;p&gt;There&#39;s lots of little tricks like that, if you learn them you save massive amounts of time.&lt;/p&gt;
&lt;h2 id=&#34;4-make-sure-your-environment-supports-you&#34;&gt;4. Make sure your environment supports you&lt;a href=&#34;#4-make-sure-your-environment-supports-you&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;There&#39;s more than the text editor that you have to work with. One essential part of front-end development is trial and error. It sounds silly but no matter what your skill is, sometimes you must resort to trying and testing your way to a solution. With HTML and CSS, this means being able to &lt;strong&gt;quickly make a change, switch window, and see that change in the browser&lt;/strong&gt;. If that cycle takes more that 5 seconds, you&#39;re losing valuable time.&lt;/p&gt;
&lt;p&gt;Don&#39;t use a virtual machine (even if it&#39;s only for IE6) that you can&#39;t quickly Alt-Tab out of. If you&#39;re stuck using one, you need to have the text editor on that machine too. It&#39;s worth your time fixing it.&lt;/p&gt;
&lt;p&gt;Don&#39;t accept build processes that makes you wait more than 5-10 seconds before you see your changes. With trial and error coding you will then waste 50% of your capacity doing nothing. Most often you can bypass this by copying just the HTML and CSS to the right place, without touching other source-code. I&#39;ve managed to do this in all kinds of crappy environments, and it&#39;s always worth it.&lt;/p&gt;
&lt;p&gt;So.&lt;/p&gt;
&lt;p&gt;I hope some of the above can help you save some time each day. The little things add up you know. What&#39;s your best time-saver?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Upside down text with CSS</title>
            <link href="http://friendlybit.com/css/upside-down-text-with-css/" rel="alternate" type="text/html" title="Upside down text with CSS" />
            <published>2008-06-26T22:34:31+02:00</published>
            <updated>2008-06-26T22:34:31+02:00</updated>
            <id>http://friendlybit.com/css/upside-down-text-with-css/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Previously I&#39;ve talked about reversing text with CSS by simply setting a few CSS attributes. Today we will try another trick: turning text upside down. It&#39;s...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/upside-down-text-with-css/">
                &lt;p&gt;Previously I&#39;ve talked about &lt;a href=&#34;/css/reverse-text-with-css-32-very-special-hex-digits/&#34;&gt;reversing text with CSS&lt;/a&gt; by simply setting a few CSS attributes. Today we will try another trick: turning text &lt;strong&gt;upside down&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;It&#39;s actually possible using a simple CSS property and works cross-browser today. The property to use it &amp;quot;text-gravity&amp;quot; with a value of &amp;quot;inverse&amp;quot;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;text-gravity: inverse&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
write upside down text
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;… and this is the result:&lt;/p&gt;
&lt;p&gt;&lt;span style=&#34;text-gravity: inverse&#34;&gt;ʇxǝʇ uʍop ǝpısdn ǝʇıɹʍ&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&#39;m really surprised to learn that so few people know about this property, and I recommend you to continue reading the &lt;a href=&#34;http://www.fliptext.info/index.php&#34;&gt;W3C specification of text-gravity&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Sorry, I lied :) The above is done with a UTF-8 character generator (see the link the the &amp;quot;specification&amp;quot; above). Amazingly, you can find that most characters have their upside down equivalent somewhere else in the huge Unicode alphabet. Neat trick :)&lt;/p&gt;
&lt;/blockquote&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Feed readers should show comments</title>
            <link href="http://friendlybit.com/css/feed-readers-should-show-comments/" rel="alternate" type="text/html" title="Feed readers should show comments" />
            <published>2008-06-15T17:25:48+02:00</published>
            <updated>2008-06-15T17:25:48+02:00</updated>
            <id>http://friendlybit.com/css/feed-readers-should-show-comments/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">One thing I&#39;ve noticed lately is that I read fewer comments. It isn&#39;t that strange really: I read blogs using a feed reader and it doesn&#39;t show a links to...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/feed-readers-should-show-comments/">
                &lt;p&gt;One thing I&#39;ve noticed lately is that I read fewer comments. It isn&#39;t that strange really: I read blogs using a feed reader and it doesn&#39;t show a links to comments. I see a couple of reasons why comments are not cared for in feed readers:&lt;/p&gt;
&lt;h2 id=&#34;why-not-1-feeds-are-meant-to-be-fast&#34;&gt;Why not #1: Feeds are meant to be fast&lt;a href=&#34;#why-not-1-feeds-are-meant-to-be-fast&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Many subscribe to feeds to be able to get news before everyone else. And getting things fast means getting it before anyone else have commented. Why add a lot of zeros below each feed item?&lt;/p&gt;
&lt;p&gt;But, it isn&#39;t unusual that &lt;strong&gt;I read posts that are a couple of days old&lt;/strong&gt;. I don&#39;t read my feeds every day, rather every second or third day. In those days there are most likely comments on good posts, and of course I don&#39;t want to miss them. The older a post is, the more likely that it will have interesting comments.&lt;/p&gt;
&lt;h2 id=&#34;why-not-2-comments-are-hard-to-detect&#34;&gt;Why not #2: Comments are hard to detect&lt;a href=&#34;#why-not-2-comments-are-hard-to-detect&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Perhaps feed readers have a hard time detecting if there are comments to a post or not. Comments are not included in the post, so wouldn&#39;t they have to parse through the feed link for comments?&lt;/p&gt;
&lt;p&gt;No, there is a tag called &lt;code&gt;&amp;lt;wfw:commentRss&amp;gt;&lt;/code&gt;, that&#39;s possible to use in both Atom and RSS (If I&#39;m not mistaken), that gives &lt;strong&gt;a link to the comment feed&lt;/strong&gt;. That means feed readers could easily get the comments too. The best thing here is that all WordPress blogs (and others too) have it already. It&#39;s just a matter of using it!&lt;/p&gt;
&lt;h2 id=&#34;why-not-3-each-post-will-be-too-long&#34;&gt;Why not #3: Each post will be too long!&lt;a href=&#34;#why-not-3-each-post-will-be-too-long&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If there are 50 comments to a post, the item in the feed reader will be too long to read. That would also affect download time and therefore make things slow.&lt;/p&gt;
&lt;p&gt;Yes, it will mean downloading more data, but you also get more information. &lt;strong&gt;Each feed reader is free to implement comments any way they like&lt;/strong&gt;, and I doubt it will be to expand the original post with all 50 comments. I little link that expands comments (don&#39;t download any extra data until you expand)? Only show the first five, and a link to the page for more? There&#39;s lots of good options here.&lt;/p&gt;
&lt;h2 id=&#34;promote-contributions-more&#34;&gt;Promote contributions more&lt;a href=&#34;#promote-contributions-more&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Adding comments to your feed serves to promote your user&#39;s contributions even more, and I&#39;m really surprised that not everyone does it. I&#39;m using feed burner for &lt;a href=&#34;/feed/&#34;&gt;my feed&lt;/a&gt; and can therefore use a feed flair (Click your feed / Optimize / FeedFlair / Comment count) to add a link to my comments at the end of the post. That&#39;s a first step.&lt;/p&gt;
&lt;p&gt;What would be much better was if &lt;strong&gt;feed readers would get better at promoting comments&lt;/strong&gt;. Could we get them to somehow?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">New theme up for friendlybit.com</title>
            <link href="http://friendlybit.com/css/new-theme-up-for-friendlybitcom/" rel="alternate" type="text/html" title="New theme up for friendlybit.com" />
            <published>2008-05-22T01:04:54+02:00</published>
            <updated>2008-05-22T01:04:54+02:00</updated>
            <id>http://friendlybit.com/css/new-theme-up-for-friendlybitcom/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Hi! If you&#39;re reading this blog through your feed reader, today is a good day to break out of it and have a look at the site. There&#39;s been several little...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/new-theme-up-for-friendlybitcom/">
                &lt;p&gt;Hi! If you&#39;re reading this blog through your feed reader, today is a good day to break out of it and have a look at the site. There&#39;s been several little changes throughout, and I invite you to click around and explore things. &lt;strong&gt;Let me know if you find anything broken&lt;/strong&gt;!&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Comments have moved up to the top and gotten more space. That includes the comment form which have been an insult to people wanting to comment. I&#39;m hoping you reward me by correcting me even more often.&lt;/li&gt;
&lt;li&gt;I&#39;m using Google for my searches. Instead of trying to patch the builtin wordpress search I&#39;m just linking to google from the header. It gives both faster and better results.&lt;/li&gt;
&lt;li&gt;Design-wise it&#39;s much &amp;quot;lighter&amp;quot; than before. The old one felt hard and heavy, and didn&#39;t look to be as open as it in fact is.&lt;/li&gt;
&lt;li&gt;Widgetized. I&#39;m using wordpress widgets all over the place, which makes the administration of things like the &amp;quot;recent comments&amp;quot; easier. I just log in and change a number from the admin interface.&lt;/li&gt;
&lt;li&gt;Fluid width (between 1000 and 1250 pixels).&lt;/li&gt;
&lt;li&gt;Much nicer CSS, with a structure that you can actually follow.&lt;/li&gt;
&lt;li&gt;I&#39;ve &lt;a href=&#34;/other/new-design-for-friendlybit/&#34;&gt;promised&lt;/a&gt; you the number of feed readers clearly visible, and I&#39;m still going to get it done. But I&#39;m not done yet.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;No matter what I will keep what I&#39;ve always done with comments: I will read each and every comment you post, and I won&#39;t close articles for comments even though they are a year old. I will keep replying to (almost) all posts within a couple of days. I won&#39;t delete your comment just because I disagree with what you&#39;re saying, and I will go back and correct the original article with any errors you find.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You&lt;/strong&gt; are what makes this blog what it is. I could have written all my texts in word instead (and some of you probably wish I did sometimes), but that would have been totally meaningless. Feedback is what makes this blog go around.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Thanks!&lt;/strong&gt;&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Style tables with CSS</title>
            <link href="http://friendlybit.com/css/style-tables-with-css/" rel="alternate" type="text/html" title="Style tables with CSS" />
            <published>2008-03-14T01:10:28+01:00</published>
            <updated>2008-03-14T01:10:28+01:00</updated>
            <id>http://friendlybit.com/css/style-tables-with-css/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">I don&#39;t deal too much with tables. Not because I don&#39;t want to but because clients hardly ever want to use them. My guess is that they are too hard to...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/style-tables-with-css/">
                &lt;p&gt;I don&#39;t deal too much with tables. Not because I don&#39;t want to but because clients hardly ever want to use them. My guess is that they are too hard to create with todays WYSIWYG editors, and therefore get left out. It happens though that I have one or two static tables I need to style, and then I get to use a couple of my tricks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;All of the examples below work across browsers. Including IE6.&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;#gradient&#34;&gt;Add a gradient to your cells&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#spacing&#34;&gt;Remove the space between the cells with CSS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#width&#34;&gt;Obey the set width&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#columns&#34;&gt;Styling columns&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;gradient&#34;&gt;Add a gradient to your cells&lt;a href=&#34;#gradient&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One easy way to make tables look better is to add a &lt;a href=&#34;http://9rules.com/blog/2006/08/a-gradient-tutorial/&#34;&gt;subtle gradient&lt;/a&gt; to the cells. That&#39;s easy to do. But make sure you also set a background color with one of the edge colors from the gradient, and use the top or bottom keyword. You never know the height of your cells when people zoom the text.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;background&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mh&#34;&gt;#2B2B3C&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;url&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sx&#34;&gt;item_gradient.gif&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;repeat-x&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;bottom&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;spacing&#34;&gt;Remove the space between the cells with CSS&lt;a href=&#34;#spacing&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When designing tables you rarely want the ugly double border between two cells that appear when you set a border on td. Neither do you want the space in between them… Many believe the only way to remove that space is to use the cellspacing and cellpadding attributes in HTML. You don&#39;t:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;table&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;border-collapse&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;collapse&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;border&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;solid&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;silver&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;See? No ugly HTML attributes needed.&lt;/p&gt;
&lt;h2 id=&#34;width&#34;&gt;Obey the set width&lt;a href=&#34;#width&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Many of you have probably seen tables that do not stay within the width you have set on them. It can be long words or sometimes URLs that are wider than what can fit. By default, the browser puts content before style, and therefore expands the table to show the content. But what many don&#39;t know is that you can change them to always obey the set width:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;table&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;table-layout&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;fixed&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;100&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Easy, and now the table will be 100px, no matter what.&lt;/p&gt;
&lt;h2 id=&#34;columns&#34;&gt;Styling columns&lt;a href=&#34;#columns&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Sometimes you want to style some columns differently than all other cells, and I&#39;ve seen that most people add a special class to each of the cells in that column. Wouldn&#39;t it be nice if there was a way to just specify the class once? There is!&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;table&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;col&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;first&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;col&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;second&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Header 1&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Header 2&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;th&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Cell 1&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Cell 2&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;tr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;table&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;col&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;second&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;100&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Convenient isn&#39;t it? There&#39;s one thing you should know though… The col attribute only allows &lt;a href=&#34;http://www.w3.org/TR/CSS21/tables.html#columns&#34;&gt;four attributes&lt;/a&gt;: Border, Background, Width, and Visibility. What the heck? Well, there is performance issues with implementing more complex things so W3C decided not to include it. So what if you need to set, say, text-align on a column? You can be clever:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;col&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;second&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;text-align&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;right&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;first-child&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;+&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;td&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;text-align&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;right&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The above works because IE allows setting more properties on columns than the spec allows (&lt;a href=&#34;http://ln.hixie.ch/?start=1070385285&amp;amp;count=1&#34;&gt;Hixie explains it well&lt;/a&gt;). Firefox on the other hand, ignores the set text-align, but instead allows you to use a sibling selector to select the &amp;quot;second td after the first one&amp;quot; (you can add another &amp;quot;+ td&amp;quot; to select the third one, and so on…). Voilá! Cross browser column specification.&lt;/p&gt;
&lt;p&gt;That&#39;s all for now, did you know all of them?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Documenting CSS</title>
            <link href="http://friendlybit.com/css/documenting-css/" rel="alternate" type="text/html" title="Documenting CSS" />
            <published>2008-02-27T23:55:00+01:00</published>
            <updated>2008-02-27T23:55:00+01:00</updated>
            <id>http://friendlybit.com/css/documenting-css/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Just like all other programming the CSS needs documentation. I&#39;m afraid I&#39;m rather bad at it: the times I&#39;m lucky I&#39;ve been able to document by simply...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/documenting-css/">
                &lt;p&gt;Just like all other programming the &lt;strong&gt;CSS needs documentation&lt;/strong&gt;. I&#39;m afraid I&#39;m rather bad at it: the times I&#39;m lucky I&#39;ve been able to document by simply talking to the developer taking over, and the unlucky times I&#39;ve left no documentation at all. Talking directly is of course superior to everything else, you don&#39;t waste time explaining things that are obvious (differs from person to person), but you don&#39;t always have that luxury. So what I thought I&#39;d do is list things I think are important to document, for the times when you won&#39;t be available for answering questions.&lt;/p&gt;
&lt;p&gt;Don&#39;t be fooled to think all projects are alike. Sometimes you&#39;re under tremendous stress just to get the basic CSS up and running; it isn&#39;t reasonable to expect the same kind of documentation then… But most often you have an hour extra to just jot down a couple of lines about your interface.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;How is the CSS file(s) structured?&lt;/strong&gt; When you build large sites you often end up with over 1000 lines of CSS, and if you don&#39;t structure them, you&#39;ll end up with a mess. Even if you DO have a structure, it takes a lot of time to figure out someone else&#39;s code. To give you some ideas of your own, I wrote about how I &lt;a href=&#34;/css/how-to-structure-large-css-files/&#34;&gt;structure my CSS&lt;/a&gt; previously. You don&#39;t have to use that one, just be conscious about your choice, and document it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Where do I add new styles?&lt;/strong&gt; Either it&#39;s obvious from the previous structure or you need to make it obvious how to add new stuff. What if I&#39;m adding a deviation from how a certain section looks, should I put it near that section&#39;s styles, or near all other deviations? This question is especially important on sites with lots of campaign components with custom CSS. Trust me, your cleverly crafted structure will become a mess if you miss answering this question.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What can I do with existing styles?&lt;/strong&gt; To make sure design ends up in the CSS and not in the HTML there needs to be some kind of overview of all available classes. Else people are going to hack things and try to duplicate your code. How do you handle columns, clearing, quotes, and floated images? Did you think of it yourself or do I have to add my own code? A good way might be to make a document where you tie the different classes to how they look when used.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How are different browsers handled?&lt;/strong&gt; Struggling through browser hacks is a real pain in the ass, unless those hacks are properly documented. What browsers do you try to support, and which of them have you tested in? Did you plan for the future?&lt;/li&gt;
&lt;li&gt;(Optional) &lt;strong&gt;Web standard basics&lt;/strong&gt;. Working with web standards is rather different than working the old (table based) way . So if you know that oldschool developers will work with your code (are you sure they won&#39;t?), it could be a good idea to shortly summarize the modern web mindset. I recommend using a lot of links here, not to waste time; people are very different in what they know.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you&#39;ve answered the questions able you&#39;ve come a long way. Your code is understandable, and will stay in shape for much longer. Not to mention when you&#39;re looking at some code in a year, thinking: &amp;quot;Who wrote this shit?! It&#39;s a mess!&amp;quot;, and then figure out it was you.&lt;/p&gt;
&lt;p&gt;Now, is there anything essential I&#39;m missing, that you want to add?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">IE8 and Doctype switching</title>
            <link href="http://friendlybit.com/css/ie8-and-doctype-switching/" rel="alternate" type="text/html" title="IE8 and Doctype switching" />
            <published>2008-01-26T17:44:50+01:00</published>
            <updated>2008-01-26T17:44:50+01:00</updated>
            <id>http://friendlybit.com/css/ie8-and-doctype-switching/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">The topic of this week has been IE8s new rendering mode, and the strange way to trigger it. As usual, I&#39;ve decided not to comment right away, and instead...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/ie8-and-doctype-switching/">
                &lt;p&gt;The topic of this week has been IE8s new rendering mode, and the strange way to trigger it. As usual, I&#39;ve decided not to comment right away, and instead first read what others are saying and try to form an opinion.&lt;/p&gt;
&lt;p&gt;I believe the best articles that talks about the switch are these:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;http://www.b-list.org/weblog/2008/jan/23/legacy/&#34;&gt;Legacy&lt;/a&gt;, by &lt;span class=&#34;person-name&#34;&gt;James Bennet, puts this move in a bigger context. I believe his most important conclusion is that Microsoft are now clearly positioning themselves towards big old corporate intranets, reiterating &amp;quot;Don&#39;t break the web&amp;quot;.&lt;br /&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://www.andybudd.com/archives/2008/01/has_internet_ex/&#34;&gt;Has Internet Explorer Just Shot Itself in the Foot?,&lt;/a&gt; by Andy Budd, talks about how Microsoft marginalizes their own browser. Most people won&#39;t know about the switch, and end up in IE7 mode, so there&#39;s no real need for anyone to upgrade. IE7s rendering engine needs to be with us, forever.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://diveintomark.org/archives/2008/01/23/microsoft-koan&#34;&gt;Microsoft koan&lt;/a&gt;, by Mark Pilgrim, elegantly points out that strange code (unknown doctypes, including html5) will be rendered in standards mode, and ordinary code (proper doctype) will be rendered in IE7 mode. Seems twisted?&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;the-real-strangeness&#34;&gt;The real strangeness&lt;a href=&#34;#the-real-strangeness&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;What I can&#39;t understand in all of this is how IE7-specific sites can be such big of a problem. Because that what all of this fuss is really about. That&#39;s why we need a new switching mode and they need to ship the IE7 rendering engine with IE8.&lt;/p&gt;
&lt;p&gt;So, now there&#39;s a couple of different sites.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;IE6 specific sites.&lt;/strong&gt; My guess is that these are the majority of sites out there. These will break as much in IE8 as they did in IE7. &amp;quot;Don&#39;t break the web&amp;quot; does not apply to these sites.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IE7 specific sites&lt;/strong&gt;. These are much fewer and got updated rather recently (badly, to work only in IE7). The new switch is there for these sites. With the switch these sites won&#39;t break.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sites built to the standards&lt;/strong&gt;. These were also updated rather recently, but unlike the above sites they were built to the standards. Fixes for IE6 and IE7 were properly only sent to just those browsers, and will &lt;em&gt;not&lt;/em&gt; be sent to IE8 (conditional comments anyone?). If you targeted IE7 with your conditional comment, IE8 will not get that fix, breaking these type of sites. Well, unless IE8 will execute IE7 conditional comments, when that engine does the rendering.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So let&#39;s look back at the previous articles, keeping in mind the IE team mantra: &amp;quot;&lt;em&gt;Don&#39;t break the web&lt;/em&gt;&amp;quot;, the very reason why this fix exists.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First article&lt;/strong&gt; (1): My guess is that many corporate intranets belong in the first group of sites. They haven&#39;t been updated in a while, and won&#39;t be either. This group of sites will be just as unhappy with IE8 as they were with IE7. This can&#39;t be about those sites. IE team mantra: &amp;quot;&lt;em&gt;Keep breaking the web just as much as we broke it before&lt;/em&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Second article&lt;/strong&gt; (2): This switch will increase the number of sites in the IE7 specific group. This will be at the expense of the standards group. When a developer not knowing about the switch sees that his site works in IE7 and IE8 (which will be the same), he will stop working on it. IE team mantra: &amp;quot;&lt;em&gt;Freeze the web to IE7&lt;/em&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Third article&lt;/strong&gt; (3): Since unknown doctypes will send IE8 into standards mode, there will be even more breakage than before. What? Well, sites with broken doctypes, that previously sent IE6 and IE7 into quirks mode and relied on that, will break. IE Team mantra: &amp;quot;&lt;em&gt;Break the web&lt;/em&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;Additionally, modern developers that don&#39;t read the IE blog, and don&#39;t know about the new switch, will keep getting IE7s strange behaviour on their sites. And since the switch also can be made via a HTTP header, even copying the full HTML and CSS of a site might break it when looking at it locally. IE team mantra: &amp;quot;&lt;em&gt;Make people read our blog, or go insane trying to develop to the standards&lt;/em&gt;&amp;quot;.&lt;/p&gt;
&lt;h2 id=&#34;what-it-all-comes-down-to&#34;&gt;What it all comes down to&lt;a href=&#34;#what-it-all-comes-down-to&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is a terrible idea, both technically and in how it was presented. If the same idea had been presented in a more open manner, &amp;quot;&lt;em&gt;we&#39;re thinking about solving this problem like this… what do you think?&lt;/em&gt;&amp;quot;, people would have been much more willing to help, and had probably came up with a better solution.&lt;/p&gt;
&lt;p&gt;WaSP really acted badly by not first talking to the community, or at least discussing things internally, and instead just presented how IE8 will be built. Also, since this won&#39;t help developing standards based websites, and instead help IE7 specific sites, I&#39;m not sure what the WaSP has to do with this issue whatsoever.&lt;/p&gt;
&lt;p&gt;On the constructive side of things, I think the &lt;strong&gt;best way forward for IE8 is to change the switch to be opt-in, letting IE7 specific sites switch to IE7 rendering if they want to&lt;/strong&gt;. That&#39;s makes sure IE7 sites that break are easy to fix, and does not break havoc on the rest of the web. Don&#39;t set the default to worse rendering than you can produce.&lt;/p&gt;
&lt;p&gt;With the above change, I&#39;m looking forward to another modern web browser, IE8.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Sharepoint 2007 from an interface developer’s view</title>
            <link href="http://friendlybit.com/css/sharepoint-2007-from-an-interface-developers-view/" rel="alternate" type="text/html" title="Sharepoint 2007 from an interface developer’s view" />
            <published>2008-01-20T12:10:42+01:00</published>
            <updated>2008-01-20T12:10:42+01:00</updated>
            <id>http://friendlybit.com/css/sharepoint-2007-from-an-interface-developers-view/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Like Cameron Moll (Skinning Sharepoint and Pointedly unskinnable), I&#39;ve been working with Sharepoint 2007 (aka MOSS) recently, and I hope you don&#39;t mind me...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/sharepoint-2007-from-an-interface-developers-view/">
                &lt;p&gt;Like Cameron Moll (&lt;a href=&#34;http://cameronmoll.com/archives/2007/05/skinning_ms_sharepoint_with_st/&#34;&gt;Skinning Sharepoint&lt;/a&gt; and &lt;a href=&#34;http://cameronmoll.com/archives/2007/10/sharepoint_2007_pointedly_unskinnable/&#34;&gt;Pointedly unskinnable&lt;/a&gt;), I&#39;ve been working with Sharepoint 2007 (aka MOSS) recently, and I hope you don&#39;t mind me posting a few articles about my work here. I&#39;ve found far too few blog posts that really go to the depth in explaining how things really work. I&#39;ll try to do that here, but I hope you can respect my wish that this does not turn into a helpdesk.&lt;/p&gt;
&lt;h2 id=&#34;quotcustomizationquot&#34;&gt;&amp;quot;Customization&amp;quot;&lt;a href=&#34;#quotcustomizationquot&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Let&#39;s start. &lt;strong&gt;Sharepoint 2007 very, very hard to customize&lt;/strong&gt;. If your job is to customize the interface in any major way, you have a lot of work ahead of you. You might think you&#39;re a much better interface developer than me, but you still have a lot of work ahead of you. You need to accept that.&lt;/p&gt;
&lt;p&gt;When you read about Sharepoint 2007 on other sites you will find that people are really ecstatic about it. Just check the comments on how to &lt;a href=&#34;http://planetwilson.blogspot.com/2007/09/sharepoint-2007-colour-color-calendar.html&#34;&gt;customize the calendar&lt;/a&gt;. Reading carefully you will find that he&#39;s comparing it with Sharepoint 2003, not with other products, or even a standard ASP.NET site. That&#39;s a big difference. Sharepoint 2003 was much worse, but that does not mean things are good now. This is a common pattern, people that like Sharepoint compare it to the previous version, not with better ways of doing things.&lt;/p&gt;
&lt;p&gt;As most CMS:es, Sharepoint gets sold to customers that don&#39;t know programming. They see a product that can handle all the features they want: blogs, wikis, forums, calendars, document libraries, workflows, and so on. All features you could ever want is included, from what is called &amp;quot;out of the box&amp;quot;. The problem is that the system is built so that all of those &amp;quot;out of the box&amp;quot; features are hard to customize. Things like changing how the wiki renders, is really hard. Often it&#39;s easier to rebuild that feature from scratch, than customizing what Sharepoint ships.&lt;/p&gt;
&lt;p&gt;This is the main reason, from my point of view, that you should pick another CMS.&lt;/p&gt;
&lt;h2 id=&#34;specifics&#34;&gt;Specifics&lt;a href=&#34;#specifics&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I don&#39;t believe you trust me on my words, so I thought I&#39;d be more specific now, and talk about the issues that make Sharepoint 2007 hard to work with (customize). Let me stress that these are not all the issues, just the major ones that an interface developer has to tackle.&lt;/p&gt;
&lt;h3 id=&#34;development&#34;&gt;Development&lt;a href=&#34;#development&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;From what I&#39;ve read from larger projects, the recommended development environment for a Sharepoint site is a virtual machine. For us, we needed a 36 Gb image, a size that required me to get a new external hard drive, just to store it. Also, running in a virtual machine means that you only can use about half of your RAM, which means everything gets slow. As if that wasn&#39;t enough, a new virtual machine means you have to reinstall all your programs, browsers, plugins again. Web development shouldn&#39;t have to be like that.&lt;/p&gt;
&lt;h3 id=&#34;accessibility&#34;&gt;Accessibility&lt;a href=&#34;#accessibility&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Sharepoint has gotten a lot of bashing for not being accessible, so they&#39;ve added some features to account for that. Some of those are really good individually, but looking at the general mess that is the HTML that Sharepoint spits out, the pretty page above fades in importance. One major problem is that you still need &lt;strong&gt;javascript enabled&lt;/strong&gt; for many of the accessibility features. Enabling &amp;quot;Accessibility mode&amp;quot;, among other things, makes dropdown menus appear as new windows (popups) instead of dynamically writing HTML to the page. And this is after they &amp;quot;fixed&amp;quot; it.&lt;/p&gt;
&lt;h3 id=&#34;page-size&#34;&gt;Page size&lt;a href=&#34;#page-size&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A standard Sharepoint site uses lots of default Javascript and CSS in two files called core.js and core.css. All in all they add up to over 250 kb. Yes, that&#39;s not a misspelling or extra zero, a default page in sharepoint takes at least 250 kb. This is not counting the HTML, a huge, table-ridden, inline-javascripted, mess of things.&lt;/p&gt;
&lt;p&gt;If you go through lots of trouble, you can strip those files out, but that means you can&#39;t use any default components. Since much of Sharepoint depend on those, you don&#39;t really want to go that way. It&#39;s a mess, and Microsoft themselves recommend you try to &lt;a href=&#34;http://msdn2.microsoft.com/en-us/library/bb727371.aspx#MOSS2007OptPerfWCM_PagePayloadSmallisGood&#34;&gt;remove some of it&lt;/a&gt; to boost performance. Preferably by using AJAX to load the js file later. Seriously.&lt;/p&gt;
&lt;h3 id=&#34;javascript-and-browser-dependencies&#34;&gt;Javascript and Browser dependencies&lt;a href=&#34;#javascript-and-browser-dependencies&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Except from core.js, the javascript is spread out all over the place. As usual in many CMS:es, javascript is not treated as a real programming language, so there&#39;s no structuring whatsoever. Sometimes it&#39;s script tags, sometimes inline, sometimes external mini files, and most often automatically generated code. It&#39;s a real mess, and is a big reason for the HTML size being so large. Many of the scripts do not work in browsers other than IE, which means you really need IE to properly use the admin interface.&lt;/p&gt;
&lt;p&gt;From the browser compatability info you can read that there are level 1 and level 2 browsers:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;quot;Level 2 web browsers support all of our basic functionality so that users can both read and write in our content sites, perform site administration, etc. Some functionality may not be available, some functionality may be available in a more limited form, and some visual rendering may not be as optimized as our Level 1 browsers. We also will not support Level 2 web browsers on the Central Administration site.&amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;These are the Level 2 browsers: Firefox, Netscape, Safari. Opera isn&#39;t even in the list. Is this the new, modern way, of handling cross browser compatibility?&lt;/p&gt;
&lt;h3 id=&#34;changing-the-css&#34;&gt;Changing the CSS&lt;a href=&#34;#changing-the-css&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I previously said that most CSS is included in a file called core.css. The file in itself if huge, with thousands of class names, and no structuring whatsoever. Heather Solomon has made an attempt to make things workable by &lt;a href=&#34;http://www.heathersolomon.com/content/sp07cssreference.htm&#34;&gt;making images of what each class specifies&lt;/a&gt;. It&#39;s not even nearly a complete reference, and helps some, but using &lt;a href=&#34;http://getfirebug.com/&#34;&gt;Firebug&lt;/a&gt; is a faster way. Another thing the CSS sheet above does, is show how completely unorganized the CSS is. Have a look at it.&lt;/p&gt;
&lt;p&gt;As with core.js you can&#39;t really remove core.css, since lots of built-in functionality depends on it. So what you need to do is start deciding which of those rules you need to overwrite and which not. Have fun!&lt;/p&gt;
&lt;p&gt;To add to the insult, if you just add your own CSS as an external file and try to link to that on your own pages, core.css is appended as the last stylesheet in the source code. This of course means that all your changes get overwritten, and you need to hack around things by using the &lt;link&gt; tag directly (instead of sharepoint&#39;s own csslink-control), or add your custom files via the admin interface. Since core.css is just a list of simple class names, you can also use &lt;a href=&#34;http://www.htmldog.com/guides/cssadvanced/specificity/&#34;&gt;CSS Specificity&lt;/a&gt; to make your rules count, but that isn&#39;t mentioned in any of the troubleshooting blog posts. None the less, it&#39;s tedious do work around.&lt;/p&gt;
&lt;h3 id=&#34;share-point-and-master-pages&#34;&gt;Share point and Master pages&lt;a href=&#34;#share-point-and-master-pages&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Most of Sharepoint is upgraded to use .NET 2.0, and its concept of Master pages and aspx pages. For those of you that don&#39;t develop in .NET the two can be explained as a templating mechanism, where each Master page has general placeholders where you can insert aspx pages. In each aspx page you specify one master page, and all of the placeholders you want to fill with content. It&#39;s a pretty good system.&lt;/p&gt;
&lt;p&gt;Sharepoint taps into this system by making up two strings &amp;quot;~masterurl/custom.master&amp;quot;, and &amp;quot;~masterurl/default.master&amp;quot;, that you use instead of specifying your own masterpages. Users then specify masterpages in the admin interface, potentially breaking the entire site. Also, Sharepoint assumes there&#39;s just one masterpage per site, so if you thought you could use one masterpage for twocolumn layouts, and another for threecolumn layouts, you&#39;re wrong. The solution here is to break out of the Sharepoint way and hardcode real urls instead of doing things the Sharepoint way.&lt;/p&gt;
&lt;p&gt;There&#39;s also things you can&#39;t change. The admin interface has a masterpage called application.master, which controls pretty much everything that has to do with built-in Sharepoint things. You don&#39;t ever change this file, since it&#39;s quite easy to seriously break things then. The problem is that this file also specify the look and feel of the admin interface, and if you&#39;re building a site where people are expected to add stuff, they will spend time in the admin interface. There isn&#39;t a good way around this, and you probably end up just changing some colors via CSS and let it be.&lt;/p&gt;
&lt;h3 id=&#34;default-net-controls&#34;&gt;Default .NET controls&lt;a href=&#34;#default-net-controls&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The default master pages that ship with Sharepoint is horrendous and I&#39;ll post more details about them in a later post. But even if you roll your own master pages from scratch you still have the standard .NET-problem with controls. Using controls in .NET is a way to package functionality that you can easily add to your pages. A developer just needs to copy a DLL file, and call the control, optionally sending in some parameters. Easy.&lt;/p&gt;
&lt;p&gt;The problem with this approach is that a control consists both of logic and HTML. So if you want some built-in logic that renders, say, the breadcrumb trail, you also get the HTML the author of the control deemed appropriate. In Sharepoint, a breadcrumb trail can be a doubly nested table, with display: none; controls to enable accessibility, and a doubly span nested link. It&#39;s just a terrible mess, but there&#39;s no other way to get to the breadcrumb logic, except from building a new control from scratch. Be prepared to work with terrible HTML.&lt;/p&gt;
&lt;h2 id=&#34;in-summary&#34;&gt;In summary&lt;a href=&#34;#in-summary&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you want to examine the points above by yourself, there&#39;s a MOSS example site up at &lt;a href=&#34;http://www.wssdemo.com/default.aspx&#34;&gt;wssdemo.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This article is a interface developer view at Sharepoint 2007. If you look at the system from other viewpoints, I&#39;m sure there are good things there. That&#39;s not my point. What I&#39;m trying to say is that &lt;strong&gt;Sharepoint 2007, is beyond repair when it comes to interface customization&lt;/strong&gt;, and you should do everything in your power to avoid working with it. If I can give one interface developer the arguments to convince a customer to pick another system, this article was worth it. Thanks for reading.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">IE8 renders the acid 2 test</title>
            <link href="http://friendlybit.com/css/ie8-renders-the-acid-2-test/" rel="alternate" type="text/html" title="IE8 renders the acid 2 test" />
            <published>2007-12-20T00:27:21+01:00</published>
            <updated>2007-12-20T00:27:21+01:00</updated>
            <id>http://friendlybit.com/css/ie8-renders-the-acid-2-test/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">I&#39;m not sure why I don&#39;t see that many people talking about the fact that IE8 renders the acid 2 test perfectly now. It really seems Microsoft is starting...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/ie8-renders-the-acid-2-test/">
                &lt;p&gt;I&#39;m not sure why I don&#39;t see that many people talking about the fact that &lt;a href=&#34;http://blogs.msdn.com/ie/archive/2007/12/19/internet-explorer-8-and-acid2-a-milestone.aspx&#34;&gt;IE8 renders the acid 2 test perfectly&lt;/a&gt; now. It really seems Microsoft is starting to move forward again, after starting to feel some pressure from the open source world. Will they be able to pick up the speed needed to get 96% marketshare again? Time will tell.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Good &lt;a href=&#34;http://channel9.msdn.com/showpost.aspx?postid=367207&#34;&gt;interview about IE8&lt;/a&gt; on channel9.&lt;/p&gt;
&lt;/blockquote&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Future of web standards (my take)</title>
            <link href="http://friendlybit.com/css/future-of-web-standards-my-take/" rel="alternate" type="text/html" title="Future of web standards (my take)" />
            <published>2007-12-20T00:35:18+01:00</published>
            <updated>2007-12-20T00:35:18+01:00</updated>
            <id>http://friendlybit.com/css/future-of-web-standards-my-take/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Stuart Landridge sums up the ongoing debate about the future of CSS. My thoughts on this are that we should: Let browser makers run loose with implementing...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/future-of-web-standards-my-take/">
                &lt;p&gt;Stuart Landridge sums up the &lt;a href=&#34;http://www.kryogenix.org/days/2007/12/17/reigniting-the-browser-wars&#34;&gt;ongoing debate about the future of CSS&lt;/a&gt;. My thoughts on this are that we should:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Let browser makers run loose with implementing &lt;strong&gt;new features&lt;/strong&gt;, based on feedback from web developers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Have a standard body (or some other group) that look at those &lt;strong&gt;existing features&lt;/strong&gt; and see how they can be standardized.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Have browsers change their implementation of the &lt;strong&gt;features to match&lt;/strong&gt; what the standards body proclaims.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt; stops the bad idea that is to have a committee of people do innovation work. You need people both that know what web developers want and what is possible to implement. Browser makers do this.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt; makes sure the wild features that browser makers have played with get usable on real sites. To be usable a certain feature needs to be usable across (a majority of) browsers, and web developers of today know this. Before reaching this stage features will be played with, but not used on production sites.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt;. Browser makers having implemented a feature differently from what the spec suggests need to change their implementation to match that of the standard. This step means that the standards body need to have the trust of the browser makers.&lt;/p&gt;
&lt;p&gt;For the features of a certain browser, this means that a feature will move from &amp;quot;experimental&amp;quot;, when it&#39;s played with, and to &amp;quot;standardized&amp;quot;, when there is a spec and the feature conforms to it. Browsers need to specify this somehow.&lt;/p&gt;
&lt;p&gt;I believe this is a much saner process than what is going on right now. Let&#39;s try it.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">CSS3 Media queries instead of the media attribute</title>
            <link href="http://friendlybit.com/css/css3-media-queries-instead-of-the-media-attribute/" rel="alternate" type="text/html" title="CSS3 Media queries instead of the media attribute" />
            <published>2007-11-21T18:21:50+01:00</published>
            <updated>2007-11-21T18:21:50+01:00</updated>
            <id>http://friendlybit.com/css/css3-media-queries-instead-of-the-media-attribute/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">In my previous post about the media attribute I talked about how strange the media attribute is, and that its usefulness isn&#39;t that obvious. As a followup I...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/css3-media-queries-instead-of-the-media-attribute/">
                &lt;p&gt;In my previous post about the media attribute I talked about &lt;a href=&#34;/css/media-attribute/&#34;&gt;how strange the media attribute is&lt;/a&gt;, and that its usefulness isn&#39;t that obvious.&lt;/p&gt;
&lt;p&gt;As a followup I want to point you to an article that Russell Beattie wrote about &lt;a href=&#34;http://www.russellbeattie.com/blog/css3-and-the-death-of-handheld-stylesheets&#34;&gt;CSS3 media queries&lt;/a&gt;. Media queries are a way to &lt;strong&gt;check the capabilities&lt;/strong&gt; of a user-agent instead of checking what kind of media type it claims to be. This makes a lot of sense to me. Does it really matter if someone is using a small computer screen or a big mobile phone? What about if they use a &lt;a href=&#34;http://www.youtube.com/watch?v=CZrr7AZ9nCY&#34;&gt;big ass table&lt;/a&gt;? (aside from the pun, I really think &lt;a href=&#34;http://www.youtube.com/watch?v=rP5y7yp06n0&#34;&gt;Microsoft surface&lt;/a&gt; is cool)&lt;/p&gt;
&lt;p&gt;Checking for capabilities of a certain user-agent makes much more sense: &amp;quot;if available width larger than 200px, show two columns instead of one&amp;quot;. If they are dynamically evaluated (I don&#39;t know if they are), they allow you to build truly dynamic layouts, that work virtually everywhere. That&#39;s what I call accessible layouts.&lt;/p&gt;
&lt;p&gt;An interesting parallel is comparing checking user-agent strings and &lt;a href=&#34;http://developer.apple.com/internet/webcontent/objectdetection.html&#34;&gt;object detection in javascript&lt;/a&gt;, and the media attribute and media queries. I believe media queries is the natural next step. Today, the different types of media have started to mix; just look at TV:s and computers, or handheld computers and mobile phones. &lt;strong&gt;The type of media is not as important, capabilities are&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Although queries do not solve all of the questions I put forward in the previous post, they do pose an interesting alternative. Agreed?&lt;/p&gt;
&lt;p&gt;(&lt;a href=&#34;http://www.w3.org/TR/css3-mediaqueries/&#34;&gt;CSS3 Media queries&lt;/a&gt; are as a standard currently a candidate recommendation (which means it&#39;s safe to implement), and is currently &lt;a href=&#34;http://www.css3.info/preview/media-queries/&#34;&gt;supported by Opera 9 and Safari 3&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Opera 9.5 evaluates the queries dynamically, Safari does not, thanks &lt;a href=&#34;http://simon.html5.org/&#34;&gt;zcorpan&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Media attribute – what have you done for me lately?</title>
            <link href="http://friendlybit.com/css/media-attribute/" rel="alternate" type="text/html" title="Media attribute – what have you done for me lately?" />
            <published>2007-10-29T00:06:54+01:00</published>
            <updated>2007-10-29T00:06:54+01:00</updated>
            <id>http://friendlybit.com/css/media-attribute/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">I&#39;ve been thinking for a while about the media attribute on link tags. Some people might find that thinking deep thoughts about HTML attributes is kind of...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/media-attribute/">
                &lt;p&gt;I&#39;ve been thinking for a while about the media attribute on link tags. Some people might find that thinking deep thoughts about HTML attributes is kind of strange, but I know you, my dear readers, know the feeling ;)&lt;/p&gt;
&lt;p&gt;An example, just so I know we&#39;re on the same page:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;link&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;style.css&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;media&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;handheld&amp;quot;&lt;/span&gt;
   &lt;span class=&#34;na&#34;&gt;rel&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;stylesheet&amp;quot;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;text/css&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This makes sure devices that support the handheld media type (mobile phones?) should load that stylesheet, but no others. It seems simple doesn&#39;t it? By using a simple attribute you can style things differently for certain devices. But there&#39;s several things to keep in mind, that actually make this attribute a lot less useful.&lt;/p&gt;
&lt;h2 id=&#34;problem-number-1-presentation-and-content-are-cou&#34;&gt;Problem number 1: Presentation and content are coupled&lt;a href=&#34;#problem-number-1-presentation-and-content-are-cou&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One of the big selling points of CSS is the separation of presentation from content. And while I believe that&#39;s still a good thing to have, not everyone agrees about it&#39;s usefulness. Some time ago Jeff Croft wrote an article about how unusual it is to only change the CSS and not the HTML of a site. While he&#39;s mostly making a point of why we should use a certain CSS framework, there&#39;s a good point hidden there: Right now it isn&#39;t possible to separate things completely.&lt;/p&gt;
&lt;p&gt;Designers have of course known this for centuries. They will tell you: you need to adapt the design to the content you&#39;re designing. If you&#39;re building a site for a shampoo, you might use water and bubbles in your design. If you build a web development blog, you use an image of blueish sky… ehm… Well, you get the point. Good design adapts to the content. They are coupled.&lt;/p&gt;
&lt;p&gt;You can&#39;t just switch out the content and expect the design to still work. Sure, you can make small adjustments, and make these available as alternate stylesheets, but larger changes just doesn&#39;t work. The problem with the media attribute is that it&#39;s made for big design changes (switching media), but with no changes in content. How often can you just restyle a word document to get a powerpoint slide? What about converting that slide to something nicely viewable on a mobile phone? That&#39;s what the media attribute is there for.&lt;/p&gt;
&lt;p&gt;My point is: switching to another media needs much more than just a change in design. You need to change the content to fit that media too. And if you change the content, why not change what stylesheet you link to? This is why I rarely use the &amp;quot;handheld&amp;quot; or &amp;quot;projection&amp;quot; values.&lt;/p&gt;
&lt;h2 id=&#34;problem-number-2-load-time&#34;&gt;Problem number 2: Load time&lt;a href=&#34;#problem-number-2-load-time&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You could think that the browser only loads the one stylesheet that matches the media it&#39;s currently showing. Not true. All stylesheets, &lt;a href=&#34;http://www.phpied.com/delay-loading-your-print-css/&#34;&gt;no matter what media&lt;/a&gt; they are tied to, are loaded at startup.&lt;/p&gt;
&lt;p&gt;This means that the more media types you account for, the longer the load time for any of them will be. Very annoying.&lt;/p&gt;
&lt;h2 id=&#34;problem-number-3-user-agent-support&#34;&gt;Problem number 3: User agent support&lt;a href=&#34;#problem-number-3-user-agent-support&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;While being able to design for specific user agents might sound like a good idea, the media attribute still requires user agents to support it. If a large part of user agents refuse to apply your style using the media attribute, why not use another method directly? Just to get an idea of how messy support currently is, you can read the &lt;a href=&#34;http://css-discuss.incutio.com/?page=HandheldStylesheets&#34;&gt;css-discuss summary of the handheld problems&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;quot;Some current phones apply &amp;quot;screen&amp;quot; styles as well as &amp;quot;handheld&amp;quot; styles, others ignore both, and in some cases the phone carrier runs pages through a proxy that strips styles out even if the phone could recognize them, so it&#39;s a crapshoot figuring out what will get applied&amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As you see, the value of the media attribute isn&#39;t entirely obvious. Sure, you might be able to use it for print with good results, but that&#39;s not all it&#39;s there for. Right?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">@media Ajax London, here I come</title>
            <link href="http://friendlybit.com/css/media-ajax-london-here-i-come/" rel="alternate" type="text/html" title="@media Ajax London, here I come" />
            <published>2007-10-28T23:09:37+01:00</published>
            <updated>2007-10-28T23:09:37+01:00</updated>
            <id>http://friendlybit.com/css/media-ajax-london-here-i-come/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Just a short note that I&#39;ll be attending @media Ajax London, 19th-20th November. If you see me, come by and say hello!</summary>
            <content type="html" xml:base="http://friendlybit.com/css/media-ajax-london-here-i-come/">
                &lt;p&gt;Just a short note that I&#39;ll be attending &lt;a href=&#34;http://www.vivabit.com/atmediaajax/&#34;&gt;@media Ajax London&lt;/a&gt;, 19th-20th November. If you see me, come by and say hello!&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">I’m an interface developer</title>
            <link href="http://friendlybit.com/css/im-an-interface-developer/" rel="alternate" type="text/html" title="I’m an interface developer" />
            <published>2007-08-20T23:17:55+02:00</published>
            <updated>2007-08-20T23:17:55+02:00</updated>
            <id>http://friendlybit.com/css/im-an-interface-developer/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">In his latest post Roger Johansson asks the question Are we designers or developers?. I have a simple answer for that. None of them. Let me explain: First...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/im-an-interface-developer/">
                &lt;p&gt;In his latest post Roger Johansson asks the question &lt;a href=&#34;http://www.456bereastreet.com/archive/200708/are_we_designers_or_developers/&#34;&gt;Are we designers or developers?&lt;/a&gt;. I have a simple answer for that. &lt;strong&gt;None of them&lt;/strong&gt;. Let me explain:&lt;/p&gt;
&lt;p&gt;First we have these people calling themselves &lt;strong&gt;developers&lt;/strong&gt;. And boy do they know programming… and math… and… no that&#39;s all. Many have a masters degree in computer science, a degree that pretty much tells you that they once gave five years of their lives to programing, how cool is that!? It&#39;s not unusual to find people that &lt;a href=&#34;http://xkcd.com/55/&#34;&gt;think in those terms&lt;/a&gt; too. You can recognize them by their 10 year old, unmatched, clothes and you&#39;ll rarely talk more than 1 minute with them. Very efficient.&lt;/p&gt;
&lt;p&gt;Then we have the &lt;strong&gt;designers&lt;/strong&gt;. Either real females, or people very close to females, that just can&#39;t stop talking about this abstract thingie-thongie that just like, you know, exploded in a big burst of colors and like… &amp;quot;EHEM! Sorry!&amp;quot;, you hear them say, regaining consciousness and flying back to earth. Their clothes, at least you think they are clothes, often look like they where meant for something else. Perhaps for building steel pumps, or killing animals… or both. Well, at least these clothes are matched… or very purposefully not at all matched (not at aaaall like the developers). You can talk with these people for hours, probably even days, and still only touch upon the delicate topic of &amp;quot;a glass of water&amp;quot;. Oh, and they &amp;quot;create&amp;quot; things too. Very deep.&lt;/p&gt;
&lt;p&gt;So where the heck does the &lt;strong&gt;interface developer&lt;/strong&gt; come into all of this? Well, imagine you have a real project at hand. Real people that need some new website to do their work. Real deadlines, money that switches hands. Smiling business people that promises things and shake hands. Seems like something you know of?&lt;/p&gt;
&lt;p&gt;Now, imagine bringing a developer and a designer together in a room, for like a month, working together with this new website. Concentrate hard and try to see the images before your very eyes. Will they accomplish anything?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Hell no!&lt;/strong&gt; In 5 minutes they will have started arguing about who should be the first one to open the door, and in what way. One talking about the most efficient way to turn the handle, and the other one defending herself by talking about cosmic beams from Saturn. After the first day the developer will have sore cheeks, after being constantly bitch slapped while hiding under his desk. The third day the designer will sit shaking in a corner after the electric shock induced by the steel helmet the developer built. None of them will survive the fourth day, let alone the project.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Very yes!&lt;/strong&gt; When you meet them after the month has passed you find two harmonic people that smiles to each other and really seem to have connected. They explain to you that the demonstration will be in two parts, first the designer and then the programmer. The designer shows you an app that really touches you, at least you think so, although you not fully understand it. The programmer shows you the other part of the app, one that instantly shows the number 369. They finish the presentation and look at you. You stand up, walk out, lock yourself into a nearby free conference room, and shout with all the power in your lungs: &amp;quot;HOW THE F*#CK AM I GOING TO DO MY TAXES WITH THIS SHIT?!#&amp;quot;. When you come back you find them congratulating each other for making the deadline.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You see? There&#39;s something missing there. Some kind of link between the two. Someone that can walk into a room with two screaming people and calmly say: &amp;quot;Hey, you both kinda run linux (SuSE vs. Mac OS X), and have a &amp;quot;cold&amp;quot; desktop background (default plain blue vs. modern interpretation of &lt;a href=&#34;http://en.wikipedia.org/wiki/Image:Vasnetsov_Snegurochka.jpg&#34;&gt;Vasnetsov Snegurochka&lt;/a&gt;), what a coincidence!?&amp;quot;. There needs to be someone that can walk into the same room the next day and explain that they are talking about two different kinds of &amp;quot;abstract methods&amp;quot;. There needs to be a link.&lt;/p&gt;
&lt;p&gt;But there&#39;s more: An interface developer is silly enough to learn languages that doesn&#39;t even have variables. Even though he know that his code will be sent as uncompressed plaintext and will be rendered by broken excuses for programs, he won&#39;t cry himself to bed every night.&lt;/p&gt;
&lt;p&gt;He will also gladly adapt a design to something it wasn&#39;t really intended for, and he even will make it look somewhat good. He will skip adding those fabulous shadows, to make the deadline on time, and still think of himself a good person.&lt;/p&gt;
&lt;p&gt;You see, even though &amp;quot;interface&amp;quot; reflect the visual graphic things, and &amp;quot;developer&amp;quot; relate to hard logic code, &lt;strong&gt;interface developers&lt;/strong&gt; are real people, not a combination of two halves. I am one.&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Min-width and Max-width template</title>
            <link href="http://friendlybit.com/css/min-width-and-max-width-template/" rel="alternate" type="text/html" title="Min-width and Max-width template" />
            <published>2007-05-28T20:57:31+02:00</published>
            <updated>2007-05-28T20:57:31+02:00</updated>
            <id>http://friendlybit.com/css/min-width-and-max-width-template/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Some problems seem to appear again and again, and one of them is page width. How wide should a site be? Should you adapt to 800px resolution? 1024px? Fully...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/min-width-and-max-width-template/">
                &lt;p&gt;Some problems seem to appear again and again, and one of them is &lt;strong&gt;page width&lt;/strong&gt;. How wide should a site be? Should you adapt to 800px resolution? 1024px? Fully fluid with percentages? Perhaps elastic using em-units? There are lots to choose from. What I&#39;ve found is that there&#39;s one solution that almost always works. You most probably already know it, but I thought it might be helpful for some to have a template you just copy and use.&lt;/p&gt;
&lt;p&gt;The idea is to use a fluid width but limit it by using &lt;code&gt;min-width&lt;/code&gt; and &lt;code&gt;max-width&lt;/code&gt;. As with almost all CSS tricks, we do a little bit of hacking for Internet Explorer 6 (IE6). Link to the working &lt;a href=&#34;/files/min-max-template/&#34; data-no-instant&gt;min/max template&lt;/a&gt; is available, and an explanation follows.&lt;/p&gt;
&lt;p&gt;I&#39;m picking 760px as the minimum width. It fits within a maximized browser window on 800×600 resolution, accounting for scrollbars. Next we need some kind of max-width, and for this I&#39;m going to pick 960px. I could probably go a bit higher but 960 is nicely divisible with a lot of numbers, 3, 4, 5, 6, 8, 10, 12, 15, and 16, making for nice columns (see &lt;a href=&#34;http://cameronmoll.com/archives/2006/12/gridding_the_960/&#34;&gt;Gridding the 960&lt;/a&gt;). Lastly we need some way to tell the browser to follow the width of the browser window when resizing, and width: 100% does that.&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;wrapper&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;min-width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;760&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;max-width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;960&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;100&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;%&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This assumes that you have a div with id wrapper around all your content.&lt;/p&gt;
&lt;p&gt;The above works perfectly in both Firefox, IE7, Opera, and Safari. But (as usual) there&#39;s one culprit: IE6. To solve this I&#39;m going to use the fact that IE allows for javascript execution inside CSS files. Have a look at the code below:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;wrapper&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;960&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;expression&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;documentElement&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;clientWidth&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;err&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;962&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;?&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;960px&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;         &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;documentElement&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;clientWidth&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;762&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;?&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;760px&amp;quot;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;            &lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;auto&amp;quot;&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;   &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;%&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;First, the element gets a width by means of a IE expression(). The expression looks at the window width and if it&#39;s too wide it sets it to 960. It also limits it downwards to 760 pixels. At last we need to set trigger hasLayout on the element, and I usually use height: 1% for that (zoom: 1 works aswell).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Martin suggests we add a default width when IE have javascript turned off. Excellent, added it to the example. The default width will be applied in IE if javascript is turned off.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Matthjis notes that there is a &lt;a href=&#34;http://www.cameronmoll.com/archives/000892.html&#34;&gt;bug in IE6&lt;/a&gt; that causes it to freeze sometimes when using the same number for the conditional as for the max or min-value. Updated the code to reflect this.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;(The expression is built up with two tertiary operators, so &lt;code&gt;(condition)? &amp;quot;true value&amp;quot;: &amp;quot;false value&amp;quot;;&lt;/code&gt;, with a couple of numbers in it. Check it, it makes sense.)&lt;/p&gt;
&lt;p&gt;The IE6-stuff above will of course not validate (and doesn&#39;t work in other browsers), so what we do is enclose it inside a conditional comment. The final &lt;a href=&#34;/files/min-max-template/&#34; data-no-instant&gt;min-/max-width example&lt;/a&gt; has all the code you need (I&#39;ve added centering too), but you should of course move the code to an external file.&lt;/p&gt;
&lt;p&gt;Happy hacking!&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Reverse text with CSS (32 very special hex digits)</title>
            <link href="http://friendlybit.com/css/reverse-text-with-css-32-very-special-hex-digits/" rel="alternate" type="text/html" title="Reverse text with CSS (32 very special hex digits)" />
            <published>2007-05-06T18:13:32+02:00</published>
            <updated>2007-05-06T18:13:32+02:00</updated>
            <id>http://friendlybit.com/css/reverse-text-with-css-32-very-special-hex-digits/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">Sometimes you wake up and feel that big things are moving around you. You follow the news and find that people are uniting over something simple as a...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/reverse-text-with-css-32-very-special-hex-digits/">
                &lt;p&gt;Sometimes you wake up and feel that &lt;a href=&#34;http://yro.slashdot.org/article.pl?sid=07/05/02/0235228&#34;&gt;big things&lt;/a&gt; are moving around you. You follow the news and find that people are uniting over something simple as a number. You read about people &lt;a href=&#34;http://technology.timesonline.co.uk/tol/news/tech_and_web/article1749672.ece&#34;&gt;calling them rebels&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I think this is a good time to show a little CSS trick.&lt;/p&gt;
&lt;p&gt;Let me present two properties that together reverse a string of text: direction and unicode-bidi:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;HTML&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;quot;direction: rtl; unicode-bidi: bidi-override;&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
0C 88 65 36 5C 65 14 8D B5 3E 47 D9 20 11 9F 90
&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The result, when this is posted on your blog (*hint*) is the following:&lt;/p&gt;
&lt;code style=&#34;direction: rtl; unicode-bidi: bidi-override;&#34;&gt;
0C 88 65 36 5C 65 14 8D B5 3E 47 D9 20 11 9F 90&lt;/code&gt;

&lt;p&gt;Am I a CSS rebel now? And are they going to sue me on the basis of my HTML or my CSS?&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Transparent PNGs and IE6 standalone</title>
            <link href="http://friendlybit.com/css/transparent-pngs-and-ie6-standalone/" rel="alternate" type="text/html" title="Transparent PNGs and IE6 standalone" />
            <published>2007-04-28T20:44:31+02:00</published>
            <updated>2007-04-28T20:44:31+02:00</updated>
            <id>http://friendlybit.com/css/transparent-pngs-and-ie6-standalone/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">I&#39;m one of many that have installed IE6 standalone and it really is a great solution to running both IE6 and IE7 on the same computer. Frequently people...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/transparent-pngs-and-ie6-standalone/">
                &lt;p&gt;I&#39;m one of many that have installed &lt;a href=&#34;http://tredosoft.com/Multiple_IE&#34;&gt;IE6 standalone&lt;/a&gt; and it really is a great solution to running both IE6 and IE7 on the same computer. Frequently people claim that IE6 standalone and the real IE6 render things differently but I&#39;ve never seen that happen. Until now.&lt;/p&gt;
&lt;h2 id=&#34;why-an-alpha-transparent-image&#34;&gt;Why an alpha transparent image?&lt;a href=&#34;#why-an-alpha-transparent-image&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I&#39;m working on a site with several alpha-transparent areas, where authors should be able to switch images and an semi-transparent box should cover half of that image. The users are not skilled enough with image programs to be able to add the transparent part to the image, and adding it to the image would prevent it from expanding when the containing text was zoomed. So I decided to use CSS together with alpha transparent PNGs to solve it. Let’s get to business.&lt;/p&gt;
&lt;h2 id=&#34;alpha-transparency-on-modern-browsers&#34;&gt;Alpha transparency on modern browsers&lt;a href=&#34;#alpha-transparency-on-modern-browsers&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Fireworks, my favourite image editor, allowed me to set the opacity to 60%. It smoothly exported my image to PNG and I positioned everything where it should be. Two background images later, one that the author could specify (added with a style tag in the head, &lt;a href=&#34;/css/inline-css-should-not-be-allowed-in-strict-doctypes/&#34;&gt;not with inline styles&lt;/a&gt;), and one with the transparency. Everything worked flawlessly in Firefox, Opera, and IE7, as expected. Easy!&lt;/p&gt;
&lt;h2 id=&#34;ie6-and-alphaimageloader&#34;&gt;IE6 and AlphaImageLoader&lt;a href=&#34;#ie6-and-alphaimageloader&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;IE6 does not support PNG images like that, so I decided to use what I always use to fix that, the &lt;a href=&#34;http://support.microsoft.com/kb/294714&#34;&gt;AlphaImageLoader Filter&lt;/a&gt;. Note that the fix doesn&#39;t make the background specified with CSS work, it &lt;em&gt;adds a new&lt;/em&gt; element to the page, on top of the element you apply it to. It&#39;s also proprietary, meaning it won&#39;t validate, so make sure add it to the page by using &lt;a href=&#34;http://www.quirksmode.org/css/condcom.html&#34;&gt;conditional comments&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One thing you need to know to use the filter is how the &lt;a href=&#34;http://msdn2.microsoft.com/en-us/library/ms532920.aspx&#34;&gt;sizingMethod property&lt;/a&gt; works:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;crop&lt;/strong&gt; - Clips the image to fit the dimensions of the object.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;image&lt;/strong&gt; - Default. Enlarges or reduces the border of the object to fit the dimensions of the image.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;scale&lt;/strong&gt; - Stretches or shrinks the image to fill the borders of the object.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So there is no way to repeat an image as we&#39;re used to from CSS. Luckily, since I wanted a solid semi-transparent background repeating and scaling is the same, so I just did:&lt;/p&gt;
&lt;div class=&#34;highlight&#34; data-language=&#34;CSS&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;breadcrumbs&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;filter&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;progid&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;DXImageTransform&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Microsoft&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;AlphaImageLoader&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;semi_transparent.png&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sizingMethod&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;quot;scale&amp;quot;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&#34;making-links-work-in-ie6&#34;&gt;Making links work in IE6&lt;a href=&#34;#making-links-work-in-ie6&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You could think that we&#39;ve hacked enough to get things up to speed with IE6, but no. Links on top of images loaded with filter does not work. The text of them are selectable, but you can&#39;t click them. Fortunately Ingo Chao fixed this in 2005 (some people are WAY ahead) by simply &lt;a href=&#34;http://www.satzansatz.de/cssd/tmp/alphatransparency.html&#34;&gt;adding an inner wrapper&lt;/a&gt; with hasLayout enabled. Thanks Ingo!&lt;/p&gt;
&lt;p&gt;Everything set, and tested in Firefox, Opera, IE7 and IE6 standalone. Phew!&lt;/p&gt;
&lt;h2 id=&#34;differences-between-ie6-standalone-and-ie6&#34;&gt;Differences between IE6 standalone and IE6&lt;a href=&#34;#differences-between-ie6-standalone-and-ie6&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;After deploying the design on the client&#39;s server I quickly got a bug report back: &amp;quot;The breadcrumbs have a grey background, not a transparent one&amp;quot;. I double checked the client&#39;s browser version to be IE6, and tested again locally on my own computer: it worked for me but not for the client. Confused I started looking for another computer with IE6 on (something that was surprisingly hard) I found one at the reception. Gotcha, the PNG was broken there too. I confirmed that IE7 was not installed and downgraded my own to IE6 again. Let&#39;s get to work!&lt;/p&gt;
&lt;p&gt;After much fiddling with CSS I moved over to Fireworks again. It has three different versions of PNGs you can export as: PNG-8, PNG-24, and PNG32. I tried &lt;strong&gt;switching from PNG-24 to PNG-8&lt;/strong&gt; and *blam* it worked!&lt;/p&gt;
&lt;p&gt;I&#39;m not sure why this works, but after reading the comments on the &lt;a href=&#34;http://tredosoft.com/Multiple_IE&#34;&gt;Multiple IE&lt;/a&gt; page, I have a guess. To get filters to work in IE6 standalone two files are added to the IE6 folder. The authors picked them from an updated version of IE6; could it be that Microsoft updated the filters somewhere between my downgraded version and the latest IE6? After Googling I found an update to IE6 called SP1 which changes the behaviour of alphaimageloader. Quite likely, and very tricky to find.&lt;/p&gt;
&lt;p&gt;Anyway, I hope this long story taught you something, I sure did it for me: Next time I&#39;ll use &lt;a href=&#34;http://www.twinhelix.com/css/iepngfix/&#34;&gt;Iepngfix.htc&lt;/a&gt; instead :)&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">IE7 Zoom Bug: Text width incorrectly calculated</title>
            <link href="http://friendlybit.com/css/ie7-zoom-bug/" rel="alternate" type="text/html" title="IE7 Zoom Bug: Text width incorrectly calculated" />
            <published>2007-04-28T17:44:03+02:00</published>
            <updated>2007-04-28T17:44:03+02:00</updated>
            <id>http://friendlybit.com/css/ie7-zoom-bug/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">IE7 shipped with a new and improved Page Zoom feature that lets you zoom more than just the text of the page. While I think I like it (there&#39;s many saying...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/ie7-zoom-bug/">
                &lt;p&gt;IE7 shipped with a new and improved Page Zoom feature that lets you zoom more than just the text of the page. While I think I like it (there&#39;s many saying it will make developers lives easier), it has its bugs.&lt;/p&gt;
&lt;p&gt;The most recent one I&#39;ve seen is its failure to &lt;a href=&#34;/files/ie7_zoom_bug/&#34; data-no-instant&gt;correctly calculate text width&lt;/a&gt;. I&#39;ve found no fix for this, except adding a right-margin, something that renders the box too wide instead of too narrow. The calculation seems to a little bit better with &lt;code&gt;font-style: italic;&lt;/code&gt;, but it&#39;s still incorrect.&lt;/p&gt;
&lt;p&gt;It you have a fix, let me know in the &lt;a href=&#34;#comments&#34;&gt;comments&lt;/a&gt; (the usual stuff does not seem to work).&lt;/p&gt;
&lt;p&gt;I guess the Page Zoom is hard to implement, since basic things like that breaks. At the other hand, Opera has had it for years, and Firefox will in version 3. I really look forward to explaining this to customers :)&lt;/p&gt;

            </content>
        </entry>
    
        <entry>
            <title type="html">Separation in the blink of an eye</title>
            <link href="http://friendlybit.com/css/separation-in-the-blink-of-an-eye/" rel="alternate" type="text/html" title="Separation in the blink of an eye" />
            <published>2007-01-23T10:10:11+01:00</published>
            <updated>2007-01-23T10:10:11+01:00</updated>
            <id>http://friendlybit.com/css/separation-in-the-blink-of-an-eye/</id>
            <author>
                <name>Emil Stenström</name>
            </author>
            <summary type="text">I&#39;ve seen them so many times: pages where the HTML is mighty fine (!) but the CSS looks like it&#39;s taken straight from Dreamweaver. While I hate having to...</summary>
            <content type="html" xml:base="http://friendlybit.com/css/separation-in-the-blink-of-an-eye/">
                &lt;p&gt;I&#39;ve seen them so many times: pages where the HTML is mighty fine (!) but the CSS looks like it&#39;s taken straight from Dreamweaver. While I hate having to deal with those kinds of designs there is something good about them. They prove the point that HTML and CSS are two separate units, and that it&#39;s possible to mess up one of them and do fine on the other. That&#39;s after all the point of CSS…&lt;/p&gt;
&lt;p&gt;Now. A much more unusual combination is good CSS together with bad HTML. So I put together a little example for you. &lt;a href=&#34;/files/separation_illustrated/&#34; data-no-instant&gt;Separation illustrated&lt;/a&gt; (only works in Firefox, I&#39;m lazy). I&#39;ve made all lines about 80 characters long and removed all other whitespace. Enjoy!&lt;/p&gt;
&lt;p&gt;How&#39;s that for a company website?&lt;/p&gt;

            </content>
        </entry>
    
</feed>