<?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>It's Called Web Design &#187; navigation</title>
	<atom:link href="http://itscalledwebdesign.com/tag/navigation/feed/" rel="self" type="application/rss+xml" />
	<link>http://itscalledwebdesign.com</link>
	<description>Web 2.0 is so 2004. . . .</description>
	<lastBuildDate>Fri, 27 Jan 2012 16:59:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Easy Dropdown Navigation</title>
		<link>http://itscalledwebdesign.com/tutorials/easy-dropdown-navigation/</link>
		<comments>http://itscalledwebdesign.com/tutorials/easy-dropdown-navigation/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 15:59:24 +0000</pubDate>
		<dc:creator>eckert</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[down]]></category>
		<category><![CDATA[drop]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[navigation]]></category>

		<guid isPermaLink="false">http://itscalledwebdesign.com/?p=615</guid>
		<description><![CDATA[Here&#8217;s how to get dropdowns in your navigation. First, you are going to need this bit of code in your &#60;head&#62; &#60;script type="text/javascript"&#62;&#60;!--//--&#62;&#60;![CDATA[//&#62;&#60;!-- sfHover = function() {     if (!document.getElementsByTagName) return false;     var sfEls = document.getElementById("nav").getElementsByTagName("li");     for (var i=0; i&#60;sfEls.length; i++) {         sfEls[i].onmouseover=function() {             this.className+=" sfhover";         [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how to get dropdowns in your navigation.<br />
<span id="more-615"></span>First, you are going to need this bit of code in your &lt;head&gt;</p>
<pre>&lt;script type="text/javascript"&gt;&lt;!--//--&gt;&lt;![CDATA[//&gt;&lt;!--
sfHover = function() {
    if (!document.getElementsByTagName) return false;
    var sfEls = document.getElementById("nav").getElementsByTagName("li");

    for (var i=0; i&lt;sfEls.length; i++) {
        sfEls[i].onmouseover=function() {
            this.className+=" sfhover";
        }
        sfEls[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }

}
if (window.attachEvent) window.attachEvent("onload", sfHover);
//--&gt;&lt;!]]&gt;&lt;/script&gt;</pre>
<p>Next, you are going to to set up the navigation.  Check out the example code, then read the description of what it means below:</p>
<pre>&lt;div id="catnav"&gt;
  &lt;div id="nav"&gt;

  &lt;ul&gt;
    &lt;li&gt;&lt;a href="http://yourdomain.com/"&gt;Home&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;

  &lt;ul&gt;
    &lt;li&gt;&lt;a href="http://yourdomain.com/page1/"&gt;Page One&lt;/a&gt;
     &lt;ul&gt;
      &lt;li&gt;&lt;a href="http://yourdomain.com/page1sub1/"&gt;Page One Sub One&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://yourdomain.com/page1sub2/"&gt;Page One Sub Two&lt;/a&gt;&lt;/li&gt;
     &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;

  &lt;ul&gt;
    &lt;li&gt;&lt;a href="http://yourdomain.com/page2/"&gt;Page Two&lt;/a&gt;
     &lt;ul&gt;
      &lt;li&gt;&lt;a href="http://yourdomain.com/page2sub1/"&gt;Page Two Sub One&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://yourdomain.com/page2sub2/"&gt;Page Two Sub Two&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="http://yourdomain.com/page2sub1/"&gt;Page Two Sub Three&lt;/a&gt;&lt;/li&gt;
     &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;

  &lt;/div&gt;
&lt;/div&gt;</pre>
<p>The first HOME link has no dropdown, just the initial link.  The next cluster has a main link and then 2 sub pages in the dropdown and the last one has three sub links.</p>
<p>You can modify the link paths and how many dropdown sub links that you require.  Just make really sure that the first part of the code cluster starts with an &lt;li&gt;, but the ending &lt;/li&gt; doesn&#8217;t come until the bottom of the cluster.  This has screwed me over a couple of times and I&#8217;ll save you the trouble.</p>
<p>The last thing you will need is the CSS.</p>
<pre>#catnav {
  	padding: 0;
  	clear: both;
 	height: 32px;
 	width: 1000px;
 	background: #000;
  	position: absolute;
  	top: 85px;
        z-index: 100;
}

#nav {
  	list-style: none;
  	margin: 0;
  	padding: 0;
	position: relative;
	z-index: 100;
}

#nav ul {
  	margin: 0;
  	padding: 0;
}

#nav li {
  	float: left;
 	margin: 0;
 	padding: 0;
	list-style: none;
}

#nav a {
  	display: block;
  	line-height: 32px;
 	margin: 0 20px;
  	padding: 0;
  	font-size: 14px;
  	color: #fff;
	font-weight: bold;
}

#nav li a:hover {
  	color: #fff;
  	text-decoration: underline;
  	display: block;
}

#nav li ul {
  	list-style: none;
  	position: absolute;
  	width: 150px;
  	left: -999em;
}

#nav li:hover ul, #nav li.sfhover ul {
  	left: auto;
}

#nav li li {
  	float: left;
  	margin: 0;
  	padding: 0;
 	width: 129px;
}

#nav li li a {
 	width: 129px;
  	height: 24px;
  	line-height: 24px;
  	color: #000;
  	border-bottom: 1px solid #000;
  	background: #c5c5c5;
  	margin: 0;
  	padding: 5px 20px 5px 15px;
}

