<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jonathan stegall: creative tension &#187; CSS</title>
	<atom:link href="http://jonathanstegall.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanstegall.com</link>
	<description>culture, design, spirituality</description>
	<lastBuildDate>Fri, 04 May 2012 02:34:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>★ CSS Naked Day 2010</title>
		<link>http://jonathanstegall.com/2010/04/08/css-naked-day-2010/</link>
		<comments>http://jonathanstegall.com/2010/04/08/css-naked-day-2010/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 13:48:19 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[other websites]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[css naked day]]></category>
		<category><![CDATA[css naked day 2010]]></category>

		<guid isPermaLink="false">http://jonathanstegall.com/?p=2715</guid>
		<description><![CDATA[Today marks the second time (because it took me so long to design my website after I turned it into a blog) that I've celebrated <a href="http://naked.dustindiaz.com/">CSS Naked Day</a>, which is a time for designers to remove styles from their websites, showing the underlying semantic HTML in all its glory.

The point of this has always been to show the point of and promote such semantic HTML and web standards by showing how they serve to organize a site's content before it is visually organized. This is an important reminder to those of us concerned with accessibility, search engine optimization, and the standards we're promoting.]]></description>
			<content:encoded><![CDATA[<p>Today marks the second time (because it took me so long to design my website after I turned it into a blog) that I&#8217;ve celebrated <a href="http://naked.dustindiaz.com/">CSS Naked Day</a>, which is a time for designers to remove styles from their websites, showing the underlying semantic HTML in all its glory.</p>
<p>The point of this has always been to show the point of and promote such semantic HTML and web standards by showing how they serve to organize a site&#8217;s content before it is visually organized. This is an important reminder to those of us concerned with accessibility, search engine optimization, and the standards we&#8217;re promoting.</p>
<p>Obviously, this isn&#8217;t happening on any client sites, but it&#8217;s appropriate to put on one&#8217;s blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonathanstegall.com/2010/04/08/css-naked-day-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>★ CSS Naked Day 2009</title>
		<link>http://jonathanstegall.com/2009/04/04/css-naked-day-2009/</link>
		<comments>http://jonathanstegall.com/2009/04/04/css-naked-day-2009/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 04:40:55 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[other websites]]></category>
		<category><![CDATA[css naked day]]></category>
		<category><![CDATA[css naked day 2009]]></category>

		<guid isPermaLink="false">http://jonathanstegall.com/?p=1374</guid>
		<description><![CDATA[Each year, there is an event participated in by many standards-aware web designers and developers, called <a href="http://naked.dustindiaz.com/">CSS Naked Day</a>. Essentially, it involves a single international day (48 hours, following all the time zones) in which participating sites deactivate their <abbr title="Cascading Style Sheets">CSS</abbr>, which removes all styling and leaves only the underlying markup.]]></description>
			<content:encoded><![CDATA[<p>Each year, there is an event participated in by many standards-aware web designers and developers, called <a href="http://naked.dustindiaz.com/">CSS Naked Day</a>. Essentially, it involves a single international day (48 hours, following all the time zones) in which participating sites deactivate their <abbr title="Cascading Style Sheets">CSS</abbr>, which removes all styling and leaves only the underlying markup.</p>
<p>It is described in this way:</p>
<blockquote><p>The idea behind this event is to promote Web Standards. Plain and simple. This includes proper use of (x)html, semantic markup, a good hierarchy structure, and of course, a good &#8216;ol play on words. It&#8217;s time to show off your <code>&lt;body&gt;</code>.</p>
</blockquote>
<p>Enough said. I wanted to let you know that I&#8217;ll be participating this year. I care deeply about beautiful, semantic code on the sites, and portions of sites, that I influence. I think this is a vital part of high quality, modern web design.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonathanstegall.com/2009/04/04/css-naked-day-2009/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>★ IE z-index bug with CSS dropdown menu</title>
		<link>http://jonathanstegall.com/2009/01/15/ie-z-index-bug-with-css-dropdown-menu/</link>
		<comments>http://jonathanstegall.com/2009/01/15/ie-z-index-bug-with-css-dropdown-menu/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 00:12:35 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[ie z-index bug]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[internet explorer z-index bug]]></category>

		<guid isPermaLink="false">http://jonathanstegall.com/?p=663</guid>
		<description><![CDATA[In the W3C's specs, z-index is designed to affect the stacking order of positioned elements on a web page. So, an element with a z-index of 2 should always appear above an element with a z-index of 1.

In Internet Explorer, this doesn't work like it should. Internet Explorer resets the stack when the positioned elements are separated from each other.]]></description>
			<content:encoded><![CDATA[<p>Standards-aware web designers generally know of the <a href="http://verens.com/archives/2005/07/15/ie-z-index-bug/">z-index bug</a> in all versions of Internet Explorer (though, version 8 is rumored to fix it).</p>
<p>In the W3C&#8217;s specs, z-index is designed to affect the stacking order of positioned elements on a web page. So, an element with a z-index of 2 should always appear above an element with a z-index of 1.</p>
<p>In Internet Explorer, this doesn&#8217;t work like it should. Internet Explorer resets the stack when the positioned elements are separated from each other.</p>
<h2>Example</h2>
<p>So let&#8217;s say we have the following HTML. Fairly standard header, navigation, etc.</p>
<ol class="code xhtml">
<li><code>&lt;div id="wrapper"&gt;</code></li>
<li class="tab1"><code>&lt;div id="header"&gt;</code></li>
<li class="tab2"><code>&lt;ul id="nav"&gt;</code></li>
<li class="tab3"><code>&lt;li&gt;&lt;a href="#"&gt;home&lt;/a&gt;&lt;/li&gt;</code></li>
<li class="tab3"><code>&lt;li&gt;&lt;a href="#"&gt;item one&lt;/a&gt;</code></li>
<li class="tab4"><code>&lt;ul&gt;</code></li>
<li class="tab5"><code>&lt;li&gt;&lt;a href="#"&gt;sub item one&lt;/a&gt;&lt;/li&gt;</code></li>
<li class="tab5"><code>&lt;li&gt;&lt;a href="#"&gt;sub item two&lt;/a&gt;&lt;/li&gt;</code></li>
<li class="tab4"><code>&lt;/ul&gt;</code></li>
<li class="tab3"><code>&lt;/li&gt;</code></li>
<li class="tab3"><code>&lt;li&gt;&lt;a href="#"&gt;item two&lt;/a&gt;</code></li>
<li class="tab4"><code>&lt;ul&gt;</code></li>
<li class="tab5"><code>&lt;li&gt;&lt;a href="#"&gt;sub item one&lt;/a&gt;&lt;/li&gt;</code></li>
<li class="tab5"><code>&lt;li&gt;&lt;a href="#"&gt;sub item two&lt;/a&gt;&lt;/li&gt;</code></li>
<li class="tab4"><code>&lt;/ul&gt;</code></li>
<li class="tab3"><code>&lt;/li&gt;</code></li>
<li class="tab2"><code>&lt;/ul&gt;</code></li>
<li class="tab1"><code>&lt;/div&gt;</code></li>
<li class="tab1"><code>&lt;div id="container"&gt;</code></li>
<li class="tab2"><code>&lt;h1&gt;Hi. This is a positioned H1&lt;/h1&gt;</code></li>
<li class="tab2"><code>&lt;p&gt;This page is just some friendly content to show you just how
bad IE really is.&lt;/p&gt;</code></li>
<li class="tab1"><code>&lt;/div&gt;</code></li>
<li><code>&lt;/div&gt;</code></li>
</ol>
<p>Then, we have the following CSS.</p>
<ol class="code css">
<li><code>#wrapper #header {</code></li>
<li class="tab1"><code>position: relative;</code></li>
<li><code>}</code></li>
<li><code>#wrapper #nav {</code></li>
<li class="tab1"><code>clear: both;</code></li>
<li class="tab1"><code>margin: 0 5px;</code></li>
<li class="tab1"><code>padding: 0 5px;</code></li>
<li class="tab1"><code>width: 750px;</code></li>
<li class="tab1"><code>height: 30px;</code></li>
<li class="tab1"><code>list-style: none;</code></li>
<li class="tab1"><code>border-top: 1px solid #335a86;</code></li>
<li class="tab1"><code>border-bottom: 1px solid #335a86;</code></li>
<li class="tab1"><code>text-align: center;</code></li>
<li class="tab1"><code>position: relative;</code></li>
<li class="tab1"><code>z-index: 2;</code></li>
<li><code>}</code></li>
<li><code>#wrapper #nav li {</code></li>
<li class="tab1"><code>float: left;</code></li>
<li class="tab1"><code>margin: 0;</code></li>
<li class="tab1"><code>padding: 0 0 5px 0;</code></li>
<li class="tab1"><code>border: 0;</code></li>
<li class="tab1"><code>position: relative;</code></li>
<li><code>}</code></li>
<li><code>#wrapper #nav li a {</code></li>
<li class="tab1"><code>margin: 0;</code></li>
<li class="tab1"><code>padding: 7px 15px;</code></li>
<li class="tab1"><code>display: block;</code></li>
<li class="tab1"><code>text-decoration: none;</code></li>
<li class="tab1"><code>font-size: 1.2em;</code></li>
<li><code>}</code></li>
<li><code>#wrapper #nav a:link, #wrapper #nav a:visited {</code></li>
<li class="tab1"><code>color: #888;</code></li>
<li><code>}</code></li>
<li><code>#wrapper #nav a:hover, #wrapper #nav a:focus {</code></li>
<li class="tab1"><code>color: #335a86;</code></li>
<li><code>}</code></li>
<li><code>#wrapper #nav li ul {</code></li>
<li class="tab1"><code>background-color: #ccc;</code></li>
<li class="tab1"><code>width: 150px;</code></li>
<li class="tab1"><code>height: auto;</code></li>
<li class="tab1"><code>list-style: none;</code></li>
<li class="tab1"><code>margin: 0;</code></li>
<li class="tab1"><code>padding: 5px 0 10px 0;</code></li>
<li class="tab1"><code>border: 0;</code></li>
<li class="tab1"><code>text-align: left;</code></li>
<li class="tab1"><code>position: absolute;</code></li>
<li class="tab1"><code>display: none;</code></li>
<li><code>}</code></li>
<li><code>#wrapper #nav li ul li {</code></li>
<li class="tab1"><code>float: none;</code></li>
<li class="tab1"><code>margin: 0;</code></li>
<li class="tab1"><code>line-height: 30px;</code></li>
<li class="tab1"><code>height: 30px;</code></li>
<li><code>}</code></li>
<li><code>#wrapper #nav li ul a {</code></li>
<li class="tab1"><code>padding: 7px 10px;</code></li>
<li class="tab1"><code>white-space: nowrap;</code></li>
<li class="tab1"><code>display: block;</code></li>
<li><code>}</code></li>
<li><code>#wrapper #nav li:hover ul {</code></li>
<li class="tab1"><code>display: block;</code></li>
<li><code>}</code></li>
<li><code>#wrapper #container {</code></li>
<li class="tab1"><code>padding: 10px;</code></li>
<li class="tab1"><code>position: relative;</code></li>
<li><code>}</code></li>
<li><code>#wrapper h1 {</code></li>
<li class="tab1"><code>position: absolute;</code></li>
<li class="tab1"><code>left: 10px;</code></li>
<li class="tab1"><code>top: 10px;</code></li>
<li class="tab1"><code>height: 60px;</code></li>
<li class="tab1"><code>line-height: 60px;</code></li>
<li class="tab1"><code>vertical-align: middle;</code></li>
<li class="tab1"><code>font-size: 2em;</code></li>
<li class="tab1"><code>background: #335a86;</code></li>
<li class="tab1"><code>color: #fff;</code></li>
<li><code>}</code></li>
<li><code>#wrapper #container p {</code></li>
<li class="tab1"><code>margin-top: 60px;</code></li>
<li><code>}</code></li>
</ol>
<p>This is very common code used to trigger a CSS dropdown menu in all modern browsers. Remember that IE6, of course, requires a small JavaScript. A good example is the <a href="http://www.alistapart.com/articles/dropdowns">Sons of Suckerfish</a>. I do not have this JavaScript on my current example, since there are plenty of other great articles about that.</p>
<div class="image-main"><a href="http://design.jonathanstegall.com/css/iedropdownbug.html"><img src="/wp-content/uploads/2009/01/iedropdownbug-218x140.jpg" alt="IE Dropdown Bug Example" class="two-eighteen" /></a>
<p class="caption"><a href="http://design.jonathanstegall.com/css/iedropdownbug.html">IE7 Example &#8211; click to enlarge</a></p>
</div>
<p>When the code below the navigation, in this case the absolutely positioned h1, is any positioned element (or a select element, Flash movie, etc.), all versions of Internet Explorer prior to version 8 will cause the dropdown menus to fall behind the content.</p>
<h2>The Fix</h2>
<p>The fix for this is very simple, but there are incredibly large websites that use jumbled masses of iframes, extra divs, and other horrors to get Internet Explorer to display the dropdowns above the offending elements.</p>
<p>For a fix, we use the following CSS for the header div. See the screenshot for an example of this (again, in IE7). Click it to see a larger version.</p>
<ol class="code css">
<li><code>#wrapper #header {</code></li>
<li class="tab1"><code>position: relative;</code></li>
<li class="tab1"><code>z-index: 2;</code></li>
<li><code>}</code></li>
</ol>
<p>Now, you will also need to make sure that your container div, whatever it is called, is styled correctly. In my example:</p>
<ol class="code css">
<li><code>#wrapper #container {</code></li>
<li class="tab1"><code>position: relative;</code></li>
<li><code>}</code></li>
</ol>
<p>This ensures that the <code>header</code> and the <code>container</code>, whatever you call them, understand their relationship to each other for the z-index fix to work.</p>
<div class="image-main"><a href="http://design.jonathanstegall.com/css/iedropdownfix.html"><img src="/wp-content/uploads/2009/01/iedropdownfix-218x140.jpg" alt="IE Dropdown Bug Fix Example" class="two-eighteen" /></a>
<p class="caption"><a href="http://design.jonathanstegall.com/css/iedropdownfix.html">IE7 Example &#8211; click to enlarge</a></p>
</div>
<p>This fix causes the dropdowns to appear above everything that is inside the content areas of the page. It works in IE7 and IE6. My example adds some code to show the <code>&lt;select&gt;</code> statement, which is another common offender.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonathanstegall.com/2009/01/15/ie-z-index-bug-with-css-dropdown-menu/feed/</wfw:commentRss>
		<slash:comments>131</slash:comments>
		</item>
		<item>
		<title>★ More CSS for large websites</title>
		<link>http://jonathanstegall.com/2008/03/29/more-css-for-large-websites/</link>
		<comments>http://jonathanstegall.com/2008/03/29/more-css-for-large-websites/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 23:37:53 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[css efficiency]]></category>
		<category><![CDATA[large website css]]></category>

		<guid isPermaLink="false">http://jonathanstegall.com/?p=166</guid>
		<description><![CDATA[I want to continue with my thoughts on creating and maintaining CSS on very large websites. In my last post on the subject, I mentioned that there are at least ten different layout conventions that I deal with on a regular basis. For what it&#8217;s worth, I want to add a little context and say [...]]]></description>
			<content:encoded><![CDATA[<p>I want to continue with my thoughts on creating and maintaining CSS on very large websites. In <a href="http://jonathanstegall.com/2008/03/28/efficient-css-for-large-websites/">my last post</a> on the subject, I mentioned that there are at least ten different layout conventions that I deal with on a regular basis.</p>
<p>For what it&#8217;s worth, I want to add a little context and say that those layout conventions (and ten is a rough estimate) power somewhere around four hundred pages, give or take a few. Certainly, the website is much larger than that number, but again those are the ones with which I have significant interaction.</p>
<p>Again, none of this is new to someone who works on a very large website, but all of it was new to me. In light of this, I want to shed a little more light on some of the techniques I use or have used.</p>
<h2>Structured Sections of Styles</h2>
<p>I began to practice this technique when most of my days were spent working with relatively small sites, that typically had a total page number of less than fifty. However, many stylesheets don&#8217;t do this, so I think it&#8217;s worth mentioning.</p>
<p>Structuring sections of styles allows the designer to keep things in logical places within the stylesheet: such as layout styles, link styles, typography, browser fixes, and so on. An example goes like this:</p>
<h3>HTML:</h3>
<ol class="code xhtml">
<li><code>&lt;div id="wrapper" class="layout-a"&gt;</code></li>
<li class="tab1"><code>&lt;div id="subContent"&gt;</code></li>
<li class="tab2"><code>&lt;p&gt;content&lt;/p&gt;</code></li>
<li class="tab1"><code>&lt;/div&gt;</code></li>
<li class="tab1"><code>&lt;div id="mainContent"&gt;</code></li>
<li class="tab2"><code>&lt;p&gt;content&lt;/p&gt;</code></li>
<li class="tab1"><code>&lt;/div&gt;</code></li>
<li><code>&lt;/div&gt;</code></li>
</ol>
<ol class="code xhtml">
<li><code>&lt;div id="wrapper" class="layout-b"&gt;</code></li>
<li class="tab1"><code>&lt;div id="subContent"&gt;</code></li>
<li class="tab2"><code>&lt;p&gt;content&lt;/p&gt;</code></li>
<li class="tab1"><code>&lt;/div&gt;</code></li>
<li class="tab1"><code>&lt;div id="mainContent"&gt;</code></li>
<li class="tab2"><code>&lt;p&gt;content&lt;/p&gt;</code></li>
<li class="tab1"><code>&lt;/div&gt;</code></li>
<li><code>&lt;/div&gt;</code></li>
</ol>
<h3>CSS:</h3>
<ol class="code css">
<li><code>body {</code></li>
<li class="tab1"><code>background: #fff;</code></li>
<li class="tab1"><code>font-size: 76%;</code></li>
<li class="tab1"><code>text-align: center;</code></li>
<li><code>}</code></li>
<li class="comment"><code>/* Layout Styles */</code></li>
<li class="comment"><code>/* constants */</code></li>
<li><code>#wrapper {</code></li>
<li class="tab1"><code>width: 760px;</code></li>
<li class="tab1"><code>margin: 0 auto;</code></li>
<li class="tab1"><code>text-align: left;</code></li>
<li class="tab1"><code>font: 1em normal Verdana, Arial, Helvetica, sans-serif;</code></li>
<li><code>}</code></li>
<li class="comment"><code>/* end constants */</code></li>
<li class="comment"><code>/* layout-a */</code></li>
<li><code>.layout-a #subContent {</code></li>
<li class="tab1"><code>width: 260px;</code></li>
<li class="tab1"><code>float: left;</code></li>
<li><code>}</code></li>
<li><code>.layout-a #mainContent {</code></li>
<li class="tab1"><code>width: 400px;</code></li>
<li class="tab1"><code>float: right;</code></li>
<li><code>}</code></li>
<li class="comment"><code>/* end layout-a */</code></li>
<li class="comment"><code>/* layout-b */</code></li>
<li><code>.layout-b #mainContent {</code></li>
<li class="tab1"><code>width: 400px;</code></li>
<li class="tab1"><code>float: left;</code></li>
<li><code>}</code></li>
<li><code>.layout-b #subContent {</code></li>
<li class="tab1"><code>width: 260px;</code></li>
<li class="tab1"><code>float: right;</code></li>
<li><code>}</code></li>
<li class="comment"><code>/* end layout-b */</code></li>
<li class="comment"><code>/* Link Styles */</code></li>
<li class="comment"><code>/* constants */</code></li>
<li><code>a:link, a:visited {</code></li>
<li class="tab1"><code>color: #f00;</code></li>
<li class="tab1"><code>text-decoration: underline;</code></li>
<li><code>}</code></li>
<li><code>a:hover, a:focus, a:active {</code></li>
<li class="tab1"><code>color: f00;</code></li>
<li class="tab1"><code>text-decoration: none;</code></li>
<li><code>}</code></li>
</ol>
<p>Thus, styles become very nicely organized and can easily be found by another designer, or a developer, or someone learning from your source code.</p>
<h2>Multiple stylesheets</h2>
<p>Most large websites already do this, but it is important to mention that multiple stylesheets are an amazing organizational tool, beyond (but not replacing) the need to structure the stylesheets themselves.</p>
<p>Example:</p>
<ol class="code xhtml">
<li><code>&lt;link rel="stylesheet" href="reset.css" type="text/css"
media="screen, projection" /&gt;</code></li>
<li><code>&lt;link rel="stylesheet" href="site.css"&gt; type="text/css"
media="screen, projection" /&gt;</code></li>
<li><code>&lt;link rel="stylesheet" href="businessUnit.css"
type="text/css" media="screen, projection" /&gt;</code></li>
</ol>
<p>For myself, I use <a href="http://meyerweb.com/">Eric Meyer</a>&#8216;s great <a href="http://meyerweb.com/eric/tools/css/reset/index.html">reset stylesheet</a> to remove default browser styles (as well as, in my case, default styles from the <acronym title="Content Management System">CMS</acronym> that conflict with my needs). There are several others around the internet. Use whatever fits.</p>
<p>In my situation, several different business units have very different styles for their respective sections of the website. So, its beneficial to add these in separately when they do not overlap. Often, each business unit has several different layout conventions, hence the use of layout-a and layout-b, and so on.</p>
<h2>Calm down</h2>
<p>Unfortunately, most large websites do not validate, neither in their <a href="http://validator.w3.org/">HTML</a> or their <a href="http://jigsaw.w3.org/css-validator/">CSS</a>. This can be a constant source of frustration for standards-aware designers and developers. Multiple people may maintain the code. Some of them may be serious back-end programmers who don&#8217;t care about what the browser actually receives at all. Others may be non-technology people who barely know what a browser is, but have the responsibility of maintaining code for one reason or another.</p>
<p>And that has to become okay, at least to an extent. Otherwise, jobs become depressing. Certainly, work for better support of web standards. Push the fact that even the IE team wants to support standards. Push for accessibility, and the fact that <a href="http://www.webstandards.org/2007/10/05/will-target-get-schooled/">major websites are being sued</a> for accessibility violations. These things are important.</p>
<p>But every once in a while, take a flight for a few hours. Rejoice in the fact that, at least for now, people can&#8217;t call your cell phone and tell you that the world is ending, and expect you to do something about it. They&#8217;ll have to wait till you land.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonathanstegall.com/2008/03/29/more-css-for-large-websites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>★ Efficient CSS for large websites</title>
		<link>http://jonathanstegall.com/2008/03/28/efficient-css-for-large-websites/</link>
		<comments>http://jonathanstegall.com/2008/03/28/efficient-css-for-large-websites/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 14:00:19 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[css efficiency]]></category>
		<category><![CDATA[large website css]]></category>

		<guid isPermaLink="false">http://jonathanstegall.com/2008/03/28/efficient-css-for-large-websites/</guid>
		<description><![CDATA[I could see this becoming a series of posts, but for now I&#8217;ll start with one. I spend my days, to a large extent, dealing with HTML and CSS on a very large website. I used to spend the majority of my days dealing with XHTML and CSS in relatively small websites. Rather than having, [...]]]></description>
			<content:encoded><![CDATA[<p>I could see this becoming a series of posts, but for now I&#8217;ll start with one. I spend my days, to a large extent, dealing with <acronym title="HyperText Markup Language">HTML</acronym> and <acronym title="Cascading Style Sheets">CSS</acronym> on a very large website.</p>
<p>I used to spend the majority of my days dealing with <acronym title="eXtensible HyperText Markup Language">XHTML</acronym> and <acronym title="Cascading Style Sheets">CSS</acronym> in relatively small websites. Rather than having, say, four or five different layout conventions, I now deal with at least ten different layout conventions. There are sections of the site that are of varying ages, and sections that were designed at different times and by different people in the company&#8217;s history. Any very large website is likely to have these kind of issues.</p>
<p>One of the results of this shift in my work situation is that I now have very large stylesheets. While there is a large amount of re-used code, re-used styles, and so on, there is so much going on that it is difficult to have efficiency.</p>
<p>There are a number of <acronym title="Cascading Style Sheets">CSS</acronym> frameworks that have come out in recent years, from <a href="http://www.google.com/url?sa=t&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fdeveloper.yahoo.com%2Fyui%2Fgrids%2F&amp;ei=avfsR-f6LIT8hASZla0N&amp;usg=AFQjCNGeq3Wxmzp_kfW9PfFolWQKK-zccQ&amp;sig2=c4rg0Vh6ib8oZYCT2uRNKw">YUI</a> to <a href="http://www.google.com/url?sa=t&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fcode.google.com%2Fp%2Fblueprintcss%2F&amp;ei=u_fsR92YM5iWggTzubkV&amp;usg=AFQjCNH665KFPzNHIXDu-_FlcgIxsh5-dA&amp;sig2=6Nhm553b3e4uiPr4QdfRtA">Blueprint</a> to others. This trend is similar to the trend of JavaScript libraries, of course, and it is seen as both a good thing and a bad thing, depending on how it is used.</p>
<p>One of the things that I have lately begun to make use of, though, is the YUI convention of creating several different layouts based on one selector. Thus, we might have the following:</p>
<ol class="code xhtml">
<li><code>&lt;div id="wrapper" class="layout-a"&gt;</code></li>
<li class="tab1"><code>&lt;div id="subContent"&gt;</code></li>
<li class="tab2"><code>&lt;p&gt;content&lt;/p&gt;</code></li>
<li class="tab1"><code>&lt;/div&gt;</code></li>
<li class="tab1"><code>&lt;div id="mainContent"&gt;</code></li>
<li class="tab2"><code>&lt;p&gt;content&lt;/p&gt;</code></li>
<li class="tab1"><code>&lt;/div&gt;</code></li>
<li><code>&lt;/div&gt;</code></li>
</ol>
<ol class="code xhtml">
<li><code>&lt;div id="wrapper" class="layout-b"&gt;</code></li>
<li class="tab1"><code>&lt;div id="subContent"&gt;</code></li>
<li class="tab2"><code>&lt;p&gt;content&lt;/p&gt;</code></li>
<li class="tab1"><code>&lt;/div&gt;</code></li>
<li class="tab1"><code>&lt;div id="mainContent"&gt;</code></li>
<li class="tab2"><code>&lt;p&gt;content&lt;/p&gt;</code></li>
<li class="tab1"><code>&lt;/div&gt;</code></li>
<li><code>&lt;/div&gt;</code></li>
</ol>
<p>The benefit of this is that layout-a and layout-b can share an identical structure in their <acronym title="HyperText Markup Language">HTML</acronym>, and be styled to match almost any layout convention with less code and more efficiency than, for example, creating different divs for all of the sections.</p>
<p>Any styles that are shared between the layouts are, of course, shared. They don&#8217;t have to target layout-a or layout-b. As I begin to implement this, I find code becoming more efficient and I feel that it would be much easier for someone else to come along and have to deal with it.</p>
<p>When I first began working on this type of site, I was very good at <acronym title="HyperText Markup Language">HTML</acronym> and <acronym title="Cascading Style Sheets">CSS</acronym>, but apparently I was not very efficient. This degree of efficiency simply wasn&#8217;t necessary, although it certainly could have been beneficial. I post all this because I have a feeling that I&#8217;m not the only one who could benefit from this kind of thought shift.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonathanstegall.com/2008/03/28/efficient-css-for-large-websites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>★ Reasons for IE8&#8242;s Default Behavior</title>
		<link>http://jonathanstegall.com/2008/03/04/reasons-for-ie8s-default-behavior/</link>
		<comments>http://jonathanstegall.com/2008/03/04/reasons-for-ie8s-default-behavior/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 00:57:50 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[ie8]]></category>
		<category><![CDATA[internet explorer]]></category>

		<guid isPermaLink="false">http://jonathanstegall.com/2008/03/04/reasons-for-ie8s-default-behavior/</guid>
		<description><![CDATA[As I&#8217;ve been thinking about the new default behavior that Microsoft announced for IE8, it occurs to me that there are a lot of reasons for Microsoft&#8217;s decision. In light of these thoughts, I want to look at the reasons that I think are likely possibilities. Standards as a whole Microsoft, especially in the last [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve been thinking about the new default behavior that <a href="http://www.microsoft.com/presspass/press/2008/mar08/03-03WebStandards.mspx">Microsoft announced for IE8</a>, it occurs to me that there are a lot of reasons for Microsoft&#8217;s decision. In light of these thoughts, I want to look at the reasons that I think are likely possibilities.</p>
<h2>Standards as a whole</h2>
<p>Microsoft, especially in the last year or two, has made a lot of moves toward standards, web and otherwise. They announced the <a href="http://www.microsoft.com/presspass/presskits/interoperability/default.mspx">Interoperability Principles</a>. They announced the ASP.NET MVC Framework, which finally allows programmers to control the HTML generated by ASP.NET. IE8 <a href="http://blogs.msdn.com/ie/archive/2007/12/19/internet-explorer-8-and-acid2-a-milestone.aspx">will pass Acid2</a>, and any number of other things.</p>
<p>While I&#8217;m not optimistic that any of this will cause Microsoft to act in any unexpected ways with respect to its attempts to acquire Yahoo, it is clear that a shift is occurring, to whatever extent.</p>
<h2>Noise from the web standards community</h2>
<p>Advocates of web standards have made a lot of noise about the original decision, and it is clear that Microsoft listened. Many people made logical arguments for why IE8, especially from a long-term perspective, should not default to IE7 behavior, while understanding that the option for IE7 behavior was a good thing.</p>
<h2>Legal issues</h2>
<p>It&#8217;s entirely possible that this is partly related to Microsoft&#8217;s various legal troubles, and that they are trying to appear as a better business citizen to help their case.</p>
<h2>Future versions of IE</h2>
<p>I think one of the most significant benefits, both from the perspective of future versions of IE, as well as future versions of Firefox, Opera, Safari, etc., is that the need for version targeting will probably become much less because IE8 is the default behavior. People who create sites that break in IE8 will, certainly, have the option of targeting IE7, but in order to do that they&#8217;ll have to learn that they can.</p>
<p>Most people who will run into the issue will probably not have the interest (or the time, possibly) to find out this kind of solution. The ones who do find out about the solution will find out that Microsoft doesn&#8217;t see it as the ideal solution, and will probably feel at least some pressure to learn proper ways of doing things. Thus, in a few years, it is entirely possible that versions of Internet Explorer that follow version 8 will be met with a majority of sites that do not break.</p>
<p>That&#8217;s not to say that the majority of sites will follow web standards. I&#8217;ve seen innumerable websites that didn&#8217;t break when IE7 came out, because they had such disregard for web standards that none of the changes affected them. I suspect we&#8217;ll have to deal with this for a long time. But that&#8217;s fine with me, as the future of web browsers can continue to look forward.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonathanstegall.com/2008/03/04/reasons-for-ie8s-default-behavior/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>★ Microsoft Expands Support for Web Standards</title>
		<link>http://jonathanstegall.com/2008/03/03/microsoft-expands-support-for-web-standards/</link>
		<comments>http://jonathanstegall.com/2008/03/03/microsoft-expands-support-for-web-standards/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 00:16:48 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[ie8]]></category>

		<guid isPermaLink="false">http://jonathanstegall.com/2008/03/03/microsoft-expands-support-for-web-standards/</guid>
		<description><![CDATA[See <a href="http://www.microsoft.com/presspass/press/2008/mar08/03-03WebStandards.mspx">this press release</a>:]]></description>
			<content:encoded><![CDATA[<p>See <a href="http://www.microsoft.com/presspass/press/2008/mar08/03-03WebStandards.mspx">this press release</a>:</p>
<blockquote><p>IE8 has been significantly enhanced, and was designed with great support for current Internet standards. This is evidenced by the fact that even in its first beta, IE8 correctly renders the popular test known as &#39;Acid2,&#39; which was created by the Web community to promote real-world interoperability,&#8221; said Ray Ozzie, Microsoft chief software architect. &#8220;Our initial plan had been to use IE7-compatible behavior as the default setting for IE8, to minimize potential impact on the world&#39;s existing Web sites. We have now decided to make our most current standards-based mode the default in IE8.</p>
</blockquote>
<p>The web standards world has been abuzz for the last few weeks, following the announcement that Internet Explorer 8 (and, presumably, any number of future releases) would have the default behavior of rendering websites in the same way that Internet Explorer 7 does. Causing the browser&#8217;s behavior to advance would have required that designers and developers direct it to do so with a meta tag.</p>
<p>Many standards-aware designers and developers were very understanding of the decision to allow websites to target IE7, avoiding issues with badly-programmed websites that break when browsers move forward. However, many of these designers and developers made a lot of noise wishing that Microsoft would allow the default behavior of websites to advance as the browser does, and require those who want to target IE7 to read a little bit and find out about the meta tag.</p>
<p>Apparently, Microsoft listened to the noise. I&#8217;m amazed and pleased by this change in strategy. I hope they will be able to spread the word enough, so that websites that will break with IE8&#8242;s improved standards support will learn about their options (1. learn how to write standards-compliant code, 2. include a one-line meta tag). I feel pretty confident that this is unrealistic, but I hope that it will happen to the extent that Microsoft doesn&#8217;t have to go back on this decision.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonathanstegall.com/2008/03/03/microsoft-expands-support-for-web-standards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>★ CSS and inflexible CMS&#8217;s</title>
		<link>http://jonathanstegall.com/2008/01/21/css-and-inflexible-cmss/</link>
		<comments>http://jonathanstegall.com/2008/01/21/css-and-inflexible-cmss/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 15:39:17 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[css difficulties]]></category>
		<category><![CDATA[working with content management systems]]></category>

		<guid isPermaLink="false">http://jonathanstegall.com/2008/01/21/css-and-inflexible-cmss/</guid>
		<description><![CDATA[I don&#8217;t write about CSS as much as I&#8217;d like to. I spend a lot of time working with them on an advanced level, however, both in my day job and in any side projects. I spent a few minutes looking around on Google for issues that arise when designers need to work with and [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t write about <abbr title="Cascading Style Sheets">CSS</abbr> as much as I&#8217;d like to. I spend a lot of time working with them on an advanced level, however, both in my day job and in any side projects.</p>
<p>I spent a few minutes looking around on Google for issues that arise when designers need to work with and use <abbr title="Cascading Style Sheets">CSS</abbr> within the confines of a <abbr title="Content Management System">CMS</abbr> that does not allow access to things inside the <code>head</code> of the document. Apparently, this is not a rare issue, so I&#8217;d like to post a few solutions that, while they are not ideal, do work.</p>
<p>Disclaimer: these options do not <a href="http://validator.w3.org/">validate</a>. The only valid way to include a <abbr title="Cascading Style Sheet">CSS</abbr> is inside the <code>head</code> of the document</p>
<dl>
<dt>Option One</dt>
<dd>Use inline styles. This method is, unfortunately, still the most common way of doing this. A designer might have the following code in place:
<pre>
<code>
&lt;div id="myDiv" class="myClass"&gt;
&lt;p&gt;foo. I'm a div with an ID and a class, but my ID
and class don't do what I want them to do.
Bah.&lt;/p&gt;
&lt;/div&gt;
</code>
</pre>
<p>If the div is, for example, defined with its ID or class as a very small div floated to the right, but it needs to be a very large div floated to the left, a designer might do this:</p>
<pre>
<code>
&lt;div style="float: left; width: 500px; margin: 5px;"&gt;
&lt;p&gt;foo. I'm a div without an ID and class, and I have
ugly inline styles.&lt;/p&gt;
&lt;/div&gt;
</code>
</pre>
</dd>
<dt>Option 2</dt>
<dd>Option 2 allows the designer to access the <code>head</code> of the document through JavaScript. There are a number of techniques for doing this, but they have significant issues.</dd>
<dd>Mainly, this breaks the separation between content, style, and behavior that provides much of the underlying theory of why a designer would want to use <abbr title="Cascading Style Sheets">CSS</abbr> in the first place. In addition to this, it breaks the accessibility of the page. Anything that doesn&#8217;t have to be done with JavaScript, shouldn&#8217;t be done with JavaScript.</dd>
<dt>Option 3</dt>
<dd>This is the option I spend a lot of time using when working in this situation. A designer might have the following scenario:
<pre>
<code>
&lt;head&gt;
&lt;link href="a stylesheet I cannot access"
rel="stylesheet" type="text/css"
media="screen" /&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id="myDiv"&gt;
&lt;p&gt;foo. I'm a div that needs some styles. I might be on
thousands of pages across this site.&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;
</code>
</pre>
<pre>
<code>
&lt;head&gt;
&lt;link href="a stylesheet I cannot access"
rel="stylesheet" type="text/css"
media="screen" /&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;link href="mycss.css" rel="stylesheet"
type="text/css" media="screen" /&gt;
&lt;div id="myDiv"&gt;
&lt;p&gt;foo. I'm a div that has styles, even though
they're not where they should be. I might be on
thousands of pages across this site.&lt;/p&gt;
&lt;/div&gt;
&lt;/body&gt;
</code>
</pre>
<p>The benefit of this is that it works in all major browsers and on all major platforms and, at least, mobile devices (this statement counts Linux and the iPhone as major platforms, for what it&#8217;s worth). Also, of course, there is the benefit that the given stylesheet can be called throughout the site, which inline styles do not allow.</p>
<p>There are a few downsides to this technique. Browsers, for one, have to work a bit harder to do this kind of thing. When they encounter style information outside the <code>head</code>, whether it&#8217;s in an external file or in the page, they have to break their normal flow of rendering content, and thus this causes pages to be slower. This slowdown, however, is not usually noticeable.</p>
<p>Of course, because browsers have to work harder to do this, and because it does not validate, it is possible (though it is highly unlikely) that future versions may not support this kind of functionality.</p>
</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://jonathanstegall.com/2008/01/21/css-and-inflexible-cmss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>★ Internet Explorer 8 is Acid2 Compliant</title>
		<link>http://jonathanstegall.com/2007/12/20/internet-explorer-8-is-acid2-compliant/</link>
		<comments>http://jonathanstegall.com/2007/12/20/internet-explorer-8-is-acid2-compliant/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 18:18:08 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[acid2 compliance]]></category>
		<category><![CDATA[microsoft internet explorer 8]]></category>

		<guid isPermaLink="false">http://jonathanstegall.com/2007/12/20/internet-explorer-8-is-acid2-compliant/</guid>
		<description><![CDATA[From the <a href="http://blogs.msdn.com/ie/archive/2007/12/19/internet-explorer-8-and-acid2-a-milestone.aspx">Internet Explorer team blog</a>:]]></description>
			<content:encoded><![CDATA[<p>From the <a href="http://blogs.msdn.com/ie/archive/2007/12/19/internet-explorer-8-and-acid2-a-milestone.aspx">Internet Explorer team blog</a>:</p>
<blockquote><p>&#8230;I&#39;m delighted to tell you that on Wednesday, December 12, Internet Explorer correctly rendered the Acid2 page in IE8 standards mode. While supporting the features tested in Acid2 is important for many reasons, it is just one of several milestones for the interoperability, standards compliance, and backwards compatibility that we&#39;re committed to for this release. We will blog more on these topics.</p>
</blockquote>
<p>Wonderful news. Web designers and developers everywhere agree with me that IE6 is the bane of our existence. There&#8217;s no need to discuss this further. IE7 is a massive improvement, and in general I&#8217;m pleased with the direction that the team seems to be taking for the future.</p>
<p><a href="http://en.wikipedia.org/wiki/Acid2">Acid2 compliance</a> is, for me, an unexpected leap forward. Currently, Opera and Safari are the most widely used browsers that have achieved this milestone. Firefox 2.x does not reach this level, although Firefox 3 (which is in beta and, I&#8217;m sure, will be released well before IE 8 is) does.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonathanstegall.com/2007/12/20/internet-explorer-8-is-acid2-compliant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

