<?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>Michael Schuerig &#187; CSS</title>
	<atom:link href="http://www.schuerig.de/michael/blog/index.php/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.schuerig.de/michael/blog</link>
	<description>Sentenced to making sense</description>
	<lastBuildDate>Tue, 06 Sep 2011 07:21:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Looking good at any (font and window) size</title>
		<link>http://www.schuerig.de/michael/blog/index.php/2007/02/22/size-dependent-layout/</link>
		<comments>http://www.schuerig.de/michael/blog/index.php/2007/02/22/size-dependent-layout/#comments</comments>
		<pubDate>Thu, 22 Feb 2007 22:13:32 +0000</pubDate>
		<dc:creator>michael</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://schuerig.de/michael/blog/index.php/2007/02/22/size-dependent-layout/</guid>
		<description><![CDATA[Make your layout look good a different screen and font sizes. What it looks like Example 1, Example 2. Here&#8217;s what the form example (example 1) is supposed to look like. At 1024 x 768 pixels, the navigation links and Save button are positioned fixed in a column to the left. At 800 x 600 [...]]]></description>
			<content:encoded><![CDATA[<p>Make your layout look good a different screen and font sizes.</p>
<h3>What it looks like</h3>
<p><a href="http://www.schuerig.de/michael/webdesign/demo/form.html">Example 1</a>,<br />
<a href="http://www.schuerig.de/michael/webdesign/demo/tagcloud.html">Example 2</a>.</p>
<p>Here&#8217;s what the form example (example 1) is <em>supposed</em> to look like.</p>
<p>At 1024 x 768 pixels, the navigation links and Save button are positioned fixed in a column to the left.</p>
<p><img alt="large layout" src="http://www.schuerig.de/michael/webdesign/demo/form1024x768.png" /></p>
<p>At 800 x 600 pixels, the navigation links are only shown on hover over the icon in the top-left corner; the Save button is tucked under the form itself.</p>
<p><img alt="large layout" src="http://www.schuerig.de/michael/webdesign/demo/form800x600-1.png" /><br /><img alt="large layout" src="http://www.schuerig.de/michael/webdesign/demo/form800x600-2.png" /></p>
<h3>What you need</h3>
<p>Grab <a href="http://www.schuerig.de/michael/webdesign/demo/javascripts/layout.js">layout.js</a>.</p>
<p>You also need <a href="http://prototypejs.org/assets/2007/1/18/prototype.js">Prototype.js</a>.</p>
<h3>What you need to do</h3>
<p>Include the scripts in your page.</p>
<p><code>
<pre>
&lt;script src="javascripts/prototype.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="javascripts/layout.js" type="text/javascript"&gt;&lt;/script&gt;
</pre>
<p></code></p>
<p>Activate layout switching in the head of your page</p>
<p><code>
<pre>
&lt;script type="text/javascript"&gt;
//&lt;![CDATA[
Event.observe(window, 'load', function() {
  Layout.initialize({observeFontSize: true});
});
//]]&gt;
&lt;/script&gt;
</pre>
<p></code></p>
<p>Most likely, the default size thresholds set in <code>layout.js</code> won&#8217;t fit your needs. See the file itself for how to set them to different values.</p>
<p>(Re-)Write your stylesheets so that they make use of the size information. As an example, here&#8217;s the CSS I use for styling the navigation list on the two example pages.</p>
<p><code>
<pre>
#navitrigger {
  display: none;
}

#navigation {
  position: fixed;
  top: 0em;
  left: 0em;
  margin: 1em;
  padding: 0;
  text-align: right;
  z-index: 10;
}

#navigation ul {
  width: 10em;
  margin: 0;
  padding: 0;
  list-style-type: none;
}

#navigation li {
  font-weight: bold;
}

#navigation .current {
  display: block;
  width: 100%;
  color: #bbb;
  background-color: #ffecac;
}

#navigation li.admin {
  border-top: 1px solid #bbb;
}

#navigation li a {
  display: block;
  width: 100%;
}

body.small #navigation {
  position: absolute;
  text-align: left;
  z-index: 30;
}

body.small #navigation ul {
  display: none;
  background: #fff;
  border: 1px solid #888;
}

body.small #navitrigger {
  display: block;
  font-size: 150%;
  font-weight: bold;
}

