<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
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/"
> <channel><title>Comments on: Create a Sprited Navigation Menu Using CSS and&#160;MooTools</title> <atom:link href="http://davidwalsh.name/css-sprite-menu/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/css-sprite-menu</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Thu, 09 Sep 2010 10:38:51 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>By: Stephanie</title><link>http://davidwalsh.name/css-sprite-menu/comment-page-1#comment-19567</link> <dc:creator>Stephanie</dc:creator> <pubDate>Fri, 27 Aug 2010 17:46:43 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3918#comment-19567</guid> <description>I have been trying to figure out how to make the link for the current pages. So far I have been unsuccessful in writing code that works.I have this:
ul.rollover-ex li a:current { background-position: 0 -300px;}
ul.rollover-ex li.button2 a:current { background-position: 0 -750px; }
ul.rollover-ex li.button3 a:current { background-position: 0 -1200px; }
ul.rollover-ex li.button4 a:current { background-position: 0 -1650px; }
ul.rollover-ex li.button5 a:current { background-position: 0 -2100px; }
ul.rollover-ex li.button6 a:current { background-position: 0 -2550px; }But it seems I may need to designate each button for the page it is associated with and I&#039;m not sure how to write that in.Any suggestions?</description> <content:encoded><![CDATA[<p>I have been trying to figure out how to make the link for the current pages. So far I have been unsuccessful in writing code that works.</p><p>I have this:<br
/> ul.rollover-ex li a:current { background-position: 0 -300px;}<br
/> ul.rollover-ex li.button2 a:current { background-position: 0 -750px; }<br
/> ul.rollover-ex li.button3 a:current { background-position: 0 -1200px; }<br
/> ul.rollover-ex li.button4 a:current { background-position: 0 -1650px; }<br
/> ul.rollover-ex li.button5 a:current { background-position: 0 -2100px; }<br
/> ul.rollover-ex li.button6 a:current { background-position: 0 -2550px; }</p><p>But it seems I may need to designate each button for the page it is associated with and I&#8217;m not sure how to write that in.</p><p>Any suggestions?</p> ]]></content:encoded> </item> <item><title>By: shaik</title><link>http://davidwalsh.name/css-sprite-menu/comment-page-1#comment-19306</link> <dc:creator>shaik</dc:creator> <pubDate>Wed, 11 Aug 2010 06:58:30 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3918#comment-19306</guid> <description>what if i have to call the .js without using php? can any 1 help me withthat...</description> <content:encoded><![CDATA[<p>what if i have to call the .js without using php? can any 1 help me withthat&#8230;</p> ]]></content:encoded> </item> <item><title>By: Jay</title><link>http://davidwalsh.name/css-sprite-menu/comment-page-1#comment-18963</link> <dc:creator>Jay</dc:creator> <pubDate>Thu, 22 Jul 2010 12:40:24 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3918#comment-18963</guid> <description>Really cool.. :)</description> <content:encoded><![CDATA[<p>Really cool.. :)</p> ]]></content:encoded> </item> <item><title>By: Paul</title><link>http://davidwalsh.name/css-sprite-menu/comment-page-1#comment-17829</link> <dc:creator>Paul</dc:creator> <pubDate>Tue, 25 May 2010 00:10:46 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3918#comment-17829</guid> <description>@Arnar G:  OH! Great response Arnar, thanks!Buuut, I guess I should have been more clear. I was thinking in terms of using it for specific images, such as a handful of thumbnails in a sprite format, for a portfolio. That way I wanted to use it as an include file for multiple pages.I&#039;ve seen other solutions for CSS for hyperlinks and current page that identified the current page in the body tag as an id or at the top of the page with a PHP tag. Had hoped there might be an easy solution for this sample code too.Cheers!</description> <content:encoded><![CDATA[<p>@Arnar G:  OH! Great response Arnar, thanks!</p><p>Buuut, I guess I should have been more clear. I was thinking in terms of using it for specific images, such as a handful of thumbnails in a sprite format, for a portfolio. That way I wanted to use it as an include file for multiple pages.</p><p>I&#8217;ve seen other solutions for CSS for hyperlinks and current page that identified the current page in the body tag as an id or at the top of the page with a PHP tag. Had hoped there might be an easy solution for this sample code too.</p><p>Cheers!</p> ]]></content:encoded> </item> <item><title>By: Arnar G</title><link>http://davidwalsh.name/css-sprite-menu/comment-page-1#comment-17828</link> <dc:creator>Arnar G</dc:creator> <pubDate>Mon, 24 May 2010 23:59:07 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3918#comment-17828</guid> <description>oops, the html rendres so I hand to make another go at this&lt;?$q = mysql_query(&quot;SELECT * FROM menu_table ORDER BY sort&quot;);
while( $row = mysql_fetch_array($q) ){
if( $_GET[&#039;page&#039;] == $row[&#039;id&#039;] ){ $current = &#039;Current&#039;; }
echo &#039;&lt;a href=&quot;?page=&#039; . $row[&#039;id&#039;] . &#039;&quot; rel=&quot;nofollow&quot;&gt;&#039; . $row[&#039;text&#039;] . &#039;&lt;/a&gt;&#039;;
$current = &#039;&#039;;
}
?&gt;</description> <content:encoded><![CDATA[<p>oops, the html rendres so I hand to make another go at this</p><p>&lt;?</p><p>$q = mysql_query(&quot;SELECT * FROM menu_table ORDER BY sort&quot;);<br
/> while( $row = mysql_fetch_array($q) ){<br
/> if( $_GET[&#39;page&#39;] == $row[&#39;id&#39;] ){ $current = &#39;Current&#39;; }<br
/> echo &#39;&lt;a href=&quot;?page=&#8217; . $row['id'] . &#8216;&quot; rel=&quot;nofollow&quot;&gt;&#8217; . $row['text'] . &#8216;&lt;/a&gt;&#8217;;<br
/> $current = &#8221;;<br
/> }<br
/> ?&gt;</p> ]]></content:encoded> </item> <item><title>By: Arnar G</title><link>http://davidwalsh.name/css-sprite-menu/comment-page-1#comment-17827</link> <dc:creator>Arnar G</dc:creator> <pubDate>Mon, 24 May 2010 23:55:19 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3918#comment-17827</guid> <description>@Paul:  If you want that you could use only the background Image and place the seperators and text dynamicly.That would require you to add a class to the li&#039;s ( eg. li.MenuItem ) and style them all at once.  The id would remain for JavaScript purposes.You could then use li.MenuItem:hover to change the text colors.The php would then use either a while loop or a foreach to render the li&#039;s inside the ul.&lt;?$q = mysql_query(&quot;SELECT * FROM menu_table ORDER BY sort&quot;);
while( $row = mysql_fetch_array($q) ){
if( $_GET[&#039;page&#039;] == $row[&#039;id&#039;] ){ $current = &#039;Current&#039;; }
echo &#039;&lt;a href=&quot;?page=&#039; . $row[&#039;id&#039;] . &#039;&quot; rel=&quot;nofollow&quot;&gt;&#039; . $row[&#039;text&#039;] . &#039;&lt;/a&gt;&#039;;
$current = &#039;&#039;;
}
?&gt;* Although after reading throught the javascript I don&#039;t see the ID beeing used for anything but CSS styling.  You would ofcourse just create one master class for all the elements.From what it seems it would beulli.MenuItem
li.MenuItem:hoverli.MenuItemCurrentThis of course needs some modification to fit into your application but I hope this helps you as to how one would approch this.</description> <content:encoded><![CDATA[<p>@Paul:  If you want that you could use only the background Image and place the seperators and text dynamicly.</p><p>That would require you to add a class to the li&#8217;s ( eg. li.MenuItem ) and style them all at once.  The id would remain for JavaScript purposes.</p><p>You could then use li.MenuItem:hover to change the text colors.</p><p>The php would then use either a while loop or a foreach to render the li&#8217;s inside the ul.</p><p>&lt;?</p><p>$q = mysql_query(&quot;SELECT * FROM menu_table ORDER BY sort&quot;);<br
/> while( $row = mysql_fetch_array($q) ){<br
/> if( $_GET[&#039;page&#039;] == $row[&#039;id&#039;] ){ $current = &#039;Current&#039;; }<br
/> echo &#039;<a
href="?page=' . $row['id'] . '" rel="nofollow">&#8216; . $row['text'] . &#8216;</a>&#8216;;<br
/> $current = &#8221;;<br
/> }<br
/> ?&gt;</p><p>* Although after reading throught the javascript I don&#8217;t see the ID beeing used for anything but CSS styling.  You would ofcourse just create one master class for all the elements.</p><p>From what it seems it would be</p><p>ul</p><p>li.MenuItem<br
/> li.MenuItem:hover</p><p>li.MenuItemCurrent</p><p>This of course needs some modification to fit into your application but I hope this helps you as to how one would approch this.</p> ]]></content:encoded> </item> <item><title>By: Paul</title><link>http://davidwalsh.name/css-sprite-menu/comment-page-1#comment-17826</link> <dc:creator>Paul</dc:creator> <pubDate>Mon, 24 May 2010 23:33:06 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3918#comment-17826</guid> <description>This is nifty, but what if you want to turn your menu into an include file so that it will dynamically call the JS and CSS?Currently you are indicating the home page and the about page are the current page in the php of the li....so, how would one go about setting this up?Thanks and super job!</description> <content:encoded><![CDATA[<p>This is nifty, but what if you want to turn your menu into an include file so that it will dynamically call the JS and CSS?</p><p>Currently you are indicating the home page and the about page are the current page in the php of the li&#8230;.so, how would one go about setting this up?</p><p>Thanks and super job!</p> ]]></content:encoded> </item> <item><title>By: Tim</title><link>http://davidwalsh.name/css-sprite-menu/comment-page-1#comment-13844</link> <dc:creator>Tim</dc:creator> <pubDate>Sat, 21 Nov 2009 17:28:25 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3918#comment-13844</guid> <description>Is it possible to use the standard mootools lib to get this, because of have other mootools gadgetss on teh same page and this and esp the snook nav didn&#039;t play nicely with them because of different commands for teh same call.  I am still just a noob.</description> <content:encoded><![CDATA[<p>Is it possible to use the standard mootools lib to get this, because of have other mootools gadgetss on teh same page and this and esp the snook nav didn&#8217;t play nicely with them because of different commands for teh same call.  I am still just a noob.</p> ]]></content:encoded> </item> <item><title>By: Jonathan Bennett</title><link>http://davidwalsh.name/css-sprite-menu/comment-page-1#comment-13351</link> <dc:creator>Jonathan Bennett</dc:creator> <pubDate>Fri, 06 Nov 2009 22:20:08 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3918#comment-13351</guid> <description>Oooooh. Pretty! :D</description> <content:encoded><![CDATA[<p>Oooooh. Pretty! :D</p> ]]></content:encoded> </item> <item><title>By: ugg uk</title><link>http://davidwalsh.name/css-sprite-menu/comment-page-1#comment-13298</link> <dc:creator>ugg uk</dc:creator> <pubDate>Thu, 05 Nov 2009 01:07:12 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3918#comment-13298</guid> <description>nice article and I agree with almost everything, but I think you create a new problem, where people are forced to make their point in the first three lines or 140 characters which isn&#039;t necessarily a good thing.</description> <content:encoded><![CDATA[<p>nice article and I agree with almost everything, but I think you create a new problem, where people are forced to make their point in the first three lines or 140 characters which isn&#8217;t necessarily a good thing.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 7/19 queries in 0.019 seconds using disk

Served from: davidwalsh.name @ 2010-09-09 14:19:17 -->