<?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>DocuView - document management system &#187; flexible</title>
	<atom:link href="http://docuview.co.uk/index.php/tag/flexible/feed/" rel="self" type="application/rss+xml" />
	<link>http://docuview.co.uk</link>
	<description>revolutionary web 2.0 document management system</description>
	<lastBuildDate>Fri, 25 Jun 2010 00:50:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>styling forms &#8211; the 21st century way</title>
		<link>http://docuview.co.uk/index.php/2009/08/styling-forms-the-21st-century-way/</link>
		<comments>http://docuview.co.uk/index.php/2009/08/styling-forms-the-21st-century-way/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 18:09:18 +0000</pubDate>
		<dc:creator>Martin Korych</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[alternative]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[docuview]]></category>
		<category><![CDATA[fixed]]></category>
		<category><![CDATA[flexible]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[line-height]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[working]]></category>

		<guid isPermaLink="false">http://docuview.co.uk/?p=354</guid>
		<description><![CDATA[Even better usage of labels in beautiful semantically enhanced forms combined with jQuery (as seen at ZURB).]]></description>
			<content:encoded><![CDATA[<p>Based on an<a title="styling forms as used in DocuView" href="http://www.zurb.com/article/271/making-forms-convert-through-awesome-inli"> amazing article from ZURB</a> I recommend you have a look at I have revisited their technique to:</p>
<ul>
<li>deliver the same solution in jQuery</li>
<li>use a bit more flexible CSS (at least in my view)</li>
<li>redesign our search box</li>
</ul>
<p><span id="more-354"></span></p>
<p>Up until now we have been using a simple JavaScript solution:</p>
<pre class="brush: xml;">&lt;form id=&quot;search&quot; action=&quot;/index.php&quot; method=&quot;get&quot;&gt;
&lt;div&gt;
&lt;input class=&quot;search_string&quot; type=&quot;text&quot; name=&quot;search_string&quot; id=&quot;search_string&quot; onfocus=&quot;if (this.value == this.defaultValue) this.value = '';&quot; onblur=&quot;if (trim(this.value) == '') this.value = this.defaultValue;&quot; onmouseover=&quot;this.focus();&quot; value=&quot;search DocuView&quot; /&gt;
&lt;input class=&quot;search_submit&quot; type=&quot;submit&quot; name=&quot;search_submit&quot; id=&quot;search_submit&quot; value=&quot;&quot; /&gt;
&lt;input class=&quot;hidden&quot; type=&quot;hidden&quot; name=&quot;page&quot; value=&quot;search&quot; /&gt;
&lt;/div&gt;
&lt;/form&gt;</pre>
<p>It worked just fine. Displayed the desired value in the input field and on focus it&#8217;d replace it with cursor&#8230; We use that in combination with:</p>
<pre class="brush: xml;">&lt;body class=&quot;documents&quot; onload=&quot;document.forms[0].elements[0].focus();&quot;&gt;</pre>
<p>which would automatically focus on the form&#8217;s search field upon loading the document AND:</p>
<pre class="brush: jscript;">
function trim(string)
{
return string.replace(/^\s+|\s+$/g, '')
}
</pre>
<p>The sought after not built-in JavaScript trim function (there is a jQuery alternative, see below).</p>
<p>Since then I have also read this <a title="text-indent workaround in IE6/IE7" href="http://www.productivedreams.com/ie-not-intepreting-text-indent-on-submit-buttons/">article on optimising and styling the submit/search button in IE6/IE7</a> or generally any browser not supporting text-indent on button elements.</p>
<h3>Now for the NEW code</h3>
<p>I have used more or less the same code as seen at ZURB.</p>
<pre class="brush: xml;">
&lt;form id=&quot;search&quot; action=&quot;/testing/label.php&quot; method=&quot;get&quot;&gt;
&lt;div&gt;
&lt;label for=&quot;search-string&quot; class=&quot;overlay&quot;&gt;&lt;span&gt;search Docu&lt;strong&gt;View&lt;/strong&gt;&lt;/span&gt;&lt;/label&gt;
&lt;input class=&quot;search-string&quot; type=&quot;text&quot; name=&quot;search-string&quot; id=&quot;search-string&quot; value=&quot;search]&quot; /&gt;
&lt;input type=&quot;submit&quot; name=&quot;search-submit&quot; id=&quot;search-submit&quot; value=&quot;search DocuView&quot; /&gt;
&lt;/div&gt;
&lt;/form&gt;
</pre>
<p>I have used an id for the form to make the CSS specific, easier to insert and start using immediately. I have to admit I have tried to omit the extra class on the label but the jQuery code stopped working (and frankly I do not know why yet &#8211; I&#8217;m hoping some of you will help me shed some light on it/I&#8217;ll figure out why soon). Anywho&#8230;</p>
<h3>Coding the form behaviour</h3>
<p>I have used relative units (em) to ensure the form scales with the size of the font. Also our tweaked version of <a title="CSS Reset stylesheet" href="http://meyerweb.com/eric/tools/css/reset/">Eric Meyer&#8217;s Reset CSS</a> is used. The result is acceptably similar in all major browsers (IE7/8, Firefox 3.5, Opera 9, Safari 4, Chrome 2, IE6 is having a problem displaying the submit button as defined &#8211; maybe some of you will know how to solve that). In Opera the input field is *slightly* lower than I&#8217;d like it to be. I have tried cheating it: converted all the values from relative to fixed (em -&gt; px), using 16px font (.75em = 12px, .5em = 8px, .25em = 4px) + I had to add &#8220;invisible&#8221; (white) borders to both the <strong>search-string</strong> input field and <strong>the span contained in the label</strong> but to no avail. At this point there does not seem to be a way to achieve pixel perfect overlay between the input field and the span (in XHTML Strict). Yet!</p>
<p>Apart from converting the JavaScript from the Prototype to jQuery I have also added validating and styling the label when user deletes the contents of the input field OR loads the page with AutoFill/submitted form values in it. Also instead of using the not-yet-100%-supported opacity/transition all I&#8217;m changing is the color of the font in the span.</p>
<pre class="brush: jscript;">
$(document).ready(function()
{
// Select all textboxes and assign them to an array
var input	=	$('#search-string');
var label	=	$('label.overlay');

if (!$.trim(input.val())	==	'')
{
label.addClass('focus').addClass('hastext');
}
else
{
label.removeClass('focus').removeClass('hastext');
}

// Fade the label back when a field gains focus
input.focus(function()
{
if ($.trim($(this).val())	==	'')
{
label.addClass('focus');
}
else
{
label.addClass('hastext');
}
});

// Fade the label back when the user starts to type
input.keyup(function(e)
{
//	empty? label-&gt;focused
if ($.trim($(this).val())	==	'')
{
label.removeClass('hastext').removeClass('focus').addClass('focus');
}
else
{
label.addClass('hastext');
}
});

// Check if a field is empty when the user switches out
input.blur(function()
{
if ($.trim($(this).val())	==	'')
{
label.removeClass('focus').removeClass('hastext');
}
});
});
</pre>
<p>Don&#8217;t forget to include the jQuery library! <a title="styling forms as used in DocuView" href="http://demo.docuview.co.uk/testing/label.php">I have devised a demo</a> and have started implementing this throughout our software. As ZURB warned: do not overuse it. I was happy to find semantically friendlier and in a way much better solution than we have used so far.</p>
<h3>Finally: the CSS</h3>
<pre class="brush: css;">
body { font-size: 100%; font-family: Helvetica, Arial, sans-serif; line-height: 1.5; }
strong { font-weight: bold; }
#search { width: 20em; color: white; background-color: black; margin: 2em; }
#search div { position: relative; height: 3em; }
#search input { border: 0 none; font-family: Helvetica, Arial, sans-serif; font-size: 100%; }
#search label { position: absolute; left: .5em; top: .5em; width: 19em; height: 2em; background: white; z-index: 1; font-size: 100%; }
#search span { color: black; display: block; padding: .25em 0 0 .25em; border: 0 none; /*border-left: 1px solid white;*/ /*border-top: 2px solid white;*/ }
#search .focus span { color: #ccc; }
#search .hastext span { color: white; }
#search #search-string { position: absolute; z-index: 10; top: .5em; left: .5em; width: 87%; height: 2em; background: none; padding: .25em 0 0 .25em; /*border-top: 2px solid white;*/ }
#search #search-submit { background: transparent url(http://img.docuview.co.uk/sprite/search.png) no-repeat center center; height: 100%; width: 13%; font-size: 0; text-indent: -9999px; line-height: 0; display: block; position: absolute; top: 0; right: 0; z-index: 10; overflow: hidden; }
</pre>
<p>Thank you, ZURB guys, for the inspiration, I absolutely love the idea! I hope you find the implementation as useful as I have.</p>
]]></content:encoded>
			<wfw:commentRss>http://docuview.co.uk/index.php/2009/08/styling-forms-the-21st-century-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fluid CSS steps &#8211; this is how it&#8217;s done :)</title>
		<link>http://docuview.co.uk/index.php/2009/07/fluid-css-steps-this-is-how-its-done/</link>
		<comments>http://docuview.co.uk/index.php/2009/07/fluid-css-steps-this-is-how-its-done/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 01:06:28 +0000</pubDate>
		<dc:creator>Martin Korych</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[docuview]]></category>
		<category><![CDATA[flexible]]></category>
		<category><![CDATA[fluid]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[latest]]></category>
		<category><![CDATA[line-height]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[progress]]></category>
		<category><![CDATA[step menu]]></category>
		<category><![CDATA[steps]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wizard menu]]></category>
		<category><![CDATA[working]]></category>

		<guid isPermaLink="false">http://docuview.co.uk/?p=257</guid>
		<description><![CDATA[Create fluid (adaptive width) flexible CSS steps (wizard menu) for your applications, adjust it and pretty much do anything you want with it - this time the future-proof way.]]></description>
			<content:encoded><![CDATA[<p>I have had Cody Lindley&#8217;s <a title="cody lidnley's technique" href="http://codylindley.com/blogstuff/css/stepmenu/">technique</a> for CSS steps in the back of my head for soooo long and finally got around making my own version of it. My aim was to create a flexible fluid version of Lindley&#8217;s wizard menu. And I&#8217;ve succeeded. Here&#8217;s how:<span id="more-257"></span></p>
<h3>Approach</h3>
<p>Whether you decide to use &lt;ul&gt; or &lt;ol&gt; is entirely up to you. Do consider &lt;dl&gt; as well. In my example I have used &lt;ol&gt;. I was hoping to achieve semantically correct markup (read: not use tables &#8211; because that&#8217;s too easy and in a way cheating a bit) and create a solution that naturally stretches over the whole screen &#8211; so a block element.</p>
<p>Consider how many steps you are going to use in your CSS steps (wizard menu): 2, 3, 4, 5&#8230; more? Is more really necessary? Two, four and five steps are easy. You are going to end up with</p>
<ul>
<li>two steps both 50% wide (class &#8220;two_steps&#8221;)</li>
<li>four steps each 25% wide (class &#8220;four_steps&#8221;)</li>
<li>five steps each 20% wide (class &#8220;five_steps&#8221;)</li>
</ul>
<p>But what about 3? Since a floating point (decimals) is not 100% supported by all browsers and 33.3 × 3 ≠ 100, we have to cheat a little. I have decided to give the current element a width of 34%, leaving the other two at 33% (+ class &#8220;three_steps&#8221;). To users&#8217; eye hardly noticeable, to me achieving what I set out to do in the first place. You could use similar technique when working with 6 step menu: 5×16% + 1×20% OR 5×17% + 1×15%.</p>
<pre class="brush: css;">
/*	STEPS WIDTH	*/
#progress-bar.two_steps li { width: 50%; }
#progress-bar.three_steps li { width: 33%; }
#progress-bar.three_steps .current { width: 34%; }
#progress-bar.four_steps li { width: 25%; }
#progress-bar.five_steps li { width: 20%; }
</pre>
<p>Yes, one could argue I could simplify by omitting the #progress-bar, the choice is yours.</p>
<p>No matter how many steps you are using there are 5 (essentially 4) classes utilised: <strong>&#8220;current&#8221;</strong>, <strong>&#8220;previous&#8221;</strong>, <strong>&#8220;done&#8221;</strong>, <strong>&#8220;last&#8221;</strong> and empty.</p>
<ul>
<li>current &#8211; for the active element</li>
<li>previous &#8211; for the element just completed &#8211; preceding immediately the &#8220;current&#8221; class</li>
<li>done &#8211; for the element dealt with two (or more) steps back &#8211; for the element preceding immediately the &#8220;previous&#8221; class</li>
<li>last &#8211; for the very last element &#8211; used in conjunction with current</li>
</ul>
<p>Here is the CSS for the whole progress bar, I&#8217;ll go through each line separately:</p>
<pre class="brush: css;">
/*	PROGRESS BAR	*/
#progress-bar { text-transform: capitalize; margin-bottom: .25em; height: 3.5em; }
#progress-bar li { float: left; height: 3.5em; color: #ccc; background-color: #efefef; background-image: url(../img/steps/default.png); background-position: right center; background-repeat: no-repeat; }
#progress-bar a { display: block; padding: .25em; height: 3.5em; line-height: 150%; text-decoration: none; }
#progress-bar em { display: block; font-style: normal; font-weight: bold; }
#progress-bar span { display: block; }

#progress-bar .current { color: white; background-color: #369; background-image: url(../img/steps/current.png);  }
#progress-bar .current a { color: white; }
#progress-bar .last { background-image: none; }
#progress-bar .done { color: white; background-color: #c8e9ed; background-image: url(../img/steps/done.png); }
#progress-bar .previous { color: white; background-color: #c8e9ed; background-image: url(../img/steps/previous.png); }
</pre>
<p>I have sat down earlier and thought of the colours my progress bar is going to be. I wanted grey for bits that have not happened yet, the teasing (used #efefef as it is very light yet recognised as grey with #ccc for the colour of the text). Something stronger, bolder for the current element: #369, text white. And the previous and dealt-with parts: lighter blue perhaps, text white too? I used #c8e9ed as the background colour.</p>
<p>At this point I should maybe mention the four different background images we will be using to create the illusion of one step leading to another. According to the classes mentioned before I created four images that I will use as backgrounds of the li &#8211; list items. Here they are:</p>
<p><img class="alignleft size-full wp-image-264" title="default" src="http://docuview.co.uk/wp-content/uploads/2009/07/default.png" alt="default" width="30" height="88" /><img class="alignleft size-full wp-image-266" title="previous" src="http://docuview.co.uk/wp-content/uploads/2009/07/previous.png" alt="previous" width="30" height="88" /><img class="alignleft size-full wp-image-265" title="done" src="http://docuview.co.uk/wp-content/uploads/2009/07/done.png" alt="done" width="30" height="88" /><img class="alignleft size-full wp-image-263" title="current" src="http://docuview.co.uk/wp-content/uploads/2009/07/current.png" alt="current" width="30" height="88" /></p>
<p>The first one: default &#8211; as in the first step all steps but the first are yet to happen, the two transitions we will be witnessing is between the elements with grey background and the current element with the dark-blue background into the grey again. Every step after the current one &#8211; unless the current is the last step &#8211; is a little unknown (blue into grey) &#8211; the blend is obvious and easy. In the case where current IS the last step we combine it with the &#8220;last&#8221; class &#8211; which <strong>disables the background image</strong> yet <strong>preserves the background colour</strong>. The &#8220;previous&#8221; class transitions from lighter blue (has happened) immediately into &#8220;current&#8221; element &#8211; light-blue into dark-blue transition. And the last: &#8220;done&#8221;: both done and previous steps have happened, hence only a transition between light-blue AND light-blue. Easy, right? <img src='http://docuview.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Since there is always going to be only one instance of the progress bar and since an id has more gravity as a selector than a class I named my little experiment &#8220;progress-bar&#8221;. I suppose the only important rule in the first line is the height of the whole thing. If you are trying to fit in more: change it.</p>
<p>Rather than using &#8220;li { display: inline; }&#8221; I floated the list items, the height matches the parent element and the important bit: the background. Since we are assigning the aforementioned background arrows to &lt;li&gt;s themselves, rather than explicitly writing the rule every time it occurs I defined the background-position and background-repeat for all the elements here. It doesn&#8217;t change throughout the steps and saves couple of bytes <img src='http://docuview.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  No really..</p>
<p>Used &lt;em&gt; (emphasis) and &lt;span&gt; to describe the steps, rather than floating and clearing each other I used display: block on both. The rest deals with each step by changing the default background and the colour of the text to allow users to easily distinguish between what has happened and what is still ahead. The .current a { color: white; } rule is there to overwrite an existing one higher in the stylesheet, you might choose to leave it out.</p>
<p>As mentioned before: striving for semantically correct markup I have used &lt;ol&gt; &#8211; ordered list &#8211; they are steps in the end that happen in a particular order &#8211; so it only makes sense to use that. There is a link within each li, note that NOT ALL OF THE LINKS have a &#8220;href&#8221; attribute. The code for the first step is fairly simple &#8211; I have used an example from our day-to-day programming:</p>
<pre class="brush: php;">
&lt;ol id=&quot;progress-bar&quot; class=&quot;four_step&quot;&gt;
&lt;li class=&quot;current&quot;&gt;&lt;a href=&quot;#nogo&quot; title=&quot;description&quot;&gt;&lt;em&gt;step one &amp;raquo;&lt;/em&gt;&lt;span&gt;description&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title=&quot;members&quot;&gt;&lt;em&gt;step two &amp;raquo;&lt;/em&gt;&lt;span&gt;members&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a title=&quot;folder access&quot;&gt;&lt;em&gt;step three &amp;raquo;&lt;/em&gt;&lt;span&gt;folder access&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;last&quot;&gt;&lt;a title=&quot;confirmation&quot;&gt;&lt;em&gt;step four &amp;raquo;&lt;/em&gt;&lt;span&gt;confirmation&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</pre>
<p>This is what it the first step looks like formatted in real life:</p>
<p><img class="size-full wp-image-259 alignnone" title="form-steps" src="http://docuview.co.uk/wp-content/uploads/2009/07/form-steps.png" alt="form-steps" width="692" height="260" /></p>
<p>Second step:</p>
<p><img class="size-full wp-image-260 alignnone" title="form-steps2" src="http://docuview.co.uk/wp-content/uploads/2009/07/form-steps2.png" alt="form-steps2" width="692" height="385" /></p>
<p>Third step:</p>
<p><img class="alignnone size-full wp-image-261" title="form-steps3" src="http://docuview.co.uk/wp-content/uploads/2009/07/form-steps3.png" alt="form-steps3" width="675" height="369" /></p>
<p>Fourth step:</p>
<p><img class="alignnone size-full wp-image-262" title="form-steps4" src="http://docuview.co.uk/wp-content/uploads/2009/07/form-steps4.png" alt="form-steps4" width="675" height="369" /></p>
<p>Voila!</p>
<p>Believe it or not I have been searching for a similar solution all over the internet on and off for over a year. As I mentioned earlier the main credit goes to Cody, his awesome solution inspired me in the first place. I was excited implementing the solution in the latest DocuView and testing: successfully in IE6+ (hell) &#8211; Win, FF 2+ Win &amp; Mac, Safari 3+ Win &amp; Mac, Chrome 1+ Win and lets not forget Opera 9.5+ both Win &amp; Mac.</p>
<p>If you have any suggestions, if you think I could have done it easier or differently or if this too is what you have been looking for leave me a comment below.</p>
<p>Now I&#8217;m onto turning <a title="mac dock" href="http://nettuts.s3.amazonaws.com/358_jquery/example%20files/all-examples.html">this</a> (the MAC-like dock that is) into a semantically correct solution, one that works in IE6. And when I do, you will hear about it here. Make sure you subscribe to our feed to get the all the updates!</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 947px; width: 1px; height: 1px;">At both W this point I should maybe mention the four different background images we will be using to create the illusion of one step leading to another.</div>
]]></content:encoded>
			<wfw:commentRss>http://docuview.co.uk/index.php/2009/07/fluid-css-steps-this-is-how-its-done/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sliding doors with transparent background (CSS) &#8211; Part 1</title>
		<link>http://docuview.co.uk/index.php/2008/04/sliding-doors-with-transparent-background-css-part-1/</link>
		<comments>http://docuview.co.uk/index.php/2008/04/sliding-doors-with-transparent-background-css-part-1/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 23:25:23 +0000</pubDate>
		<dc:creator>Martin Korych</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[document management system]]></category>
		<category><![CDATA[docuview]]></category>
		<category><![CDATA[fixed]]></category>
		<category><![CDATA[flexible]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[heading]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[sliding doors]]></category>
		<category><![CDATA[transparent background]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[working]]></category>

		<guid isPermaLink="false">http://docuview.co.uk/blog/?p=8</guid>
		<description><![CDATA[We&#8217;ve undergone a major revamp of DocuView design (the blog is to follow). I have decided to make this post because I have been looking for a solution on the internet and couldn&#8217;t find a suitable up-to-date article describing what I needed. The obstacle I came accross this time was transforming fixed layout into a [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve undergone a major revamp of DocuView design (the blog is to follow). I have decided to make this post because I have been looking for a solution on the internet and couldn&#8217;t find a suitable up-to-date article describing what I needed. The obstacle I came accross this time was transforming fixed layout into a flexible one, avoiding extra markup and utilising CSS to do the trick.</p>
<h2>Original design</h2>
<p>We&#8217;re working with a brilliant young designer Jay Murray, who&#8217;s contribution to the project is priceless. He came up with the following design:</p>
<p><a href="http://docuview.co.uk/wp-content/uploads/2008/04/new_design.png" target="_blank"><img class="alignnone size-medium wp-image-50" title="new_design" src="http://docuview.co.uk/wp-content/uploads/2008/04/new_design-300x174.png" alt="" width="300" height="174" /></a></p>
<p><span id="more-8"></span></p>
<h2>Three challenges there:</h2>
<ul>
<li>awesome headings that carry the logo design (shape and colours) throughout the site &#8211; turn them into flexible width as DocuView isn&#8217;t and won&#8217;t be using fixed layout</li>
<li>the same with subheadings and smaller sections</li>
<li>apply the background to menu items and turn them into 3Dish tabs (resembling filing folder &#8211; we are dealing with a document management system here after all</li>
</ul>
<h2>Sliding doors with transparent background (CSS) &#8211; headings + wrapper</h2>
<p>We&#8217;re using PNGs throughout the system, no hacks and workarounds for IE6 (yet &#8211; although not quite sure that in these days we should still care and optimise &#8211; probably an article on its own for the future). The issue here is we have a background applied to the &#8220;container&#8221; div and the heading is on top of the background and we want to keep the transparency.</p>
<p>I had a long thought as to how I&#8217;m going to tackle this. Slicing the heading, making it work on resolutions up to full HD (1920×1200) (for the sake of couple of kilobytes of cachable graphics it was actually a no brainer)&#8230;</p>
<h2>Preparing the images</h2>
<p>This is the default image I have extracted from Jay&#8217;s Illustrator files. Consists of three layers:</p>
<ul>
<li>container (with shadows)</li>
<li>heading (no shadows)</li>
<li>subheading (no shadow)</li>
</ul>
<p><a href="http://docuview.co.uk/wp-content/uploads/2008/04/default_layout.png" target="_blank"><img class="alignnone size-medium wp-image-40" title="default_layout" src="http://docuview.co.uk/wp-content/uploads/2008/04/default_layout-300x195.png" alt="" width="300" height="195" /></a></p>
<p>I came accross sliding doors in CSS layouts in the past, I&#8217;ve read articles on <a title="A List Apart - Sliding Doors of CSS" href="http://www.alistapart.com/articles/slidingdoors/" target="_blank">A List Apart</a> (+<a title="A List Apart - Sliding Doors of CSS, Part II" href="http://www.alistapart.com/articles/slidingdoors2/">part II</a>), which gave me an insight into the technique yet it did not fully covered what I was after since they&#8217;re describing a GIF-based method. Useful, but not exactly what I hoped for. Observing their technique I have decided to slice my background like this:</p>
<p><a href="http://docuview.co.uk/wp-content/uploads/2008/04/guides.png" target="_blank"><img class="alignnone size-medium wp-image-43" title="guides" src="http://docuview.co.uk/wp-content/uploads/2008/04/guides-300x194.png" alt="" width="300" height="194" /></a></p>
<p><em>Please note I took the screenshot with white background so it&#8217;s more obvious where the guides are and how the shadows work.</em></p>
<p>A List Apart recommends making the left hand side (LHS) slice as small as possible. That&#8217;s exactly what we&#8217;re doing here. Using the Eyedropper tool in Photoshop I have separated areas with consistent background (to avoid funny looking transitions) and began slicing.</p>
<p><a href="http://docuview.co.uk/wp-content/uploads/2008/04/slicing.png" target="_blank"><img class="alignnone size-medium wp-image-51" title="slicing" src="http://docuview.co.uk/wp-content/uploads/2008/04/slicing-300x194.png" alt="" width="300" height="194" /></a></p>
<p>First: disable the white background. Then chop it into pieces. We only care about slices 1, 2, 5, 7 and 8. Note that slice 5 varies slightly from the others. The reason behind that is when it comes down to actual coding of the page and efficiently laying it out, any subheading will be contained in a either <strong>fieldset </strong>or <strong>form </strong>(I haven&#8217;t decided yet). There is no need to export the subheading layer with the shadows at all. We&#8217;ll get to this.</p>
<p>You end up with 5 slices:</p>
<p><a href="http://docuview.co.uk/wp-content/uploads/2008/04/images_01.png" target="_blank"><img class="alignnone size-medium wp-image-45" title="images_01" src="http://docuview.co.uk/wp-content/uploads/2008/04/images_01.png" alt="" width="24" height="82" /></a> <em>(LHS of heading)</em></p>
<p><a href="http://docuview.co.uk/wp-content/uploads/2008/04/images_02.png" target="_blank"><img class="alignnone size-medium wp-image-46" title="images_02" src="http://docuview.co.uk/wp-content/uploads/2008/04/images_02-300x35.png" alt="" width="300" height="35" /></a><em>(RHS of heading)</em></p>
<p><a href="http://docuview.co.uk/wp-content/uploads/2008/04/images_05.png" target="_blank"><img class="alignnone size-medium wp-image-47" title="images_05" src="http://docuview.co.uk/wp-content/uploads/2008/04/images_05-300x11.png" alt="" width="300" height="11" /></a> <em>(subheading)</em></p>
<p><a href="http://docuview.co.uk/wp-content/uploads/2008/04/images_07.png" target="_blank"><img class="alignnone size-medium wp-image-48" title="images_07" src="http://docuview.co.uk/wp-content/uploads/2008/04/images_07.png" alt="" width="24" height="217" /></a> <em>(LHS of wrapper)</em></p>
<p><a href="http://docuview.co.uk/wp-content/uploads/2008/04/images_08.png" target="_blank"><img class="alignnone size-medium wp-image-49" title="images_08" src="http://docuview.co.uk/wp-content/uploads/2008/04/images_08-300x94.png" alt="" width="300" height="94" /></a> <em>(RHS of wrapper)</em></p>
<h2>Converting fixed images to work in flexible layout</h2>
<p>I now need to take slices 2, 5, 7 and 8 and extend them a bit to cope with bigger resolutions as I am limited by the size of the image when it comes down to displaying the content.</p>
<p>Go back to Photoshop and open the above mentioned slices that need reediting.</p>
<p><strong>Slice 2</strong> (RHS heading): Firstly we need to extend the canvas (Winows: ALT+CTRL+C, Mac: I need to find out). Except for slice 7 (LHS of wrapper) we will be extending horizontally.</p>
<p><a href="http://docuview.co.uk/wp-content/uploads/2008/04/canvas_size.png" target="_blank"><img class="alignnone size-medium wp-image-28" title="extend canvas size to accomodate bigger resolutions" src="http://docuview.co.uk/wp-content/uploads/2008/04/canvas_size-300x247.png" alt="" width="300" height="247" /></a></p>
<p><a href="http://docuview.co.uk/wp-content/uploads/2008/04/extended_heading.png" target="_blank"><img class="alignnone size-medium wp-image-54" title="extended_heading" src="http://docuview.co.uk/wp-content/uploads/2008/04/extended_heading-300x13.png" alt="" width="300" height="13" /></a></p>
<p>Using the Eyedropper tool (I) select the colour (#00cbe5 in my case) in the far left side of the heading: this is the colour we are going to repeat in the rest of the image in a matching rectangle we&#8217;ve created using the Marquee tool (M).</p>
<p>I forgot about the shadow above the heading the very first time I was doing this. In order to help me distinguish and copy the shadows over I have dropped in a new layer with white background and placed it underneath the layer I was working with. So now it&#8217;s just down to Marquee tool and some copying. I do not worry about the number of layers it takes to create as I&#8217;ll merge them (Win: CTRL+E, Mac: will update soon) in the end anyway&#8230;</p>
<p>Final product (again with white background just for demonstrating purposes):</p>
<p><a href="http://docuview.co.uk/wp-content/uploads/2008/04/final_heading.png" target="_blank"><img class="alignnone size-medium wp-image-53" title="final_heading" src="http://docuview.co.uk/wp-content/uploads/2008/04/final_heading-300x13.png" alt="" width="300" height="13" /></a></p>
<p>Now I need to do the same to the subheading (<strong>slice 5 </strong>- don&#8217;t forget no shadows there).</p>
<p><strong>Slice 8</strong> (RHS of wrapper): I have resized the canvas to be 1920×1200 from bottom right corner. I have copied both the side and bottom over so many times till it filled the whole screen. I think I dropped in a white layer just for testing purposes to help me distinguish overlaying of the copied layers. In the end (after disabling the white layer) I have painted the rectangle that I created in the top left part of the image (because I do actually want to have the background of the wrapper in white to give a good contrast to containg elements).</p>
<p><strong>Slice 7 </strong>(LHS of wrapper): resizing this one to be (whatever-the-width(24px in my case)×1200 (height) and repeated the process from expanding slice 8.</p>
<p>Final images:</p>
<p><a href="http://docuview.co.uk/wp-content/uploads/2008/04/images_01.png" target="_blank"><img class="alignnone size-medium wp-image-45" title="images_01" src="http://docuview.co.uk/wp-content/uploads/2008/04/images_01.png" alt="" width="24" height="82" /></a></p>
<p><a href="http://docuview.co.uk/wp-content/uploads/2008/04/heading_right.png" target="_blank"><img class="alignnone size-medium wp-image-44" title="heading_right" src="http://docuview.co.uk/wp-content/uploads/2008/04/heading_right.png" alt="" width="300" height="12" /></a></p>
<h2><a href="http://docuview.co.uk/wp-content/uploads/2008/04/subheading.png" target="_blank"><img class="alignnone size-medium wp-image-52" title="subheading" src="http://docuview.co.uk/wp-content/uploads/2008/04/subheading.png" alt="" width="300" height="4" /></a></h2>
<h2><a href="http://docuview.co.uk/wp-content/uploads/2008/04/form_left.png" target="_blank"><img class="alignnone size-medium wp-image-41" title="form_left" src="http://docuview.co.uk/wp-content/uploads/2008/04/form_left.png" alt="" width="3" height="300" /></a></h2>
<h2><a href="http://docuview.co.uk/wp-content/uploads/2008/04/form_right.png" target="_blank"><img class="alignnone size-medium wp-image-42" title="form_right" src="http://docuview.co.uk/wp-content/uploads/2008/04/form_right.png" alt="" /></a></h2>
<h2>Next time</h2>
<p>In part two I will be describing the combination of CSS and HTML to achieve sliding doors on flexible layouts using CSS.</p>
<p>Let me know your thoughts <img src='http://docuview.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://docuview.co.uk/index.php/2008/04/sliding-doors-with-transparent-background-css-part-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