#nav li li a:hover {
  	border-top: 1px solid #131f27;
  	background: #000;
  	padding: 5px 20px 5px 15px;
}

#nav li:hover, #nav li.sfhover { /* prevents IE7 drop-down menu bug (focus on a page element prevents nested menus from disappearing) */
  	position: static;
}</pre>
<p>Obviously, you can and will modify this to make it fit for your site, but this should get you started.</p>
]]></content:encoded>
			<wfw:commentRss>http://itscalledwebdesign.com/tutorials/easy-dropdown-navigation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Better image navigation</title>
		<link>http://itscalledwebdesign.com/tutorials/better-image-navigation/</link>
		<comments>http://itscalledwebdesign.com/tutorials/better-image-navigation/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 14:52:13 +0000</pubDate>
		<dc:creator>eckert</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[nav]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[next]]></category>
		<category><![CDATA[previous]]></category>

		<guid isPermaLink="false">http://itscalledwebdesign.com/?p=16</guid>
		<description><![CDATA[if you are using the wordpress image.php to show your photos, you know that the next and previous photo option sucks.  I&#8217;m sure they&#8217;ll fix it in a soon-to-be-released update, but for now, use this: Place this code in your functions.php - add_action( &#8216;init&#8217;, &#8216;mf_text_based_image_links&#8217; ); function mf_text_based_image_links() { if ( function_exists( &#8216;mf_previous_image_link&#8217; ) === [...]]]></description>
			<content:encoded><![CDATA[<p>if you are using the wordpress image.php to show your photos, you know that the next and previous photo option sucks.  I&#8217;m sure they&#8217;ll fix it in a soon-to-be-released update, but for now, use this:<br />
<span id="more-16"></span></p>
<p>Place this code in your functions.php -</p>
<p>add_action( &#8216;init&#8217;, &#8216;mf_text_based_image_links&#8217; );</p>
<p>function mf_text_based_image_links() {</p>
<p>if ( function_exists( &#8216;mf_previous_image_link&#8217; ) === false ) {<br />
function mf_previous_image_link( $link_text=&#8217;Previous Image&#8217; ) {<br />
if ( $l = mf_adjacent_image_link( $link_text, true ) )<br />
print $l;<br />
else<br />
print &#8216;&lt;span class=&#8221;inactive&#8221;&gt;&#8217; . $link_text . &#8216;&lt;/span&gt;&#8217;;<br />
}<br />
}</p>
<p>if ( function_exists( &#8216;mf_next_image_link&#8217; ) === false ) {<br />
function mf_next_image_link( $link_text=&#8217;Next Image&#8217; ) {<br />
if ( $l = mf_adjacent_image_link( $link_text, false ) )<br />
print $l;<br />
else<br />
print &#8216;&lt;span class=&#8221;inactive&#8221;&gt;&#8217; . $link_text . &#8216;&lt;/span&gt;&#8217;;<br />
}<br />
}</p>
<p>if ( function_exists( &#8216;mf_adjacent_image_link&#8217; ) === false ) {<br />
function mf_adjacent_image_link( $link_text, $prev = true ) {<br />
global $post;<br />
$post = get_post($post);<br />
$attachments = array_values(get_children( array(&#8216;post_parent&#8217; =&gt; $post-&gt;post_parent, &#8216;post_status&#8217; =&gt; &#8216;inherit&#8217;, &#8216;post_type&#8217; =&gt; &#8216;attachment&#8217;, &#8216;post_mime_type&#8217; =&gt; &#8216;image&#8217;, &#8216;order&#8217; =&gt; &#8216;ASC&#8217;, &#8216;orderby&#8217; =&gt; &#8216;menu_order ID&#8217;) ));</p>
<p>foreach ( $attachments as $k =&gt; $attachment )<br />
if ( $attachment-&gt;ID == $post-&gt;ID )<br />
break;</p>
<p>$k = $prev ? $k &#8211; 1 : $k + 1;<br />
if ( isset($attachments[$k]) )<br />
return &#8216;&lt;a href=&#8221;&#8216; . get_attachment_link( $attachments[$k]-&gt;ID ) . &#8216;&#8221;&gt;&#8217; . $link_text . &#8216;&lt;/a&gt;&#8217;;<br />
else<br />
return false;<br />
}<br />
}<br />
}</p>
<p>Then place this code in your image.php file where you want the navigation to appear -</p>
<p>&lt;h2&gt;&lt;small&gt;&lt;?php mf_previous_image_link( &#8216;&amp;laquo; Previous Photo&#8217; ) ?&gt;&lt;/small&gt; -<br />
&lt;a href=&#8221;&lt;?php echo get_permalink($post-&gt;post_parent); ?&gt;&#8221; rev=&#8221;attachment&#8221;&gt;&lt;?php echo get_the_title($post-&gt;post_parent); ?&gt;&lt;/a&gt; -<br />
&lt;small&gt;&lt;?php mf_next_image_link( &#8216;Next Photo &amp;raquo;&#8217; ) ?&gt;&lt;/small&gt;&lt;/h2&gt;</p>
<p>You can of course change the Previous Photo and Next Photo to whatever you prefer.</p>
]]></content:encoded>
			<wfw:commentRss>http://itscalledwebdesign.com/tutorials/better-image-navigation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

