<?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>Andrew Bellamy &#187; code</title>
	<atom:link href="http://www.andrew-bellamy.co.uk/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.andrew-bellamy.co.uk</link>
	<description></description>
	<lastBuildDate>Tue, 22 Jun 2010 16:45:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Value Object Class</title>
		<link>http://www.andrew-bellamy.co.uk/2010/06/value-object-class/</link>
		<comments>http://www.andrew-bellamy.co.uk/2010/06/value-object-class/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 23:00:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.andrew-bellamy.co.uk/?p=178</guid>
		<description><![CDATA[Value class that hold values. Can be used with any class that returns an array of values Usage]]></description>
			<content:encoded><![CDATA[<p>Value class that hold values.  Can be used with any class that returns an array of values</p>
<h4>Usage</h4</p>
<pre class="brush: php;">
$temp = new ValueObject(
			array(
				&quot;value1&quot; =&gt; &quot;value&quot;,
				&quot;value2&quot; =&gt; 2,
				&quot;value3&quot; =&gt; 123.123,
				&quot;value4&quot; =&gt; &quot;value&quot;
			)
		);
echo $temp-&gt;value1;
</pre>
<h4>Code</h4>
<pre class="brush: php;">
class ValueObject {

	private $properties = array();

	public function __construct($values = array()) {
		foreach($values as $key =&gt; $value)
			$this-&gt;properties[$key] = $value;
	}

	public function __set($key = &quot;&quot;, $value = &quot;&quot;) {
		$this-&gt;properties[$key] = $value;
	}

	public function __get($key = &quot;&quot;) {
		if(array_key_exists($key, $this-&gt;properties))
			return $this-&gt;properties[$key];
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.andrew-bellamy.co.uk/2010/06/value-object-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Class</title>
		<link>http://www.andrew-bellamy.co.uk/2010/06/mysql-class/</link>
		<comments>http://www.andrew-bellamy.co.uk/2010/06/mysql-class/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 23:00:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.andrew-bellamy.co.uk/?p=170</guid>
		<description><![CDATA[Class that interacts with MySQL, performing INSERT, UPDATE, DELETE and SELECT, at the moment Usage $single = &#34;&#34;; $multi =&#160;[<a href="http://www.andrew-bellamy.co.uk/2010/06/mysql-class/">Read the Rest</a>]]]></description>
			<content:encoded><![CDATA[<p>Class that interacts with MySQL, performing INSERT, UPDATE, DELETE and SELECT, at the moment</p>
<h4>Usage</h4>
<pre class="brush: php;">
$single = &quot;&quot;;
$multi = array();

$mySQL = new MySQL(
			array(
				&quot;Server&quot; =&gt; &quot;localhost&quot;,
				&quot;Username&quot; =&gt; &quot;Username&quot;,
				&quot;Password&quot; =&gt; &quot;Password&quot;,
				&quot;Database&quot; =&gt; &quot;Database&quot;
			)
		);

/* Without Errors or use above
$mySQL = new MySQL(
			array(
				&quot;Server&quot; =&gt; &quot;localhost&quot;,
				&quot;Username&quot; =&gt; &quot;Username&quot;,
				&quot;Password&quot; =&gt; &quot;Password&quot;,
				&quot;Database&quot; =&gt; &quot;Database&quot;
			),
			false
		);
*/

/* With Errors
$mySQL = new MySQL(
			array(
				&quot;Server&quot; =&gt; &quot;localhost&quot;,
				&quot;Username&quot; =&gt; &quot;Username&quot;,
				&quot;Password&quot; =&gt; &quot;Password&quot;,
				&quot;Database&quot; =&gt; &quot;Database&quot;
			),
			true
		);
*/

$mySQL-&gt;open();
$mySQL-&gt;selectWhere(&quot;TableName&quot;, null, array(&quot;id&quot; =&gt; 1));
while($row = $mySQL-&gt;results()) {
	$single = new ValueObject($row);
	$single-&gt;toString();
}
$mySQL-&gt;close();

$mySQL-&gt;open();
$mySQL-&gt;select(&quot;TableName&quot;);
while($row = $mySQL-&gt;results())
	$multi[] = new ValueObject($row);

$mySQL-&gt;close();

for($a = 0; $a &lt; sizeof($multi); $a++)
	$multi[$a]-&gt;toString();

$mySQL-&gt;open();
$mySQL-&gt;insert(&quot;TableName&quot;, array(&quot;value1&quot; =&gt; 789, &quot;value2&quot; =&gt; &quot;TEST6&quot;, &quot;value3&quot; =&gt; &quot;2010-06-19&quot;, &quot;value4&quot; =&gt; 6));
$mySQL-&gt;close();

$mySQL-&gt;open();
$mySQL-&gt;update(&quot;TableName&quot;, array(&quot;value1&quot; =&gt; 789, &quot;value2&quot; =&gt; &quot;TEST3&quot;, &quot;value3&quot; =&gt; &quot;2010-06-18&quot;, &quot;value4&quot; =&gt; 3), array(&quot;id&quot; =&gt; 3));
$mySQL-&gt;close();

$mySQL-&gt;open();
$mySQL-&gt;delete(&quot;TableName&quot;, array(&quot;id&quot; =&gt; 3));
$mySQL-&gt;close()
</pre>
<h4>Code</h4>
<pre class="brush: php;">
class MySQL {

	private $properties = array(
					&quot;ConnectionProperties&quot; =&gt; array(
										&quot;Server&quot; =&gt; null,
										&quot;Username&quot; =&gt; null,
										&quot;Password&quot; =&gt; null,
										&quot;Database&quot; =&gt; null
									),
					&quot;Connection&quot; =&gt; null,
					&quot;Result&quot; =&gt; null,
					&quot;InsertID&quot; =&gt; null,
					&quot;Error&quot; =&gt; array(
									&quot;SetError&quot; =&gt; false
								)
					);

	public function __construct($values = array(), $error = false) {
		foreach($values as $key =&gt; $value)
			$this-&gt;properties[&quot;ConnectionProperties&quot;][$key] = $value;

		$this-&gt;properties[&quot;Error&quot;][&quot;SetError&quot;] = $error;
	}

	public function __set($key = &quot;&quot;, $value = &quot;&quot;) {
		$this-&gt;properties[$key] = $value;
	}

	public function __get($key = &quot;&quot;) {
		if(array_key_exists($key, $this-&gt;properties))
			return $this-&gt;properties[$key];
	}

	public function open() {
		$this-&gt;properties[&quot;Connection&quot;] = mysql_connect($this-&gt;properties[&quot;ConnectionProperties&quot;][&quot;Server&quot;], $this-&gt;properties[&quot;ConnectionProperties&quot;][&quot;Username&quot;], $this-&gt;properties[&quot;ConnectionProperties&quot;][&quot;Password&quot;]);
		if(!$this-&gt;properties[&quot;Connection&quot;]) {
			$this-&gt;error();
		} else
			mysql_select_db($this-&gt;properties[&quot;ConnectionProperties&quot;][&quot;Database&quot;], $this-&gt;properties[&quot;Connection&quot;]);
	}

	public function close() {
		if(mysql_insert_id($this-&gt;properties[&quot;Connection&quot;]) != 0 || mysql_insert_id($this-&gt;properties[&quot;Connection&quot;]) != null || mysql_insert_id($this-&gt;properties[&quot;Connection&quot;]) != false)
			if($this-&gt;properties[&quot;Result&quot;]) {
				mysql_free_result($this-&gt;properties[&quot;Result&quot;]);
				$this-&gt;properties[&quot;Result&quot;] = null;
			}

		mysql_close($this-&gt;properties[&quot;Connection&quot;]);
	}

	public function select($table = null, $columns = null, $condition = array()) {
		$conditionSize = sizeof($condition);
		$columnSize = sizeof($columns);
		$a = 0;
		$column = &quot;&quot;;
		$where = &quot;&quot;;

		if($columns == null) {
			$column .= &quot;*&quot;;
		} else {
			for($a = 0; $a &lt; $columnSize; $a++) {
				if($a &lt; ($columnSize - 1))
					$column .= $columns[$a].&quot;, &quot;;
				else
					$column .= $columns[$a];
			}
		}

		if($condition == null)
			$where .= &quot; &quot;;
		else {
			$where .= &quot; WHERE &quot;;
			foreach ($condition as $key =&gt; $value) {
				if(is_numeric($value)) {
					if($a == ($conditionSize - 1))
						$where .= $key.' = '.$value;
					else
						$where .= $key.' = '.$value.' AND ';
				} else {
					if($a == ($conditionSize - 1))
						$where .= $key.&quot; = '&quot;.$value.&quot;'&quot;;
					else
						$where .= $key.&quot; = '&quot;.$value.&quot;' AND &quot;;
				}
				$a++;
			}
		}

		if(!$this-&gt;properties[&quot;Result&quot;] = mysql_query(&quot;SELECT &quot;.$column.&quot; FROM &quot;.$table.$where, $this-&gt;properties[&quot;Connection&quot;])) {
			$this-&gt;error();
		}
	}

	public function insert($table = &quot;&quot;, $values = array()) {
		$size = sizeof($values);
		$columns = &quot;&quot;;
		$temp = &quot;&quot;;

		$a = 0;
		foreach ($values as $key =&gt; $value) {
			if($a == ($size - 1))
				$columns .= $key;
			else
				$columns .= $key.', ';

			$a++;
		}

		$a = 0;
		foreach ($values as $key =&gt; $value) {
			if(is_numeric($value)) {
				if($a == ($size - 1))
					$temp .= $value;
				else
					$temp .= $value.', ';
			} else {
				if($a == ($size - 1))
					$temp .= &quot;'&quot;.$value.&quot;'&quot;;
				else
					$temp .= &quot;'&quot;.$value.&quot;', &quot;;
			}
			$a++;
		}

		if(!$this-&gt;properties[&quot;Result&quot;] = mysql_query(&quot;INSERT INTO &quot;.$table.&quot; (&quot;.$columns.&quot;) VALUES (&quot;.$temp.&quot;)&quot;, $this-&gt;properties[&quot;Connection&quot;])) {
			$this-&gt;error();
		} else
			$this-&gt;properties[&quot;InsertID&quot;] = mysql_insert_id($this-&gt;properties[&quot;Connection&quot;]);
	}

	public function update($table = &quot;&quot;, $values = array(), $condition = array()) {
		$size = sizeof($values);
		$conditionSize = sizeof($condition);
		$temp = &quot;&quot;;

		$a = 0;
		foreach ($values as $key =&gt; $value) {
			if(is_numeric($value)) {
				if($a == ($size - 1))
					$temp .= $key.&quot; = &quot;.$value;
				else
					$temp .= $key.&quot; = &quot;.$value.', ';
			} else {
				if($a == ($size - 1))
					$temp .= $key.&quot; = &quot;.&quot;'&quot;.$value.&quot;'&quot;;
				else
					$temp .= $key.&quot; = &quot;.&quot;'&quot;.$value.&quot;', &quot;;
			}
			$a++;
		}

		$where = &quot; WHERE &quot;;
		$a = 0;
		foreach ($condition as $key =&gt; $value) {
			if(is_numeric($value)) {
				if($a == ($conditionSize - 1))
					$where .= $key.' = '.$value;
				else
					$where .= $key.' = '.$value.' AND ';
			} else {
				if($a == ($conditionSize - 1))
					$where .= $key.&quot; = '&quot;.$value.&quot;'&quot;;
				else
					$where .= $key.&quot; = '&quot;.$value.&quot;' AND &quot;;
			}
			$a++;
		}
		if(!$this-&gt;properties[&quot;Result&quot;] = mysql_query(&quot;UPDATE &quot;.$table.&quot; SET &quot;.$temp.$where, $this-&gt;properties[&quot;Connection&quot;])) {
			$this-&gt;error();
		}
	}

	public function delete($table = &quot;&quot;, $condition = array()) {
		$conditionSize = sizeof($condition);
		$where = &quot; WHERE &quot;;
		$a = 0;

		foreach ($condition as $key =&gt; $value) {
			if(is_numeric($value)) {
				if($a == ($conditionSize - 1))
					$where .= $key.' = '.$value;
				else
					$where .= $key.' = '.$value.' AND ';
			} else {
				if($a == ($conditionSize - 1))
					$where .= $key.&quot; = '&quot;.$value.&quot;'&quot;;
				else
					$where .= $key.&quot; = '&quot;.$value.&quot;' AND &quot;;
			}
			$a++;
		}

		if(!$this-&gt;properties[&quot;Result&quot;] = mysql_query(&quot;DELETE FROM &quot;.$table.$where, $this-&gt;properties[&quot;Connection&quot;])) {
			$this-&gt;error();
		}
	}

	public function results() {
		return mysql_fetch_object($this-&gt;properties[&quot;Result&quot;]);
	}

	private function error() {
		if($this-&gt;properties[&quot;Error&quot;][&quot;SetError&quot;])
			echo &quot;MySQL Error: (&quot;. mysql_errno().&quot;) &quot;.mysqlerror().&quot;&lt;br /&gt;&quot;;
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.andrew-bellamy.co.uk/2010/06/mysql-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>my menu</title>
		<link>http://www.andrew-bellamy.co.uk/2010/05/my-menu/</link>
		<comments>http://www.andrew-bellamy.co.uk/2010/05/my-menu/#comments</comments>
		<pubDate>Tue, 18 May 2010 11:51:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[xHTML]]></category>

		<guid isPermaLink="false">http://www.andrew-bellamy.co.uk/?p=145</guid>
		<description><![CDATA[this is the code for my menu on the left and can be put inside of a container type div&#160;[<a href="http://www.andrew-bellamy.co.uk/2010/05/my-menu/">Read the Rest</a>]]]></description>
			<content:encoded><![CDATA[<p>this is the code for my menu on the left and can be put inside of a container type div (sidebar)</p>
<p class="demo"><a href="http://www.andrew-bellamy.co.uk/wp-content/themes/Andrew_Bellamy/demos/accordion-menu.html">complete demo</a></p>
<h4>html markup</h4>
<pre class="brush: xml;">
&lt;div class=&quot;nav&quot;&gt;
	&lt;h3&gt;menu&lt;/h3&gt;
	&lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;h3&gt;menu&lt;/h3&gt;
	&lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;h3&gt;menu&lt;/h3&gt;
	&lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;h3&gt;menu&lt;/h3&gt;
	&lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
	&lt;h3&gt;menu&lt;/h3&gt;
	&lt;ul&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;#&quot;&gt;link&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
&lt;/div&gt;
</pre>
<h4>css code</h4>
<pre class="brush: css;">
* {
	list-style-type : none;
}
body {
	width : 50%;
	height : 50%;
	margin : 10px auto;
}
h3 {
	font-size : 16pt;
	line-height : 22pt;
}
a {
	color : #00077C;
	padding : 2px;
	text-decoration : none;
}
.nav {
	height : 100%;
	padding : 3px;
	background-color : #574E2B;
}
.nav h3 {
	clear : both;
	margin : 0 0 5px 0;
}
.nav h3:nth-of-type(n) {
	border-top : 3px solid #746425;
}
.nav h3:hover {
	cursor : pointer;
}
.nav ul {
	clear : both;
	margin : 0 0 10px 0;
}
.nav ul li {
	float : left;
	margin : 0 3px;
}
.nav ul li a {
	float : left;
	padding : 2px;
}
.nav ul li a:hover {
	background-color : #00077C;
	color : #FFFFFF;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.andrew-bellamy.co.uk/2010/05/my-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pure css vertical menu</title>
		<link>http://www.andrew-bellamy.co.uk/2010/05/pure-css-vertical-menu/</link>
		<comments>http://www.andrew-bellamy.co.uk/2010/05/pure-css-vertical-menu/#comments</comments>
		<pubDate>Mon, 17 May 2010 19:18:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[xHTML]]></category>

		<guid isPermaLink="false">http://www.andrew-bellamy.co.uk/?p=136</guid>
		<description><![CDATA[based on Pure CSS Vertical Menu by Devin R. Olsen complete demo html markup for menu &#60;div id=&#34;navigation&#34;&#62; &#60;ul&#62; &#60;li&#62;Menu&#160;[<a href="http://www.andrew-bellamy.co.uk/2010/05/pure-css-vertical-menu/">Read the Rest</a>]]]></description>
			<content:encoded><![CDATA[<p>based on <a href="http://www.devinrolsen.com/pure-css-vertical-menu/">Pure CSS Vertical Menu</a> by Devin R. Olsen</p>
<p class="demo"><a href="http://www.andrew-bellamy.co.uk/wp-content/themes/Andrew_Bellamy/demos/css-virtical-menu.html">complete demo</a></p>
<h4>html markup for menu</h4>
<pre class="brush: xml;">
&lt;div id=&quot;navigation&quot;&gt;
    	&lt;ul&gt;
        	&lt;li&gt;Menu
            	&lt;ul&gt;
                	&lt;li&gt;Menu Item&lt;/li&gt;
                    &lt;li&gt;Sub Link
                    	&lt;ul&gt;
                        	&lt;li&gt;Menu Item&lt;/li&gt;
                            &lt;li&gt;Menu Item&lt;/li&gt;
                            &lt;li&gt;Menu Item&lt;/li&gt;
                            &lt;li&gt;Menu Item&lt;/li&gt;
                        &lt;/ul&gt;
                    &lt;/li&gt;
                    &lt;li&gt;Menu Item&lt;/li&gt;
                    &lt;li&gt;Menu Item&lt;/li&gt;
                &lt;/ul&gt;
            &lt;/li&gt;
            &lt;li&gt;Menu&lt;/li&gt;
            &lt;li&gt;Menu&lt;/li&gt;
            &lt;li&gt;Menu
                &lt;ul&gt;
                	&lt;li&gt;Menu Item&lt;/li&gt;
                    &lt;li&gt;Sub Link
                    	&lt;ul&gt;
                        	&lt;li&gt;Menu Item&lt;/li&gt;
                            &lt;li&gt;Menu Item&lt;/li&gt;
                            &lt;li&gt;Menu Item&lt;/li&gt;
                            &lt;li&gt;Menu Item&lt;/li&gt;
                        &lt;/ul&gt;
                    &lt;/li&gt;
                &lt;/ul&gt;
            &lt;/li&gt;
            &lt;li&gt;Menu
            	&lt;ul&gt;
                	&lt;li&gt;Sub Link
                    	&lt;ul&gt;
                        	&lt;li&gt;Menu Item&lt;/li&gt;
                            &lt;li&gt;Menu Item&lt;/li&gt;
                            &lt;li&gt;Menu Item&lt;/li&gt;
                            &lt;li&gt;Menu Item&lt;/li&gt;
                        &lt;/ul&gt;
                    &lt;/li&gt;
                    &lt;li&gt;Menu Item&lt;/li&gt;
                    &lt;li&gt;Menu Item&lt;/li&gt;
                &lt;/ul&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
</pre>
<h4>css code for menu</h4>
<pre class="brush: css;">
#navigation { width:150px; font-size:12px; }

/*Main Menu*/
#navigation ul { margin:0px; padding:0px; background-color:#000; }
#navigation ul li {
	height:25px;
	line-height:25px;
	list-style:none;
	padding-left:10px;
	color:#FFF;
	border-top:1px solid #fff;
	border-bottom:1px solid #fff;
	cursor:pointer;
}
#navigation ul li:hover { background-color:#a60000; position:relative; color : #fff; }

/*Sub Menu*/
#navigation ul ul { display:none; position:absolute; left:75px; top:5px; border:1px solid #fff; background-color:#cacaca; }
#navigation ul li:hover ul { display:block; }
#navigation ul ul li { width:150px; float:left; display:inline; border:none; }
#navigation ul ul li:hover { border:none; background-color:#ff0000; color:#000; }

/*Sub-sub Menu*/
#navigation li:hover ul li ul { display:none; }
#navigation ul ul li ul { left:110px; background-color:#ff4040; }
#navigation ul ul li:hover ul { display:block; }
#navigation ul ul li:hover ul li { color:#fff; }
#navigation ul ul li:hover ul li:hover { color : #fff; text-decoration:underline; background-color:#000; }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.andrew-bellamy.co.uk/2010/05/pure-css-vertical-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
