<?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>Devils Workshop &#187; CSS</title>
	<atom:link href="http://devilsworkshop.org/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://devilsworkshop.org</link>
	<description></description>
	<lastBuildDate>Sun, 03 Jun 2012 01:19:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Add custom CSS classes to wp_nav_menu&#8217;s HTML output using WordPress filters</title>
		<link>http://devilsworkshop.org/add-custom-classes-wpnavmenu-condition/</link>
		<comments>http://devilsworkshop.org/add-custom-classes-wpnavmenu-condition/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 12:00:45 +0000</pubDate>
		<dc:creator>umesh.nevase@rtcamp.com</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[Wordpress Tutorials]]></category>
		<category><![CDATA[Annoyance]]></category>
		<category><![CDATA[classes]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[wp_nav_menu]]></category>

		<guid isPermaLink="false">http://wpveda.com/?p=2079</guid>
		<description><![CDATA[<p>WordPress has a great feature called ‘filter’ with which we can add our own classes to nav menu items.  Most times you need to add classes in nav menu items on some conditions. For example, in menu you have ‘sample [...]</p><p>--
This Post <a href="http://devilsworkshop.org/add-custom-classes-wpnavmenu-condition/">Add custom CSS classes to wp_nav_menu&#8217;s HTML output using WordPress filters</a> is Published on <a href="http://devilsworkshop.org">Devils Workshop</a> .
</p><br/><h3>Related posts:</h3><ul>
<li><a href='http://devilsworkshop.org/add-custom-class-individual-menu-items-wpnavmenu/' rel='bookmark' title='Add Custom CSS Classes in WordPress Custom Menu&#8217;s Individual Items'>Add Custom CSS Classes in WordPress Custom Menu&#8217;s Individual Items</a></li>
<li><a href='http://devilsworkshop.org/how-to-add-images-inside-wordpress-3-0-custom-menu/' rel='bookmark' title='How to add images inside WordPress 3.0 custom menu'>How to add images inside WordPress 3.0 custom menu</a></li>
<li><a href='http://devilsworkshop.org/adding-custom-fields-to-wordpress-media-gallery-upload/' rel='bookmark' title='Adding custom fields to WordPress media gallery upload'>Adding custom fields to WordPress media gallery upload</a></li>
<li><a href='http://devilsworkshop.org/solved-wordpress-custom-post-type-and-404-issue/' rel='bookmark' title='[Solved] WordPress Custom Post Type and 404 issue'>[Solved] WordPress Custom Post Type and 404 issue</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>WordPress has a great feature called ‘filter’ with which we can add our own classes to nav menu items.  Most times you need to add classes in nav menu items on some conditions.</p>
<p>For example, in menu you have ‘sample ‘ category item. You have to add class to this item if your single post is of ‘sample’ category or its categories have parent category as  ‘sample’. You can easily add class by using ‘nav_menu_css_class’ filter.</p>
<p><code>add_filter(‘nav_menu_css_class’ , ‘rt_nav_special_class’ , 10 , 2);</code></p>
<p>‘nav_menu_css_class’ is name of the filter to hook our function  ‘rt_nav_special_class’.</p>
<p>10 is the priority of the function and 2 is the number of arguments the function accepts. Now you may write your condition in ‘rt_nav_special_class’ to add class to menu item.</p>
<pre>function rt_nav_special_class($classes, $item){
     if(your condition){ //example: you can check value of $item to decide something...
             $classes[] = “special”;
     }
     return $classes;
}</pre>
<p>rt_nav_special_class()  accepts two arguments $classes and $item. $classes is an array contains class name already assigned by wp_nav_menu. We can add our classes in this array. I am added ‘special’ as class name. $item is current nav menu item to which we are adding a class.</p>
<p>If you var_dump this $item you will get all information about the current nav menu item. Using this $item you can any condition you want. Below is screen shot of our ‘special’ class in nav menu item in Firebug.</p>
<p><a rel="nofollow" href="http://umesh.rtcamp.info/wp-content/uploads/2010/12/Screenshot-1.1.png"></a><a rel="nofollow" wp-att-2080" href="http://wpveda.com/add-custom-classes-wpnavmenu-condition/screenshot-1-2/"><img class="alignnone size-full  wp-image-51072" src="http://devilsworkshop.org/files/2011/01/Screenshot-1.png" alt="" width="680" height="272" /></a></p>
<p>I hope you get what I explained to you. If you have any queries or suggestions do write in your comments.</p>
<br/><h3>Related posts:</h3><ul>
<li><a href='http://devilsworkshop.org/add-custom-class-individual-menu-items-wpnavmenu/' rel='bookmark' title='Add Custom CSS Classes in WordPress Custom Menu&#8217;s Individual Items'>Add Custom CSS Classes in WordPress Custom Menu&#8217;s Individual Items</a></li>
<li><a href='http://devilsworkshop.org/how-to-add-images-inside-wordpress-3-0-custom-menu/' rel='bookmark' title='How to add images inside WordPress 3.0 custom menu'>How to add images inside WordPress 3.0 custom menu</a></li>
<li><a href='http://devilsworkshop.org/adding-custom-fields-to-wordpress-media-gallery-upload/' rel='bookmark' title='Adding custom fields to WordPress media gallery upload'>Adding custom fields to WordPress media gallery upload</a></li>
<li><a href='http://devilsworkshop.org/solved-wordpress-custom-post-type-and-404-issue/' rel='bookmark' title='[Solved] WordPress Custom Post Type and 404 issue'>[Solved] WordPress Custom Post Type and 404 issue</a></li>
</ul><p>--
This Post <a href="http://devilsworkshop.org/add-custom-classes-wpnavmenu-condition/">Add custom CSS classes to wp_nav_menu&#8217;s HTML output using WordPress filters</a> is Published on <a href="http://devilsworkshop.org">Devils Workshop</a> .
</p>]]></content:encoded>
			<wfw:commentRss>http://devilsworkshop.org/add-custom-classes-wpnavmenu-condition/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>[Solved] CSS Position fixed in IE6</title>
		<link>http://devilsworkshop.org/solved-css-position-fixed-in-ie6/</link>
		<comments>http://devilsworkshop.org/solved-css-position-fixed-in-ie6/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 14:01:17 +0000</pubDate>
		<dc:creator>Saorabh Kumar</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://wpveda.com/?p=881</guid>
		<description><![CDATA[<p>When it comes to Internet Explorer most times we use the css property  position:fixed. This works fine most times but does not work in IE6. I have often faced this issues as a developer and finally I figured a way out based on some of my past experience with web-designing.</p><p>--
This Post <a href="http://devilsworkshop.org/solved-css-position-fixed-in-ie6/">[Solved] CSS Position fixed in IE6</a> is Published on <a href="http://devilsworkshop.org">Devils Workshop</a> .
</p><br/><h3>Related posts:</h3><ul>
<li><a href='http://devilsworkshop.org/orkut-album-bug-is-fixed-details-are-here/' rel='bookmark' title='Orkut Album Bug is Fixed. Details are here!'>Orkut Album Bug is Fixed. Details are here!</a></li>
<li><a href='http://devilsworkshop.org/orkut-countrywide-domain-side-effect-secure-connection-failed/' rel='bookmark' title='[Fixed] Orkut countrywide domain side-effect &#8211; Secure Connection Failed!'>[Fixed] Orkut countrywide domain side-effect &#8211; Secure Connection Failed!</a></li>
<li><a href='http://devilsworkshop.org/solvedhow-to-get-your-old-facebook-profile-layout/' rel='bookmark' title='[Solved]How to Get your Old Facebook Profile Layout'>[Solved]How to Get your Old Facebook Profile Layout</a></li>
<li><a href='http://devilsworkshop.org/solved-why-facebook-does-not-allow-you-to-write-some-comments/' rel='bookmark' title='[Solved] Why Facebook does Not allow You to Write some Comments'>[Solved] Why Facebook does Not allow You to Write some Comments</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>When it comes to Internet Explorer most times we use the <strong>css property</strong> position:fixed. This works fine most times but does not work in IE6. I have often faced this issues as a developer and finally I figured a way out based on some of my experience with web-designing.</p>
<h3>I use the steps below to solve the CSS position:fixed issue</h3>
<ul>
<li>Create a IE6.css file</li>
<li>Include this css file in head</li>
<li>Write the following line of code and it will work. <img src='http://devilsworkshop.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
</ul>
<pre>#body-background {
/**/position: absolute;
top: expression((0 + (ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop)) + 'px');
right: expression((20 + (ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft)) + 'px');
/**/ }</pre>
<p>I find this a very practical solution. Do you know of any better ones? Do share them through your comments.</p>
<br/><h3>Related posts:</h3><ul>
<li><a href='http://devilsworkshop.org/orkut-album-bug-is-fixed-details-are-here/' rel='bookmark' title='Orkut Album Bug is Fixed. Details are here!'>Orkut Album Bug is Fixed. Details are here!</a></li>
<li><a href='http://devilsworkshop.org/orkut-countrywide-domain-side-effect-secure-connection-failed/' rel='bookmark' title='[Fixed] Orkut countrywide domain side-effect &#8211; Secure Connection Failed!'>[Fixed] Orkut countrywide domain side-effect &#8211; Secure Connection Failed!</a></li>
<li><a href='http://devilsworkshop.org/solvedhow-to-get-your-old-facebook-profile-layout/' rel='bookmark' title='[Solved]How to Get your Old Facebook Profile Layout'>[Solved]How to Get your Old Facebook Profile Layout</a></li>
<li><a href='http://devilsworkshop.org/solved-why-facebook-does-not-allow-you-to-write-some-comments/' rel='bookmark' title='[Solved] Why Facebook does Not allow You to Write some Comments'>[Solved] Why Facebook does Not allow You to Write some Comments</a></li>
</ul><p>--
This Post <a href="http://devilsworkshop.org/solved-css-position-fixed-in-ie6/">[Solved] CSS Position fixed in IE6</a> is Published on <a href="http://devilsworkshop.org">Devils Workshop</a> .
</p>]]></content:encoded>
			<wfw:commentRss>http://devilsworkshop.org/solved-css-position-fixed-in-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 11/33 queries in 0.009 seconds using apc
Object Caching 972/1004 objects using apc

Served from: devilsworkshop.org @ 2012-06-04 12:41:07 -->