body.small #navigation:hover ul {
  display: block;
}
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.schuerig.de/michael/blog/index.php/2007/02/22/size-dependent-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Return of the Tag Cloud &#8212; ajaxing the tagged</title>
		<link>http://www.schuerig.de/michael/blog/index.php/2007/02/22/tag-cloud/</link>
		<comments>http://www.schuerig.de/michael/blog/index.php/2007/02/22/tag-cloud/#comments</comments>
		<pubDate>Thu, 22 Feb 2007 22:10:28 +0000</pubDate>
		<dc:creator>michael</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://schuerig.de/michael/blog/index.php/2007/02/22/tag-cloud/</guid>
		<description><![CDATA[On my continuing quest to become more Web-2.0-ish, I&#8217;ve tried my luck tilting at&#8230; well, tag clouds. To get an idea what I&#8217;m talking about, please have a look. These are the rudimentary basics to create a tag cloud like that. In the controller def tags @popular_tags = Tag.find_most_popular(:limit =&#62; 30) end In the view [...]]]></description>
			<content:encoded><![CDATA[<p>On my continuing quest to become more Web-2.0-ish, I&#8217;ve tried my luck tilting at&#8230; well, tag clouds. To get an idea what I&#8217;m talking about, please <a href="http://www.schuerig.de/michael/webdesign/demo/tagcloud.html">have a look</a>.</p>
<p>These are the rudimentary basics to create a tag cloud like that.</p>
<p>In the controller</p>
<p><code>
<pre>
def tags
  @popular_tags = Tag.find_most_popular(:limit =&gt; 30)
end
</pre>
<p></code></p>
<p>In the view</p>
<p><code>
<pre>
&lt;ul id="tags" class="tagcloud"&gt;
&lt;% @popular_tags.sort_by(&#038;:name).each do |t| -%&gt;
  &lt;%= weighted_tag t, tag_options %&gt;
&lt;% end -%&gt;
&lt;/ul&gt;
</pre>
<p></code></p>
<p>or, to get a somewhat nicer look, and to demonstrate some of the options</p>
<p><code>
<pre>
&lt;%
  tag_options = {
    :wrap =&gt; ['li', '&lt;span class="dlm"&gt;[&lt;/span&gt;', '&lt;span class="dlm"&gt;]&lt;/span&gt;'],
    :min_size =&gt; 100, :max_size =&gt; 500,
    :link_options =&gt; { :class =&gt; 'tag' })
  }
-%&gt;
&lt;h2&gt;Tags&lt;/h2&gt;
&lt;ul id="tags" class="tagcloud"&gt;
&lt;% @popular_tags.sort_by(&#038;:name).each do |t| -%&gt;
  &lt;%= weighted_tag t, tag_options %&gt;
&lt;% end -%&gt;
&lt;/ul&gt;
</pre>
<p></code></p>
<p><a href="http://schuerig.de/michael/blog/wp-content/uploads/2007/06/tag_cloud-0.0.2.tar.gz">Here you can download a do-it-yourself kit of all the pieces.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.schuerig.de/michael/blog/index.php/2007/02/22/tag-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Form Layout</title>
		<link>http://www.schuerig.de/michael/blog/index.php/2007/02/22/form-layout/</link>
		<comments>http://www.schuerig.de/michael/blog/index.php/2007/02/22/form-layout/#comments</comments>
		<pubDate>Thu, 22 Feb 2007 22:05:39 +0000</pubDate>
		<dc:creator>michael</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://schuerig.de/michael/blog/index.php/2007/02/22/form-layout/</guid>
		<description><![CDATA[I&#8217;ve looked at quite a lot of examples of form layout over the past two years. Invariably the demonstrations looked very pretty and were pretty primitive. Usually, all the input elements are lined up in a single column; labels are either stuck on top of the inputs or prepended to them. This is all well [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve looked at quite a lot of examples of form layout over the past two years. Invariably the demonstrations looked very pretty and were pretty primitive. Usually, all the input elements are lined up in a single column; labels are either stuck on top of the inputs or prepended to them. This is all well for simple forms or a succession of forms chained together in wizard-style. It is less appealing for web-based applications targetted at proficient users who interact with them frequently.</p>
<h2>Ground Rules</h2>
<ul>
<li>Tables only where they are semantically meaningful.</li>
<li>As much independence as possible from specific window or font sizes.</li>
<li>Efficient use of available space.</li>
<li>Horizontal and vertical alignment to columns.</li>
</ul>
<p><a href="http://www.schuerig.de/michael/webdesign/demo/form.html">Here&#8217;s my entry.</a></p>
<p>For those with impaired browsers, here&#8217;s what it looks like at various widths.</p>
<p>800 pixels<br />
<img alt="large layout" src="http://www.schuerig.de/michael/webdesign/demo/form800x600-1.png" /></p>
<p>600 pixels<br />
<img alt="large layout" src="http://www.schuerig.de/michael/webdesign/demo/form600.png" /></p>
<p>400 pixels<br />
<img alt="large layout" src="http://www.schuerig.de/michael/webdesign/demo/form400.png" /></p>
<p>The relevant part of the <a href="http://www.schuerig.de/michael/webdesign/demo/stylesheets/boilerplate.css">boilerplate.css</a> stylesheet isn&#8217;t even overly long.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.schuerig.de/michael/blog/index.php/2007/02/22/form-layout/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

