<?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"
	>

<channel>
	<title>Andrew Sellick &#187; XHTML</title>
	<atom:link href="http://www.andrewsellick.com/category/xhtml/feed" rel="self" type="application/rss+xml" />
	<link>http://www.andrewsellick.com</link>
	<description>andrewsellick.com</description>
	<pubDate>Thu, 21 Aug 2008 14:58:24 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Advance Vista Styled CSS Menu</title>
		<link>http://www.andrewsellick.com/94/advance-vista-styled-css-menu</link>
		<comments>http://www.andrewsellick.com/94/advance-vista-styled-css-menu#comments</comments>
		<pubDate>Wed, 26 Mar 2008 14:37:49 +0000</pubDate>
		<dc:creator>andy</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.andrewsellick.com/94/advance-vista-styled-css-menu</guid>
		<description><![CDATA[ 
digg_url = "http://www.andrewsellick.com/94/advance-vista-styled-css-menu";
 
&#160;

After seeing an amazing design tutorial on PSDTUTS for a Vista Style menu design a decided to give it ago and turn their design into reality.&#160; Well I&#8217;ve built it and it looks pretty good (see the css vista menu demo) so I thought I would share how I did it [...]]]></description>
			<content:encoded><![CDATA[<div class="digg"> <script type="text/javascript">
digg_url = "http://www.andrewsellick.com/94/advance-vista-styled-css-menu";
</script> <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></p>
<p>&nbsp;</p>
</div>
<p>After seeing an amazing design tutorial on PSDTUTS for a <a href="http://psdtuts.com/interface-tutorials/how-to-create-a-stunning-vista-inspired-menu/" target="_blank">Vista Style menu design</a> a decided to give it ago and turn their design into reality.&nbsp; Well I&#8217;ve built it and it looks pretty good (see the <a href="http://www.andrewsellick.com/examples/vista-menu/">css vista menu demo</a>) so I thought I would share how I did it with the world.</p>
<p><img width="258" height="42" alt="Advanced CSS Menu" src="http://www.andrewsellick.com/wp-content/uploads/Image/vista.gif" /></p>
<h3>step one</h3>
<p>Create a PSD of the menu as details in the PSDTUTS article linked above.</p>
<h3>step two</h3>
<p>Cut out the images required for the menu design and save them to an images folder at the root of your site.&nbsp; The required images are as follows:</p>
<ul>
<li>A one pixel wide image of the background of the menu. (nav-bg.gif)</li>
<li>A one pixel wide image of the divider (bar) that splits each nav item. (nav-bar.gif)</li>
<li>An active state image with the blue glow. Notice this image also has a divider (bar) on the left hand side of this image. This will be important for later on in this tutorial. (active.gif)</li>
</ul>
<p><img width="370" height="104" alt="CSS Vista Menu" src="http://www.andrewsellick.com/wp-content/uploads/Image/vista-items.gif" /></p>
<h3>step three</h3>
<p>Build the HTML structure:</p>
<div class="code">&lt;div id=&quot;main-nav&quot;&gt;<br />
&nbsp;&nbsp; &nbsp;&lt;ul&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;li class=&quot;active&quot;&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;li&gt;&lt;a href=&quot;#&quot;&gt;One&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Two&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Three&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Four&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp; &nbsp;&lt;/ul&gt;<br />
&nbsp;&nbsp; &nbsp;&lt;div class=&quot;clear-both&quot;&gt;&amp;nbsp;&lt;/div&gt;<br />
&lt;/div&gt;</div>
<p>
As you can see above the structure is a simple unordered list of the desired navigation items, contained within a div named &quot;main-nav&quot;.</p>
<p>HTML wise that is it really.&nbsp; Just drop this in to the body of the site.</p>
<h3>step four</h3>
<p>Now we need to style the menu using the images we previously cut out as detailed below:</p>
<div class="code">body{<br />
&nbsp;&nbsp; &nbsp;font-family:Arial, Helvetica, sans-serif;<br />
&nbsp;&nbsp; &nbsp;font-size:75%;<br />
}</p>
<p>#main-nav{<br />
&nbsp;&nbsp;&nbsp; height:29px;<br />
&nbsp;&nbsp;&nbsp; float:left;<br />
&nbsp;&nbsp;&nbsp; background-image:url(../images/nav-bg.gif);<br />
&nbsp;&nbsp;&nbsp; background-repeat:repeat-x;<br />
&nbsp;&nbsp;&nbsp; background-position:top left;<br />
&nbsp;&nbsp;&nbsp; width:100%;<br />
}</div>
<p>
The code above sets the default font and font size for the body of the document.&nbsp; You can use whatever font you desire here or if you only want to apply these font styles to the menu add the font styling to the &quot;#main-nav&quot; style.</p>
<p>The &quot;#main-nav&quot; style sets the height/width of the menu whilst also applying the navigation background to the container.</p>
<div class="code">#main-nav ul,<br />
#main-nav li{<br />
&nbsp;&nbsp; &nbsp;padding:0px;<br />
&nbsp;&nbsp; &nbsp;margin:0px;<br />
&nbsp;&nbsp; &nbsp;list-style-type:none;<br />
}</div>
<p>
Next we need to remove the default padding/margin and bullets  applied to unordered lists.</p>
<div class="code">#main-nav ul{<br />
&nbsp;&nbsp; &nbsp;height:29px;<br />
&nbsp;&nbsp; &nbsp;line-height:29px;<br />
&nbsp;&nbsp; &nbsp;background-image:url(../images/nav-bar.gif);<br />
&nbsp;&nbsp; &nbsp;background-position:right;<br />
&nbsp;&nbsp; &nbsp;background-repeat:no-repeat;<br />
&nbsp;&nbsp; &nbsp;float:left;<br />
&nbsp;&nbsp; &nbsp;padding:0px 1px 0px 0px;<br />
&nbsp;&nbsp; &nbsp;margin:0px 0px 0px 10px;<br />
}</div>
<p>
Now we set the height of the ul tag to match the height applied to the &quot;#-main-nav&quot; container whilst also applying the nav divider (bar) image as the background of the ul, positioning it to the right hand side.&nbsp; Finally we float the ul left which gives a cross browse effect of width auto and pad the right hand side by 1px (This will allow room for the nav divider to show).</p>
<div class="code">#main-nav li{<br />
&nbsp;&nbsp; &nbsp;height:29px;<br />
&nbsp;&nbsp; &nbsp;line-height:29px;<br />
&nbsp;&nbsp; &nbsp;display:inline;<br />
&nbsp;&nbsp; &nbsp;position:relative;<br />
&nbsp;&nbsp; &nbsp;float:left;<br />
&nbsp;&nbsp; &nbsp;width:80px;<br />
&nbsp;&nbsp; &nbsp;text-align:center;<br />
}</div>
<p>
Next we set the height and width of the li tag and float it left forcing each li tag to sit inline with each other.&nbsp; In this example the width is fixed to 80px but this is very much up to you and your design.&nbsp;&nbsp; A line-height si also set to equal the applied height forcing the text to vertically align to the middle.</p>
<div class="code">#main-nav li a{<br />
&nbsp;&nbsp; &nbsp;height:29px;<br />
&nbsp;&nbsp; &nbsp;width:80px;<br />
&nbsp;&nbsp; &nbsp;text-align:center;<br />
&nbsp;&nbsp; &nbsp;float:left;<br />
&nbsp;&nbsp; &nbsp;background-image:url(../images/nav-bar.gif);<br />
&nbsp;&nbsp; &nbsp;background-position:left;<br />
&nbsp;&nbsp; &nbsp;background-repeat:no-repeat;<br />
}</div>
<p>
Now we need to style the &quot;a&quot; tag itself.&nbsp; Again it has been given the same width and height as the li tag and floated left.&nbsp; This makes sure the whole navigation item is clickable as well as to remove unwanted margins in IE 6.&nbsp; Next the nav divider (bar) image is added to each &quot;a&quot; tag to complete the dividing pipes look.</p>
<div class="code">#main-nav li a:link,<br />
#main-nav li a:visited{<br />
&nbsp;&nbsp; &nbsp;color:#FFFFFF;<br />
&nbsp;&nbsp; &nbsp;text-decoration:none;<br />
}</p>
<p>#main-nav li.active a,<br />
#main-nav li a:hover{<br />
&nbsp;&nbsp; &nbsp;background-image:url(../images/active.gif);<br />
&nbsp;&nbsp; &nbsp;background-repeat:no-repeat;<br />
&nbsp;&nbsp; &nbsp;background-position:left;<br />
}</div>
<p>
Finally we need to add the link styling and active/hover states.&nbsp; The text colour is set to white and link underline removed for all &quot;a&quot; tags and we apply the active image to the active class and &quot;a&quot; tag hover state.</p>
<p>Now all you need to do is check it out in your browser.&nbsp; Enjoy..</p>
<h3>demo</h3>
<p>Check out the <a href="http://www.andrewsellick.com/examples/vista-menu/">CSS Vista Menu Demo</a> for yourself.</p>
<h3>download</h3>
<p><a href="http://www.andrewsellick.com/examples/vista-menu/vista-menu.rar" target="_blank">Download the CSS Vista Menu</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewsellick.com/94/advance-vista-styled-css-menu/feed</wfw:commentRss>
		</item>
		<item>
		<title>Simple 3D JavaScript Engine</title>
		<link>http://www.andrewsellick.com/76/simple-3d-javascript-engine</link>
		<comments>http://www.andrewsellick.com/76/simple-3d-javascript-engine#comments</comments>
		<pubDate>Tue, 06 Nov 2007 15:21:06 +0000</pubDate>
		<dc:creator>andy</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.andrewsellick.com/76/simple-3d-javascript-engine</guid>
		<description><![CDATA[Carrying on from the theme of developing 3d effects in JavaScript I decided to keep researching flash examples and tutorials, trying to recode them into JavaScript.  I was then pointed to another really handy website that has some superb flash examples.
Kirupa had one demo in particular that I wanted to see if I could [...]]]></description>
			<content:encoded><![CDATA[<p>Carrying on from the theme of developing 3d effects in JavaScript I decided to keep researching flash examples and tutorials, trying to recode them into JavaScript.  I was then pointed to another really handy website that has some superb flash examples.</p>
<p><a target="_blank" href="http://www.kirupa.com/developer/actionscript/shape_camera.htm">Kirupa</a> had one demo in particular that I wanted to see if I could emulate called Scripting 3D in Flash.  This example showed how to create a camera movement in flash giving a feeling of perspective.</p>
<p>Having looked at the code I decided this was most definitely possible in JavaScript and here&rsquo;s what I came up with&hellip;</p>
<h3>code</h3>
<h4>HTML</h4>
<p>The HTML as seen below is pretty simplistic.&nbsp; Firstly we have a sceneContainer that wraps the whole 3D Engine, then we have a scene3D container which acts very much as a view for the the engine as will be described below and finally we have the individual images within the scene, each with an id allowing individual styling.</p>
<div class="code">&lt;div id=&quot;sceneContainer&quot;&gt;<br />
&nbsp;&nbsp; &nbsp;&lt;div id=&quot;scene3d&quot;&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;img src=&quot;director.png&quot; id=&quot;joe&quot; /&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;img src=&quot;director.png&quot; id=&quot;joe2&quot; /&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;img src=&quot;director.png&quot; id=&quot;joe3&quot; /&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;img src=&quot;director.png&quot; id=&quot;joe4&quot; /&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;img src=&quot;director.png&quot; id=&quot;joe5&quot; /&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;img src=&quot;director.png&quot; id=&quot;joe6&quot; /&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;img src=&quot;director.png&quot; id=&quot;joe7&quot; /&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;img src=&quot;director.png&quot; id=&quot;joe8&quot; /&gt;<br />
&nbsp;&nbsp; &nbsp;&lt;/div&gt;<br />
&lt;/div&gt;</div>
<h4>CSS</h4>
<p>The CSS details simple styling for the engine.&nbsp; Points to note are as follows:</p>
<ul>
<li>sceneContainer has a fixed width/height and an overflow of hidden.&nbsp; This allows us to mask the images as they move back and forth in perspective.</li>
<li>Next we have the scene3D positioned absolutely with a width of 100% of it&#8217;s container (sceneContainer).&nbsp; This allows for easy resizing and positioning of the container within the sceneContainer. 
    </li>
<li>Finally we have styles for each individual image within the containers.&nbsp; This allows us to position all the images within the scene3d container.</li>
</ul>
<div class="code">#sceneContainer{<br />
&nbsp;&nbsp; &nbsp;border:1px solid #CCCCCC;<br />
&nbsp;&nbsp; &nbsp;position:absolute;<br />
&nbsp;&nbsp; &nbsp;width:800px;<br />
&nbsp;&nbsp; &nbsp;height:500px;<br />
&nbsp;&nbsp; &nbsp;overflow:hidden;<br />
}</p>
<p>#scene3d{<br />
&nbsp;&nbsp; &nbsp;position:absolute;<br />
&nbsp;&nbsp; &nbsp;left:0%;<br />
&nbsp;&nbsp; &nbsp;width:100%;<br />
}</p>
<p>#joe{<br />
&nbsp;&nbsp; &nbsp;position:absolute;<br />
&nbsp;&nbsp; &nbsp;left:0px;<br />
}</p>
<p>#joe2{<br />
&nbsp;&nbsp; &nbsp;position:absolute;<br />
&nbsp;&nbsp; &nbsp;right:0px;<br />
}</p>
<p>#joe3{<br />
&nbsp;&nbsp; &nbsp;position:absolute;<br />
&nbsp;&nbsp; &nbsp;left:25%;<br />
}</p>
<p>#joe4{<br />
&nbsp;&nbsp; &nbsp;position:absolute;<br />
&nbsp;&nbsp; &nbsp;right:25%;<br />
}</p>
<p>#joe5{<br />
&nbsp;&nbsp; &nbsp;position:absolute;<br />
&nbsp;&nbsp; &nbsp;left:50%;<br />
}</p>
<p>#joe6{<br />
&nbsp;&nbsp; &nbsp;position:absolute;<br />
&nbsp;&nbsp; &nbsp;right:50%;<br />
}</p>
<p>#joe7{<br />
&nbsp;&nbsp; &nbsp;position:absolute;<br />
&nbsp;&nbsp; &nbsp;left:75%;<br />
}</p>
<p>#joe8{<br />
&nbsp;&nbsp; &nbsp;position:absolute;<br />
&nbsp;&nbsp; &nbsp;right:75%;<br />
}</div>
<h4>JavaScript</h4>
<p>Lastly we have the JavaScript.&nbsp; This is strongly based on the kirupa example and works by looping through the images included in the scene and scaling them based on the variables set in the movie.&nbsp; To achieve the effect of the images zooming in and out we also have to scale and reposition  the scene3D container at the same time hiding the overflow within the sceneContainer.</p>
<p>Have a play about with the variables to get to grips with how they control the effect and more over, have fun!</p>
<div class="code">var sceneContainer = document.getElementById(&#8217;sceneContainer&#8217;);<br />
var scene3d = document.getElementById(&#8217;scene3d&#8217;);</p>
<p>x = 0;<br />
y = 100;<br />
z = 300;</p>
<p>cameraView = new Object();<br />
cameraView.x = 0;<br />
cameraView.y = 0;<br />
cameraView.z = 500;</p>
<p>focalLength = 300;</p>
<p>dir = -1;<br />
speed = 20;</p>
<p>backAndForth = function(){<br />
&nbsp;&nbsp; &nbsp;cameraView.z += speed*dir;<br />
&nbsp;&nbsp; &nbsp;if (cameraView.z &gt; 500){<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;cameraView.z = 500;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;dir = -1;<br />
&nbsp;&nbsp; &nbsp;}else if (cameraView.z &lt; 0){<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;cameraView.z = 0;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;dir = 1;<br />
&nbsp;&nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;var sprites = scene3d.getElementsByTagName(&#8217;img&#8217;);<br />
&nbsp;&nbsp; &nbsp;var spritesLength = sprites.length;<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;var scaleRatio = focalLength/(focalLength + z - cameraView.z);<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;for( var i = 0; i &lt; spritesLength; i++ ){<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var sprite = sprites[i];<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;sprite.style.top = ((y - cameraView.y) * scaleRatio)+&#8217;px&#8217;;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;sprite.style.width = sprite.style.height = (100 * scaleRatio)+&#8217;px&#8217;;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;scene3d.style.width = (100 * scaleRatio)+&#8217;%';<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;scene3d.style.left = &#8216;50%&#8217;;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;scene3d.style.marginLeft = &#8216;-&#8217;+(100 * scaleRatio)/2+&#8217;%';<br />
&nbsp;&nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;<br />
};<br />
setInterval(&#8217;backAndForth()&#8217;, 30);</div>
<h3>demo</h3>
<p>Have a look at the <a target="_blank" href="http://www.andrewsellick.com/examples/simple-3d-engine/">Simple 3D JavaScript Engine Demo</a>.</p>
<h3>download</h3>
<p>Feel free to download the <a target="_blank" href="http://www.andrewsellick.com/examples/simple-3d-engine/simple-3d-engine.rar">Simple 3D JavaScript Engine Code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewsellick.com/76/simple-3d-javascript-engine/feed</wfw:commentRss>
		</item>
		<item>
		<title>Simple 3D Carousel using Mootools</title>
		<link>http://www.andrewsellick.com/75/simple-3d-carousel-using-mootools</link>
		<comments>http://www.andrewsellick.com/75/simple-3d-carousel-using-mootools#comments</comments>
		<pubDate>Wed, 31 Oct 2007 10:18:10 +0000</pubDate>
		<dc:creator>andy</dc:creator>
		
		<category><![CDATA[Mootools]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.andrewsellick.com/75/simple-3d-carousel-using-mootools</guid>
		<description><![CDATA[After researching a good method to create a 3D Carousel I came across two resources that intrigued me; firstly GOTOANDLEARN.com which provided an amazing flash 3D Carousel tutorial and then the jQuery 3D Carousel.

After having a play about with these two examples for a while it got me in to thinking, &#8220;how easy it would [...]]]></description>
			<content:encoded><![CDATA[<p>After researching a good method to create a 3D Carousel I came across two resources that intrigued me; firstly GOTOANDLEARN.com which provided an amazing flash 3D Carousel tutorial and then the jQuery 3D Carousel.</p>
<p><img width="309" height="122" alt="3D Carousel" src="http://www.andrewsellick.com/wp-content/uploads/Image/small-simple-3d-carousel.png" /></p>
<p>After having a play about with these two examples for a while it got me in to thinking, &ldquo;how easy it would it be to implement a 3D Carousel myself?&ldquo;</p>
<p>Well after carrying out some research and using the two above examples as a foundation I created a basic 3D Carousel.  This example will be the first instalment in which I demonstrate the basic Carousel and further more advanced tutorials will be added at a later date.</p>
<p>So here we go&hellip;</p>
<h3>code</h3>
<h4>html</h4>
<p>As can be seen below the HTML is very simple and consists of a main container wrapping several divs with images inside.&nbsp; That is all that is required at this stage from an html perspective.&nbsp; Obviously the number of images and the images themselves can be changed here.</p>
<div class="code">&lt;div id=&quot;carousel&quot;&gt;<br />
&nbsp;&nbsp; &nbsp;&lt;div&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;images/dreamweaver.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&lt;div&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;images/director.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&lt;div&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;images/flash.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&lt;div&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;images/freehand.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&lt;div&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;images/swf-player.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;&lt;div&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;images/coldfusion.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;<br />
&lt;/div&gt;</div>
<h4>css</h4>
<p>The CSS is also very&nbsp; simple setting the style attributes for the main container as well as the images width and height within each of their containing divs.&nbsp; One point to note would be that the width and height of the carousel container should be edited as desired to meet your needs althoug further editing will be needed below as shown.</p>
<div class="code">&lt;style&gt;</p>
<p>&nbsp;&nbsp; &nbsp;#carousel{<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;background-color:#000000;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;width:700px;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;height:400px;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;position:relative;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;border:1px solid #FFFFFF;<br />
&nbsp;&nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;img{<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;width:100%;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;height:100%;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;border:0px solid #FFFFFF;<br />
&nbsp;&nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp;<br />
&lt;/style&gt;</div>
<h4>JavaScript Variables</h4>
<p>This is where understanding is required to set up the carousel.  baseSpeed is the initial speed of the carousel, the higher the value the faster it will spin, radiusX and radiusY are the horizontal and vertical radiuses of the carousel so adjust these to effectively change the width and height.</p>
<p>centerX and centerY pinpoint the center of the accordion with in the main container.  These will need to be amended if the main containers width and height attributes are amended.</p>
<p>Finally speed is used in conjunction with baseSpeed to set the initial speed of the carousel, although, the speed will be altered depending on the position x of the mouse over the carousel container.</p>
<div class="code">var baseSpeed = 0.05; <br />
var radiusX = 190; <br />
var radiusY = 40; <br />
var centerX = 300; <br />
var centerY = 190;<br />
var speed = 0.3;
</div>
<h3>demo</h3>
<p>Have a look for yourself at the <a target="_blank" href="http://www.andrewsellick.com/examples/3d-carousel/">Simple 3D Carousel demo.</a></p>
<h3>download</h3>
<p>Feel free to download the <a target="_blank" href="http://www.andrewsellick.com/examples/3d-carousel/3d-carousel.rar">Simple 3D Carousel</a>.</p>
<h3>notes</h3>
<p>This is a very basic demo and as such should not be treated as a finished product.&nbsp; I&#8217;m using this article as more of a tutorial to create clear stages between the version above and a far more advanced version that I will release in the not to distant future.</p>
<p>I&#8217;m still looking to further improve the smoothness of the carousel and new features such as automatic image reflection and arrows to manually rotate the carousel will be added in future versions.</p>
<h3>mootools modules</h3>
<p><strong>Core</strong></p>
<ul>
<li>Core</li>
</ul>
<p><strong>Class</strong></p>
<ul>
<li>Class</li>
</ul>
<p><strong>Native<br />
</strong></p>
<ul>
<li>Array</li>
<li>String</li>
<li>Function</li>
<li>Number</li>
<li>Element</li>
</ul>
<p><strong>Element<br />
</strong></p>
<ul>
<li>Element.Event</li>
</ul>
<p><strong>Window<br />
</strong></p>
<ul>
<li>Window.DomReady</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewsellick.com/75/simple-3d-carousel-using-mootools/feed</wfw:commentRss>
		</item>
		<item>
		<title>YAML a HTML/CSS Template Builder</title>
		<link>http://www.andrewsellick.com/68/yaml-a-htmlcss-template-builder</link>
		<comments>http://www.andrewsellick.com/68/yaml-a-htmlcss-template-builder#comments</comments>
		<pubDate>Thu, 04 Oct 2007 13:27:32 +0000</pubDate>
		<dc:creator>andy</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.andrewsellick.com/68/yaml-a-htmlcss-template-builder</guid>
		<description><![CDATA[I was recently pointed in the direction of a very cool online app called YAML (&#34;Yet Another Multicolumn Layout&#34;) Builder.  It&#8217;s an online HTML template builder and I have to say it looks pretty good.  
Now as I am working on a template builder myself I thought a good place to start would [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently pointed in the direction of a very cool online app called <a href="http://builder.yaml.de/" target="_blank">YAML (&quot;Yet Another Multicolumn Layout&quot;) Builder</a>.  It&rsquo;s an online HTML template builder and I have to say it looks pretty good.  </p>
<p>Now as I am working on a template builder myself I thought a good place to start would be by reviewing the YAML builder and to decipher the positives and negatives of the application.  So here we go:</p>
<h3>aesthetics</h3>
<p>It has to be said the builder is very aesthetically pleasing with a simple yet satisfying design and very powerful interactive features allowing drag and drop components to help build the template as required.</p>
<h3>level of detail</h3>
<p>The level of detail at which you can manipulate your desired template is relatively high, however, if your looking to create a very complex template this builder is not for you.  Allowing only 0, 2 or 3 column layouts can be quite restrictive although it does allow you to add &ldquo;column sets&rdquo; to each column to produce a more precise layout, however, this is not always practical.</p>
<p>The ability to add padded content boxes, content elements (such as h1, h2, p, line, ul) and column sets really enhances the template builders appeal and definitely offers novice template builders a firm foundation from which they can build.</p>
<p>The level at which column and site widths can be edited also works very nicely.  The ability to set max and min widths, re-order columns and change the individual column widths add for a satisfying effect.</p>
<h3>conclusion</h3>
<p>It has to be said the YAML builder is well worth a look to see if it meets your needs.  More complex layouts may be a bridge too far for this builder, but I believe with a little extra development this app could be formidable.  It does have a very strong foundation, but I would like to see it support more columns and the integration of rows as well.  Then there is always the prospect of equal height columns to take it in to the exceptional bracket.</p>
<p>A lot to think about when considering my own template builder, but I can definitely use this as a firm benchmark from which I can weigh my own efforts against.</p>
<h3>update</h3>
<p>I have just received an email from Dirk Jesse (YAML Builder Developer) and he added the following to my review with regards to the level of complexity:</p>
<p>&quot;Check out the Subtemplates in the &quot;Add Elements&quot; section. These offer much higher flexibility (eg. columns and rows) and can be combined with the exisiting columns. You can also remove all columns and creatve your layout only with the subtemplates. They even can be nested. So, rather complex layouts are possible too.&quot;</p>
<p>Well I think that just about caps it off.&nbsp; What an awesome app.&nbsp; If anyone uses it let me know how you get on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewsellick.com/68/yaml-a-htmlcss-template-builder/feed</wfw:commentRss>
		</item>
		<item>
		<title>Simple JavaScript Idle State using Prototype</title>
		<link>http://www.andrewsellick.com/67/simple-javascript-idle-state-using-prototype</link>
		<comments>http://www.andrewsellick.com/67/simple-javascript-idle-state-using-prototype#comments</comments>
		<pubDate>Wed, 03 Oct 2007 13:17:29 +0000</pubDate>
		<dc:creator>andy</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Prototype]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.andrewsellick.com/67/simple-javascript-idle-state-using-prototype</guid>
		<description><![CDATA[This is a fairly simple piece of code, however, I decided it was worth putting up on the site for everybody to see.
Anyway the code itself aims to fire a function when there has been no mouse movement for a predefined length of time and reset the count every time the mouse is moved.
code
The code [...]]]></description>
			<content:encoded><![CDATA[<p>This is a fairly simple piece of code, however, I decided it was worth putting up on the site for everybody to see.</p>
<p>Anyway the code itself aims to fire a function when there has been no mouse movement for a predefined length of time and reset the count every time the mouse is moved.</p>
<h3>code</h3>
<p>The code is very simple, therefore, only the JavaScript is worth talking about for this example, so that is going to be the focus of this article.&nbsp; Have a look for yourself below.</p>
<p>Right then here we go:</p>
<h4>JavaScript<br />
</h4>
<div class="code">var idleTime&nbsp;&nbsp; &nbsp;= 5000;<br />
var timeOut&nbsp;&nbsp; &nbsp; = &#8221;;</p>
<p>function init() {<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp;&nbsp; Event.observe(document.body, &#8216;mousemove&#8217;, resetIdle, true);<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; setIdle();<br />
&nbsp;&nbsp;&nbsp; <br />
}</p>
<p>function onIdleFunction(){<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; alert(&#8217;Your browser has been idle for &#8216; + (idleTime/1000) +&#8217; seconds.&#8217;);<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br />
}</p>
<p>function resetIdle(){<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; window.clearTimeout( timeOut );<br />
&nbsp;&nbsp;&nbsp; setIdle();<br />
&nbsp;&nbsp;&nbsp; <br />
}</p>
<p>function setIdle(){<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; timeOut = window.setTimeout( &quot;onIdleFunction()&quot;, idleTime );<br />
&nbsp;&nbsp;&nbsp; <br />
}</p>
<p>Event.observe(window, &#8216;load&#8217;, init, false); 
</div>
<p>
At the top of the code there is a variable called &quot;idleTime&quot;, this variable sets the idle state time (in milliseconds) that the browser mouse be idble for, before firing the function.&nbsp; Change this as you wish.</p>
<p>Next we have the &quot;init&quot; function which is called on page load by an event listener at the bottom of the sample code.&nbsp; This itself sets a mouse move event listener (which resets the idle state when fired) on the document body and also calls the idle state function.</p>
<p>We then have an &quot;onIdleFunction&quot; which is where you put the code you wish to be fired when the page is idle.&nbsp; In this example we&#8217;re just alerting out that the page has been idle.</p>
<p>Finally we have two functions, resetIdle and setIdle, which really do exactly what it says on the tin.&nbsp; The first resets the idle state (on mouse movement) and the second sets the idle state.</p>
<p>Well that&#8217;s about it so have a look for yourself at the demo and code below.</p>
<h3>demo</h3>
<p>Feel free to view the <a target="_blank" href="http://www.andrewsellick.com/examples/idleState/">Simple JavaScript Idle State using Prototype Demo</a>.</p>
<h3>download</h3>
<p>Also please have a look at the <a target="_blank" href="http://www.andrewsellick.com/examples/idleState/idleState.rar">Simple JavaScript Idle State using Prototype Code</a>.</p>
<h3>note</h3>
<p>The Idle State at present only uses mouse movement for detect inactivity.&nbsp; This will be problematic when considering devices that do not have mice (as it will not work), however, the code can be easily adapted to check for other forms of activity.</p>
<p>It is also worth while mentioning that the mouse move event is applied to the document body and therefore you must make sure that the height and width of the body and html are set to 100% for this to work, otherwise the event listener will not work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewsellick.com/67/simple-javascript-idle-state-using-prototype/feed</wfw:commentRss>
		</item>
		<item>
		<title>HTML/CSS Liquid Layout Templates</title>
		<link>http://www.andrewsellick.com/58/htmlcss-liquid-layout-templates</link>
		<comments>http://www.andrewsellick.com/58/htmlcss-liquid-layout-templates#comments</comments>
		<pubDate>Sat, 04 Aug 2007 12:14:53 +0000</pubDate>
		<dc:creator>andy</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.andrewsellick.com/58/htmlcss-liquid-layout-templates</guid>
		<description><![CDATA[I have recently been working on building up a template collection as a base from which I can develop any site.&#160; I have finished off the Liquid layout templates and have decided to include them on my site under the tab layout at the top of the page.
Have a look for yourself at HTML/CSS Liquid [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently been working on building up a template collection as a base from which I can develop any site.&nbsp; I have finished off the Liquid layout templates and have decided to include them on my site under the tab layout at the top of the page.</p>
<p>Have a look for yourself at <a target="_blank" href="http://www.andrewsellick.com/layout-templates/">HTML/CSS Liquid Layout Templates</a> and let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewsellick.com/58/htmlcss-liquid-layout-templates/feed</wfw:commentRss>
		</item>
		<item>
		<title>Masking a Flash Movie in HTML using a DIV</title>
		<link>http://www.andrewsellick.com/46/masking-a-flash-movie-in-html-using-a-div</link>
		<comments>http://www.andrewsellick.com/46/masking-a-flash-movie-in-html-using-a-div#comments</comments>
		<pubDate>Wed, 20 Jun 2007 12:54:56 +0000</pubDate>
		<dc:creator>andy</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Flash Links]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.andrewsellick.com/46/masking-a-flash-movie-in-html-using-a-div</guid>
		<description><![CDATA[This is not something that is required in day to day development, but nether the less is definitely handy to know.
Due to the nature of embedded flash it does not seem possible to &#8220;mask&#8221; it using an overflow hidden on a containing DIV.  This however is not the case.
By simply adding the following parameters [...]]]></description>
			<content:encoded><![CDATA[<p>This is not something that is required in day to day development, but nether the less is definitely handy to know.</p>
<p>Due to the nature of embedded flash it does not seem possible to &ldquo;mask&rdquo; it using an overflow hidden on a containing DIV.  This however is not the case.</p>
<p>By simply adding the following parameters a flash movie can be masked:</p>
<div class="code"> &lt;param name=&quot;wmode&quot; value=&quot;transparent&quot; /&gt;</p>
<p>&lt;embed src=&quot;andrewsellick.swf&quot; quality=&quot;high&quot; wmode=&quot;transparent&quot; pluginspage=&quot;http://www.macromedia.com/go/getflashplayer&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;550&quot; height=&quot;150&quot;&gt;&lt;/embed&gt;
</div>
<p>The wmode parameters bring the flash movie back into the flow of the document and therefore allow it to be treated as if it were for example an image.<br />
<br />
The complete code I have used in the example is as follows:</p>
<h3>code</h3>
<h4>css</h4>
<p></p>
<div class="code"> #flash-mask{<br />
width:30%;<br />
overflow:hidden;<br />
padding:10px 0px;<br />
border:1px solid #cccccc;<br />
}
</div>
<p>The CSS as shown above is very simple and sets a width on a containing DIV to 30% of the page width as well as having an overflow set to hidden.  This will simply demonstrate the effect clearly.</p>
<h4>html</h4>
<div class="code"> &lt;div id=&quot;flash-mask&quot;&gt;<br />
&lt;object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0&quot; width=&quot;550&quot; height=&quot;150&quot;&gt;<br />
&lt;param name=&quot;movie&quot; value=&quot;andrewsellick.swf&quot; /&gt;<br />
&lt;param name=&quot;quality&quot; value=&quot;high&quot; /&gt;<br />
&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot; /&gt; <br />
&lt;embed src=&quot;andrewsellick.swf&quot; quality=&quot;high&quot; wmode=&quot;transparent&quot; pluginspage=&quot;http://www.macromedia.com/go/getflashplayer&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;550&quot; height=&quot;150&quot;&gt;&lt;/embed&gt;<br />
&lt;/object&gt;<br />
&lt;/div&gt;
</div>
<p>As can be seen above there isnothing special here.  Simply a containing DIV with a flash movie embeded and of course the parameters set.<br />
</p>
<h3>example</h3>
<p>Please have a look at the <a target="_blank" href="http://www.andrewsellick.com/examples/flash-mask/">Masking a Flash Movie in HTML using a DIV example.</a></p>
<h3>download</h3>
<p>Feel free to try it out yourself with the <a target="_blank" href="http://www.andrewsellick.com/examples/flash-mask/flash-mask.rar">Masking a Flash Movie in HTML using a DIV download.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewsellick.com/46/masking-a-flash-movie-in-html-using-a-div/feed</wfw:commentRss>
		</item>
		<item>
		<title>Sexy sliding JavaScript side bar menu using mootools</title>
		<link>http://www.andrewsellick.com/35/sexy-sliding-javascript-side-bar-menu-using-mootools</link>
		<comments>http://www.andrewsellick.com/35/sexy-sliding-javascript-side-bar-menu-using-mootools#comments</comments>
		<pubDate>Mon, 30 Apr 2007 12:23:36 +0000</pubDate>
		<dc:creator>andy</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.andrewsellick.com/35/sexy-sliding-javascript-side-bar-menu-using-mootools</guid>
		<description><![CDATA[When trying to conceive ways in which space could be saved on a web page I decided a sliding menu would work well as shown in the images below.

Now for this solution I decided to use mootools due to the smoothness of their effects, however, this could just as easily be developed in script.aculo.us or [...]]]></description>
			<content:encoded><![CDATA[<p>When trying to conceive ways in which space could be saved on a web page I decided a sliding menu would work well as shown in the images below.</p>
<p><img width="447" height="261" src="http://www.andrewsellick.com/wp-content/uploads/Image/side-bar.jpg" alt="Sliding JavaScript side bar menu" /></p>
<p>Now for this solution I decided to use mootools due to the smoothness of their effects, however, this could just as easily be developed in script.aculo.us or other JavaScript libraries.</p>
<h3> code</h3>
<p>The code is very simple and is as follows:</p>
<h4> CSS</h4>
<div class="code">&nbsp;&nbsp;&nbsp; body{<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;position:relative;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;paddign:0px;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;font-size:100%;<br />
&nbsp;&nbsp; &nbsp;}<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp;&nbsp; h2{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; color:#FFFFFF;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font-size:90%;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font-family:arial;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; margin:10px 10px 10px 10px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font-weight:bold;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; h2 span{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font-size:105%;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font-weight:normal;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; ul{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; margin:0px 0px 0px 0px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; padding:0px 0px 0px 0px;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; li{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; margin:0px 10px 3px 10px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; padding:2px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; list-style-type:none;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; display:block;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; background-color:#DA1074;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width:177px;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; li a{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width:100%;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; li a:link,<br />
&nbsp;&nbsp;&nbsp; li a:visited{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; color:#FFFFFF;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font-family:verdana;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font-size:70%;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; text-decoration:none;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; display:block;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; margin:0px 0px 0px 0px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; padding:0px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width:100%;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; li a:hover{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; color:#FFFFFF;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; text-decoration:underline;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; #sideBar{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; position: absolute;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width: auto;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; height: auto;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; top: 200px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; right:-7px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; background-image:url(images/background.gif);<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; background-position:top left;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; background-repeat:repeat-y;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; #sideBarTab{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; float:left;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; height:137px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width:28px;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; #sideBarTab img{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; border:0px solid #FFFFFF;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; #sideBarContents{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; overflow:hidden !important;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; #sideBarContentsInner{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width:200px;<br />
&nbsp;&nbsp;&nbsp; } 
</div>
<h4> HTML</h4>
<div class="code">&lt;div id=&quot;sideBar&quot;&gt;<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; &lt;a href=&quot;#&quot; id=&quot;sideBarTab&quot;&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;img src=&quot;images/slide-button.gif&quot; alt=&quot;sideBar&quot; title=&quot;sideBar&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/a&gt;<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; &lt;div id=&quot;sideBarContents&quot; style=&quot;width:0px;&quot;&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;div id=&quot;sideBarContentsInner&quot;&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;h2&gt;side&lt;span&gt;bar&lt;/span&gt;&lt;/h2&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;ul&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Link One&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Link Two&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Link Three&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Link Four&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Link Five&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/ul&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/div&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/div&gt;<br />
&nbsp;&nbsp;&nbsp; <br />
&lt;/div&gt;
</div>
<p>As shown the code is not overly complex.  The HTML comprises a containing DIV (with an ID of sideBar), then within this we have a linked tab image (with an ID of sideBarTab) followed by the contents of the side bar contained in a DIV (with an ID of sideBarContents) and sub contained within another DIV (with an ID of sideBarContentsInner).</p>
<p>The sideBarContents DIV has an inline style applied setting the width to zero.  This is to allow the JavaScript to resize the region using mootools (Some browsers are a bit buggy when trying to change styles that are set in an external stylesheet).  This DIV is also set to have an overflow hidden producing the effect that the content is sliding in.</p>
<p>Points to note within the CSS include the width set on the sideBarContentsInner DIV.  This width should be adjusted as required to meet your deign requirements (It is set to 200px for the purpose of the demonstration).</p>
<p>Also to reposition the bar simply adjust the postioning styles applied on the sideBar DIV (i.e. right and top).</p>
<p>Finally you will need to include mootools.js and side-bar.js to the head of the document in the order shown for this to work.  Have a play with the demo below and download the code.</p>
<h3> demo</h3>
<p><a href="http://www.andrewsellick.com/examples/sliding-side-bar/" target="_blank"> The sliding JavaScript side bar menu demo</a>.</p>
<h3> pitfalls</h3>
<p>Currently with this version I believe there may be some CSS issues in Safari but as yet I haven&rsquo;t had the time to fully test and fix potential bugs.</p>
<p>The next pitfall to note is the lack of degradability with JavaScript turned off, however, this will be fixed as stated below.</p>
<h3> future</h3>
<p>I am planning to develop a new version of the side bar that will degrade gracefully back into the structure of the site when JavaScript is turned off.  This will provide a more accessible version.</p>
<p>Further improvements include adding a key press event to the tab allowing users without a mouse to produce the same effect (again important for accessibility).</p>
<p>Other considered enhancements include the introduction of multiple tabs.  This would allow for greater &ldquo;storage space&rdquo;, whilst also providing flexibility and scalability.</p>
<h3> download</h3>
<p><a href="http://www.andrewsellick.com/examples/sliding-side-bar/sliding-side-bar.rar" target="_blank"> Download the sliding JavaScript side bar menu</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewsellick.com/35/sexy-sliding-javascript-side-bar-menu-using-mootools/feed</wfw:commentRss>
		</item>
		<item>
		<title>Accessible HTML Forms using Definition Lists</title>
		<link>http://www.andrewsellick.com/31/accessible-html-forms-using-definition-lists</link>
		<comments>http://www.andrewsellick.com/31/accessible-html-forms-using-definition-lists#comments</comments>
		<pubDate>Sun, 22 Apr 2007 18:31:23 +0000</pubDate>
		<dc:creator>andy</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.andrewsellick.com/31/accessible-html-forms-using-definition-lists</guid>
		<description><![CDATA[Having adopted many different techniques for creating accessible html web forms I decided it was about time I standardised my approach to save time and effort.  
The initial focus was on how to structure the form.  Did I use DIVs or unordered lists or possibly definition lists?  Well after much deliberating I [...]]]></description>
			<content:encoded><![CDATA[<p>Having adopted many different techniques for creating accessible html web forms I decided it was about time I standardised my approach to save time and effort.  </p>
<p>The initial focus was on how to structure the form.  Did I use DIVs or unordered lists or possibly definition lists?  Well after much deliberating I came to the conclusion that definition lists were the way to go.  They fit the bill and due their structure can be simply implemented to good effect.</p>
<p>Once that decision was made it was time to get stuck in.</p>
<h3>code</h3>
<p>The basic code structure is nice and simple.&nbsp; Below you can see the definition list (dl) containing a term (dt) and a description (dd).&nbsp; With in the term we store (on the most part - will explain later) the label for the form element with a relevant name.&nbsp; Within the description we addd the form input.</p>
<p>The structure created by this approach is very clean and almost table esc.</p>
<div class="code">&lt;dl&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;dt&gt;&lt;label for=&quot;textbox1&quot;&gt;Textbox 1&lt;/label&gt;&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;dd&gt;&lt;input type=&quot;text&quot; title=&quot;Textbox 1&quot; name=&quot;textbox1&quot; id=&quot;textbox1&quot; /&gt;&lt;/dd&gt;<br />
&lt;/dl&gt; 
</div>
<p>
The above code shows the bare bones, however, as the code below shows we can make things slightly more complex.</p>
<h4>Multiple textboxes</h4>
<p><strong> </strong>Textboxes can be added over multiple lines, or if required on the same line as shown below.</p>
<p><img width="377" height="32" alt="Multiple Textboxes" src="http://www.andrewsellick.com/wp-content/uploads/Image/multiple-textboxs.jpg" /></p>
<div class="code">&lt;dl&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;!&#8211; Multiple textboxes Example Starts &#8211;&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;dt&gt;&lt;label for=&quot;textbox4&quot;&gt;Multiple textboxes&lt;/label&gt;&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;dd&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;text&quot; title=&quot;textbox4&quot; name=&quot;textbox4&quot; id=&quot;textbox4&quot; tabindex=&quot;5&quot; class=&quot;extra-small&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;textbox5&quot; class=&quot;hide&quot;&gt;Month&lt;/label&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;text&quot; title=&quot;textbox5&quot; name=&quot;textbox5&quot; id=&quot;textbox5&quot; tabindex=&quot;9&quot; class=&quot;extra-small&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;textbox6&quot; class=&quot;hide&quot;&gt;Year&lt;/label&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;text&quot; title=&quot;textbox6&quot; name=&quot;textbox6&quot; id=&quot;textbox6&quot; tabindex=&quot;10&quot; class=&quot;extra-small&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;!&#8211; Multiple textboxes Example Finishes &#8211;&gt;<br />
&lt;/dl&gt;  </div>
<h4>Radio Button Lists</h4>
<p>Radio buttons can be applied over multiple lines or across the same line as shown below.</p>
<p><img width="415" height="91" alt="Radio List" src="http://www.andrewsellick.com/wp-content/uploads/Image/radio-list.jpg" /><br />
<strong><br />
</strong></p>
<div class="code">&lt;dl&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;!&#8211; Radio list Example (All on one line) Starts &#8211;&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;dt&gt;Radio List 1&lt;/dt&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;dd&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;radio&quot; title=&quot;Radio 1&quot; name=&quot;radio1&quot; id=&quot;radio1&quot; value=&quot;1&quot; tabindex=&quot;16&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;radio1&quot;&gt;Radio 1&lt;/label&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;radio&quot; title=&quot;Radio 1&quot; name=&quot;radio1&quot; id=&quot;radio2&quot; value=&quot;2&quot; tabindex=&quot;17&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;radio2&quot;&gt;Radio 2&lt;/label&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;radio&quot; title=&quot;Radio 1&quot; name=&quot;radio1&quot; id=&quot;radio3&quot; value=&quot;3&quot; tabindex=&quot;18&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;radio3&quot;&gt;Radio 3&lt;/label&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;!&#8211; Radio list Example (All on one line) Finishes &#8211;&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;!&#8211; Radio list Example (On multiple lines) Starts &#8211;&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;dt&gt;Radio List 2&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;dd&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;radio&quot; title=&quot;Radio 2&quot; name=&quot;radio2&quot; id=&quot;radio4&quot; value=&quot;1&quot; tabindex=&quot;19&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;radio4&quot;&gt;Radio 1&lt;/label&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;br /&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;radio&quot; title=&quot;Radio 2&quot; name=&quot;radio2&quot; id=&quot;radio5&quot; value=&quot;2&quot; tabindex=&quot;20&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;radio5&quot;&gt;Radio 2&lt;/label&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;br /&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;radio&quot; title=&quot;Radio 2&quot; name=&quot;radio2&quot; id=&quot;radio6&quot; value=&quot;3&quot; tabindex=&quot;21&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;radio6&quot;&gt;Radio 3&lt;/label&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;!&#8211; Radio list Example (On multiple lines) Finishes &#8211;&gt;<br />
&lt;/dl&gt; </div>
<h4> Checkboxes</h4>
<p>Checkboxes can also be added over multiple lines or on the same line as shown below.</p>
<p><img width="496" height="105" alt="Checkboxes" src="http://www.andrewsellick.com/wp-content/uploads/Image/check-list.jpg" /></p>
<div class="code">&lt;dl&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;!&#8211; Checkbox Example (All on one line) Starts &#8211;&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;dt&gt;Checkboxes 1&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;dd&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;checkbox&quot; title=&quot;Check 1&quot; name=&quot;check1&quot; id=&quot;check1&quot; tabindex=&quot;8&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;check1&quot;&gt;Answer 1&lt;/label&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;checkbox&quot; title=&quot;Check 2&quot; name=&quot;check2&quot; id=&quot;check2&quot; tabindex=&quot;9&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;check2&quot;&gt;Answer 2&lt;/label&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;checkbox&quot; title=&quot;Check 3&quot; name=&quot;check3&quot; id=&quot;check3&quot; tabindex=&quot;10&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;check3&quot;&gt;Answer 3&lt;/label&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;checkbox&quot; title=&quot;Check 4&quot; name=&quot;check4&quot; id=&quot;check4&quot; tabindex=&quot;11&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;check4&quot;&gt;Answer 4&lt;/label&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;!&#8211; Checkbox Example (All on one line) Finishes &#8211;&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;!&#8211; Checkbox Example (On multiple lines) Starts &#8211;&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;dt&gt;Checkboxes 2&lt;/dt&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;dd&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;checkbox&quot; title=&quot;Check 5&quot; name=&quot;check5&quot; id=&quot;check5&quot; tabindex=&quot;12&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;check5&quot;&gt;Answer 1&lt;/label&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;br /&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;checkbox&quot; title=&quot;Check 6&quot; name=&quot;check6&quot; id=&quot;check6&quot; tabindex=&quot;13&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;check6&quot;&gt;Answer 2&lt;/label&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;br /&gt;</p>
<p>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;checkbox&quot; title=&quot;Check 7&quot; name=&quot;check7&quot; id=&quot;check7&quot; tabindex=&quot;14&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;check7&quot;&gt;Answer 3&lt;/label&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;br /&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;input type=&quot;checkbox&quot; title=&quot;Check 8&quot; name=&quot;check8&quot; id=&quot;check8&quot; tabindex=&quot;15&quot; /&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;label for=&quot;check8&quot;&gt;Answer 4&lt;/label&gt; <br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/dd&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;!&#8211; Checkbox Example (On multiple lines) Finishes &#8211;&gt;<br />
&lt;/dl&gt; </div>
<h4> CSS</h4>
<p>The CSS is very simple and simply lays out the form but does not apply any sexy formating - I&#8217;m a developer not a designer <img src='http://www.andrewsellick.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Firstly we have the basic form element styles:</p>
<div class="code"> /***************** Forms Styles Start ****************/<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; form{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; margin:0px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; padding:0px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font-family:arial;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font-size:70%;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; form input,<br />
&nbsp;&nbsp;&nbsp; form select,<br />
&nbsp;&nbsp;&nbsp; form textarea{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font-size:110%;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font-family:arial;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; form textarea{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; height:100px;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; form fieldset{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; border:1px solid #CCCCCC;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; margin:0px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; padding:10px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; display:block;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; form legend{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; color:#666666;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; margin:0px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; padding:0px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font-family:arial;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font-size:130%;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; padding:0px 0px 0px 0px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; *margin:0px 0px 0px -6px;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /**************** Forms Styles Finish ****************/ </div>
<p>
These styles provide very basic formating for form elements and can be changed as required.</p>
<p>Next we have the list styles.&nbsp; These are used to provide the form with its structure and positioning.</p>
<div class="code"> /**************** List Styles Start ******************/<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; form dl{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; margin:15px 0px 0px 0px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; padding:0px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width:auto;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; clear:both;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; form dt{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; float:left;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width:200px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; margin:0px 0px 5px 0px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; color:#000000;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font-size:110%;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; form dd{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; margin:0px 0px 10px 200px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; color:#666666;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; _text-indent:-3px !important;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; form dd label{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vertical-align:top;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; *vertical-align:baseline;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; margin:0px 8px 0px 0px;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; line-height:1.6em;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /**************** List Styles Finish *****************/ </div>
<p>
Finally we have some generic styles to apply width formating to form elements.</p>
<div class="code"> /*************** General Styles Start ****************/<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; .extra-small{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width:50px;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; select.extra-small{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width:55px;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; .small{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width:150px;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; select.small{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width:155px;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; .medium{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width:250px;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; select.medium{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width:255px;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; .large{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width:350px;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; select.large{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; width:355px;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; .hide{<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; display:none;<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; /*************** General Styles Finish ***************/ </div>
<p>These classes areapplied to individual form elements to give consistent widths and structure cross browser.&nbsp; Again these can be changed as required to meet the individual needs.</p>
<p>Thats about it.&nbsp; Check out the demo below and download the files to include the code in your site.&nbsp; The code does validate to XHTML 1.0 transitional, however, I have included a couple of workarounds (*cough* hacks) to the css to keep consistancy across browser.&nbsp; </p>
<p>The code also meets the WAI priority two checkpoint and only fails on priority three as there is no placeholder text within the form elements themselves.</p>
<h3>demo</h3>
<p><a href="http://www.andrewsellick.com/examples/accessible-form/" target="_blank">Accessible HTML Forms using Definition Lists demo</a>.</p>
<h3>download</h3>
<p><a href="http://www.andrewsellick.com/examples/accessible-form/accessible-form.rar" target="_blank">Accessible HTML Forms using Definition Lists download</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewsellick.com/31/accessible-html-forms-using-definition-lists/feed</wfw:commentRss>
		</item>
		<item>
		<title>CSS Table of Contents using Ordered Lists</title>
		<link>http://www.andrewsellick.com/25/css-table-of-contents-using-ordered-lists</link>
		<comments>http://www.andrewsellick.com/25/css-table-of-contents-using-ordered-lists#comments</comments>
		<pubDate>Tue, 03 Apr 2007 23:12:35 +0000</pubDate>
		<dc:creator>andy</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.andrewsellick.com/25/css-table-of-contents-using-ordered-lists</guid>
		<description><![CDATA[Having read Oli Warners post on ThePCSpy.com about a CSS Table of Contents I decided to knock up a quick demo myself with some fairly good results.  

the code
The CSS for this is fairlty simple and is as follows:
#document ol{
&#160;&#160; &#160;margin:0px 0px 0px 25px;
&#160;&#160; &#160;padding:0px 0px 9px 0px;&#160;&#160; &#160;
}
#document ol ol{
&#160;&#160; &#160;margin:0px 0px 0px [...]]]></description>
			<content:encoded><![CDATA[<p>Having read Oli Warners post on ThePCSpy.com about a <a href="http://www.thepcspy.com/articles/webdev/css_table_of_contents" target="_blank">CSS Table of Contents</a> I decided to knock up a quick demo myself with some fairly good results.  </p>
<p><img width="465" height="245" src="http://www.andrewsellick.com/wp-content/uploads/Image/toc.gif" alt="CSS Table of Contents Example" title="CSS Table of Contents Example" /></p>
<h3>the code</h3>
<p>The CSS for this is fairlty simple and is as follows:</p>
<div class="code">#document ol{<br />
&nbsp;&nbsp; &nbsp;margin:0px 0px 0px 25px;<br />
&nbsp;&nbsp; &nbsp;padding:0px 0px 9px 0px;&nbsp;&nbsp; &nbsp;<br />
}</p>
<p>#document ol ol{<br />
&nbsp;&nbsp; &nbsp;margin:0px 0px 0px 50px;&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;list-style:lower-roman;<br />
}</p>
<p>#document ol ol ol{<br />
&nbsp;&nbsp; &nbsp;margin:0px 0px 0px 75px;<br />
&nbsp;&nbsp; &nbsp;list-style:lower-alpha;<br />
}</p>
<p>li{<br />
&nbsp;&nbsp; &nbsp;position:relative;&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp; &nbsp;margin:5px 0px 0px 0px;<br />
}</p>
<p>li span{<br />
&nbsp;&nbsp; &nbsp;position:absolute;<br />
&nbsp;&nbsp; &nbsp;right:0px;<br />
}</p>
<p>li a:link,<br />
li a:visited{<br />
&nbsp;&nbsp; &nbsp;cursor:pointer;<br />
&nbsp;&nbsp; &nbsp;border-bottom:1px dashed #CCCCCC;<br />
&nbsp;&nbsp; &nbsp;display:block;<br />
&nbsp;&nbsp; &nbsp;width:100%;<br />
&nbsp;&nbsp; &nbsp;height:1.1em;<br />
&nbsp;&nbsp; &nbsp;margin-right:-20px;<br />
&nbsp;&nbsp; &nbsp;text-decoration:none;<br />
}</p>
<p>li a:hover{<br />
&nbsp;&nbsp; &nbsp;border-bottom:1px solid #CCCCCC;<br />
}</div>
<p>
As can be seen in the CSS above I am simply styling ordered list items and the a tags within in side them as I see fit.&nbsp; The effect this generates can be seen below.</p>
<p>The HTML is as follows:</p>
<div class="code"> &lt;div id=&quot;document&quot;&gt;<br />
&nbsp;&nbsp;&nbsp; <br />
&nbsp;&nbsp;&nbsp; &lt;ol class=&quot;toc&quot;&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;li&gt;&lt;a href=&quot;#introduction&quot;&gt;Introduction &lt;span&gt;Page 1&lt;/span&gt;&lt;/a&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;ol&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;li&gt;&lt;a href=&quot;#subtitle1&quot;&gt;Subtitle 1 &lt;span&gt;Page 1&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;li&gt;&lt;a href=&quot;#subtitle2&quot;&gt;Subtitle 2 &lt;span&gt;Page 1&lt;/span&gt;&lt;/a&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;ol&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;li&gt;&lt;a href=&quot;#subtitle3&quot;&gt;Subtitle 3 &lt;span&gt;Page 1&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/ol&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/li&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/ol&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/li&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;li&gt;&lt;a href=&quot;#experiment&quot;&gt;Experiment &lt;span&gt;Page 2&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;li&gt;&lt;a href=&quot;#conclusion&quot;&gt;Conclusion &lt;span&gt;Page 3&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;li&gt;&lt;a href=&quot;#discussion&quot;&gt;Discussion &lt;span&gt;Page 4&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/ol&gt; <br />
&lt;/div&gt;
</div>
<p>
Again the HTML as shown above is very simple and simply structures nested ordered lists as required for the table of contents.</p>
<h3>demo</h3>
<p>This is the <a target="_blank" href="http://www.andrewsellick.com/examples/toc/toc.html">CSS Table of Contents using Ordered Lists demo</a>.</p>
<h3>extending the demo<br />
</h3>
<p>I then thought of extending this slightly with the following demo to produce an actual document.&nbsp; Notice in print preview mode each page is defined when an hr tag finishes using the <strong>page-break-after: always;</strong> CSS attribute.</p>
<p>Here it is the <a target="_blank" href="http://www.andrewsellick.com/examples/toc/">CSS Table of Contents within a document demo</a>.</p>
<p>P.S. This is valid XHTML&nbsp; <img src='http://www.andrewsellick.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.andrewsellick.com/25/css-table-of-contents-using-ordered-lists/feed</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.444 seconds -->
