<?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>Liliana&#039;s Digital Realm</title>
	<atom:link href="http://lilianagaete.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://lilianagaete.com/blog</link>
	<description>Blog. Tutorials, tips, inspiration and my design adventures...</description>
	<lastBuildDate>Thu, 26 Apr 2012 20:28:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>How to check if a post has a term of a taxonomy</title>
		<link>http://lilianagaete.com/blog/how-to-check-if-a-post-has-a-term-of-a-taxonomy/</link>
		<comments>http://lilianagaete.com/blog/how-to-check-if-a-post-has-a-term-of-a-taxonomy/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 21:04:28 +0000</pubDate>
		<dc:creator>LilianaGaete</dc:creator>
				<category><![CDATA[Become a WordPress expert]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://lilianagaete.com/blog/?p=322</guid>
		<description><![CDATA[Often I find that I want to load a different template depending on what a term of a taxonomy a post has been given. It is a simple if has term check. This is the code:]]></description>
			<content:encoded><![CDATA[<p>Often I find that I want to load a different template depending on what a term of a taxonomy a post has been given. It is a simple if has term check.</p>
<p>This is the code:</p>
<pre class="brush: php; title: ; notranslate">

if (has_term( 'video', 'article_type', $post-&gt;ID )) {

require_once('video.php');

} else {

require_once('article.php');

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://lilianagaete.com/blog/how-to-check-if-a-post-has-a-term-of-a-taxonomy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable page excerpts in WordPress</title>
		<link>http://lilianagaete.com/blog/daily-lesson-how-to-enable-page-excerpts-in-wordpress/</link>
		<comments>http://lilianagaete.com/blog/daily-lesson-how-to-enable-page-excerpts-in-wordpress/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 20:04:22 +0000</pubDate>
		<dc:creator>LilianaGaete</dc:creator>
				<category><![CDATA[Become a WordPress expert]]></category>

		<guid isPermaLink="false">http://lilianagaete.com/blog/?p=261</guid>
		<description><![CDATA[For the first time today I wanted to add an excerpt to a WP page, and guess what? It was not supported by WP. But, luckily after a little bit of looking around I found this single line of PHP that makes it possible Just add this line of code to your functions.php file and [...]]]></description>
			<content:encoded><![CDATA[<p>For the first time today I wanted to add an excerpt to a WP page, and guess what? It was not supported by WP. But, luckily after a little bit of looking around I found this single line of PHP that makes it possible <img src='http://lilianagaete.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre class="brush: php; title: ; notranslate">add_post_type_support( 'page', 'excerpt');</pre>
<p>Just add this line of code to your functions.php file and that&#8217;s it!<br />
The credit for coming up with this goes to <a href="http://wordpress.mfields.org/2010/excerpts-for-pages-in-wordpress-3-0/">Michael Fields</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lilianagaete.com/blog/daily-lesson-how-to-enable-page-excerpts-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Good WordPress plugins: Query Multiple Taxonomies</title>
		<link>http://lilianagaete.com/blog/wordpress-plugin-of-the-week-query-multiple-taxonomies/</link>
		<comments>http://lilianagaete.com/blog/wordpress-plugin-of-the-week-query-multiple-taxonomies/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 19:24:24 +0000</pubDate>
		<dc:creator>LilianaGaete</dc:creator>
				<category><![CDATA[Become a WordPress expert]]></category>
		<category><![CDATA[Good WordPress Plugins]]></category>

		<guid isPermaLink="false">http://lilianagaete.com/blog/?p=255</guid>
		<description><![CDATA[From now on I&#8217;m going to have this new section called &#8220;Good WordPress Plugins&#8221; Really good WP plugins are sometimes hard to find. So I think it&#8217;d be cool to post about them as we find them. The winner for this week is: Query Multiple Taxonomies With this you can add a filter that combines [...]]]></description>
			<content:encoded><![CDATA[<p>From now on I&#8217;m going to have this new section called &#8220;Good WordPress Plugins&#8221; Really good WP plugins are sometimes hard to find. So I think it&#8217;d be cool to post about them as we find them.</p>
<p>The winner for this week is: <a href="http://wordpress.org/extend/plugins/query-multiple-taxonomies/">Query Multiple Taxonomies</a></p>
<p><span id="more-255"></span></p>
<p>With this you can add a filter that combines multiple taxonomies in a single query. We&#8217;ve been trying to find a good plugin that did just this, and there are a few, but none really combined multiple taxonomies. They either combined categories and tags, multiple categories, etc.</p>
<p>This plugin is really simple to use and pretty much ready to go!</p>
]]></content:encoded>
			<wfw:commentRss>http://lilianagaete.com/blog/wordpress-plugin-of-the-week-query-multiple-taxonomies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get PHP working within a shortcode</title>
		<link>http://lilianagaete.com/blog/how-to-get-php-working-within-a-shortcode/</link>
		<comments>http://lilianagaete.com/blog/how-to-get-php-working-within-a-shortcode/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 19:03:11 +0000</pubDate>
		<dc:creator>LilianaGaete</dc:creator>
				<category><![CDATA[Become a WordPress expert]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://lilianagaete.com/blog/?p=217</guid>
		<description><![CDATA[Become a WordPress Expert: Tutorial 2 Shortcodes are very useful in WordPress. However, I never needed before to run some PHP within a shortcode. At first I thought it might not work, but then I realized it is actually quite easy. Just wrap your PHP code with curly brakets inside your shortcode. Easy!]]></description>
			<content:encoded><![CDATA[<p>Become a WordPress Expert: Tutorial 2</p>
<p>Shortcodes are very useful in WordPress. However, I never needed before to run some PHP within a shortcode. At first I thought it might not work, but then I realized it is actually quite easy. Just wrap your PHP code with curly brakets inside your shortcode. Easy! </p>
<pre class="brush: php; title: ; notranslate">
do_shortcode(&quot;[download id='{$download_id[0]}' format='1']&quot;);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://lilianagaete.com/blog/how-to-get-php-working-within-a-shortcode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE image scaling fix</title>
		<link>http://lilianagaete.com/blog/ie-image-scaling-bug/</link>
		<comments>http://lilianagaete.com/blog/ie-image-scaling-bug/#comments</comments>
		<pubDate>Fri, 05 Aug 2011 09:01:22 +0000</pubDate>
		<dc:creator>LilianaGaete</dc:creator>
				<category><![CDATA[IE Fixes]]></category>

		<guid isPermaLink="false">http://lilianagaete.com/blog/?p=196</guid>
		<description><![CDATA[It turns out IE doesn&#8217;t scale images correctly when you use CSS to do it. These images end up looking quite weird, actually. After researching this I found a small CSS snippet that fixes this: Of course, resizing images with CSS is not the ideal way, but there may be times where you need to. [...]]]></description>
			<content:encoded><![CDATA[<p>It turns out IE doesn&#8217;t scale images correctly when you use CSS to do it. These images end up looking quite weird, actually. After researching this I found a small CSS snippet that fixes this:</p>
<pre class="brush: css; title: ; notranslate">img { -ms-interpolation-mode: bicubic; }</pre>
<p>Of course, resizing images with CSS is not the ideal way, but there may be times where you need to. So, this CSS will help.</p>
]]></content:encoded>
			<wfw:commentRss>http://lilianagaete.com/blog/ie-image-scaling-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to display the total search results and the search query in WP</title>
		<link>http://lilianagaete.com/blog/how-to-display-the-total-search-results-and-the-search-query-in-wp/</link>
		<comments>http://lilianagaete.com/blog/how-to-display-the-total-search-results-and-the-search-query-in-wp/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 14:15:54 +0000</pubDate>
		<dc:creator>LilianaGaete</dc:creator>
				<category><![CDATA[Become a WordPress expert]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[search query]]></category>
		<category><![CDATA[WordPress number of posts]]></category>

		<guid isPermaLink="false">http://lilianagaete.com/blog/?p=178</guid>
		<description><![CDATA[Become a WordPress Expert: Tutorial 1 It&#8217;s really good for the user experience to tell them the total amount of posts found when they do a search. And displaying the word they search for is also very handy. I&#8217;ve found a few methods to do this, but they are all too complicated given that WordPress [...]]]></description>
			<content:encoded><![CDATA[<p>Become a WordPress Expert: Tutorial 1</p>
<p>It&#8217;s really good for the user experience to tell them the total amount of posts found when they do a search. And displaying the word they search for is also very handy. I&#8217;ve found a few methods to do this, but they are all too complicated given that WordPress has a simple way of doing this:</p>
<p><span id="more-178"></span></p>
<pre class="brush: php; title: ; notranslate">&lt;?php echo $wp_query-&gt;found_posts; ?&gt;</pre>
<p>search results for:
<pre class="brush: php; title: ; notranslate">&lt;?php echo get_search_query(); ?&gt;</pre>
<p>This will display the total number of found posts and the used search query. Short and simple.</p>
]]></content:encoded>
			<wfw:commentRss>http://lilianagaete.com/blog/how-to-display-the-total-search-results-and-the-search-query-in-wp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>So, I&#8217;m back!</title>
		<link>http://lilianagaete.com/blog/so-im-back/</link>
		<comments>http://lilianagaete.com/blog/so-im-back/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 14:11:12 +0000</pubDate>
		<dc:creator>LilianaGaete</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://lilianagaete.com/blog/?p=183</guid>
		<description><![CDATA[I can&#8217;t believe I haven&#8217;t blogged for months! But, well, that doesn&#8217;t mean I haven&#8217;t done much, on the contrary, I have been really busy this whole year. Which is a great thing. To start with I got a web development job in January. So, that has brought lots of work and great projects The [...]]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t believe I haven&#8217;t blogged for months! But, well, that doesn&#8217;t mean I haven&#8217;t done much, on the contrary, I have been really busy this whole year. Which is a great thing.</p>
<p>To start with I got a web development job in January. So, that has brought lots of work and great projects</p>
<p><span id="more-183"></span></p>
<p>The other thing that changed is that I&#8217;ve been working with WordPress. So, that has been really fun. WP turned out to be a great CMS and I like working with it. I have even learned how to make WP plugins <img src='http://lilianagaete.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>After all this months of learning WP, I think I have gathered quite a few useful tips about WordPress development. So, for a while now I wanted to start a series of tutorials called: &#8220;Become a WordPress expert.&#8221; These will be short tuts, easy to follow, and they will be about the most useful things I&#8217;ve learned about WP.</p>
<p>It&#8217;s nice to be back blogging, though. But I guess I needed the time to really get into my new job and my new rhythm!</p>
<p>Okay, see you soon for my first Become a WP expert tut <img src='http://lilianagaete.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://lilianagaete.com/blog/so-im-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use conditional comments to add CSS for Internet Explorer</title>
		<link>http://lilianagaete.com/blog/use-conditional-comments-to-add-css-for-internet-explorer/</link>
		<comments>http://lilianagaete.com/blog/use-conditional-comments-to-add-css-for-internet-explorer/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 18:22:51 +0000</pubDate>
		<dc:creator>LilianaGaete</dc:creator>
				<category><![CDATA[IE Fixes]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[conditional comments]]></category>
		<category><![CDATA[IE bugs]]></category>
		<category><![CDATA[IE fixes]]></category>

		<guid isPermaLink="false">http://lilianagaete.com/blog/?p=153</guid>
		<description><![CDATA[on]]></description>
			<content:encoded><![CDATA[<p><a href="http://lilianagaete.com/blog/wp-content/uploads/2010/10/post_4.jpg"><img class="aligncenter size-full wp-image-174" title="post_4" src="http://lilianagaete.com/blog/wp-content/uploads/2010/10/post_4.jpg" alt="" width="450" height="166" /></a></p>
<p>With this short tutorial, I will show you how to use Conditional Comments to add special Style Sheets for Internet Explorer. In this way you can force Internet Explorer to render your site the way it should.</p>
<p><span id="more-153"></span></p>
<p>Not long ago somebody asked me how to approach Internet Explorer&#8217;s bugs. They were having a hard time making it work. So I decided to make this simple, yet useful tutorial.</p>
<p>By now this has become normal to me, but when I first saw how Internet Explorer (especially 6) renders websites I was shocked! And, even though IE8 is much (MUCH!) better than IE6, I still find all sorts of bugs I always have to fix.</p>
<p>So, we are left with no choice but to find a way to make it work. Remember that your clients won&#8217;t be amused if you hang a &#8220;<a href="http://ripie6.com/">RIP IE6</a>&#8221; on their site. They will expect their website to work with every browser.</p>
<p>Conditional Comments to link special CSS for IE is a simple workaround. These Style Sheets will ONLY be read by Internet Explorer.</p>
<p><strong>Step 1</strong></p>
<p>Lets say that you want to support IE 6, 7, and 8. Put in the head of your XHTML document the following code (conditional comments):</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!--[if(IE 6)]&gt;
        &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;css/ie6.css&quot; /&gt;
&lt;![endif]--&gt;
&lt;!--[if(IE 7)]&gt;
        &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;css/ie7.css&quot; /&gt;
&lt;![endif]--&gt;
&lt;!--[if(IE 8)]&gt;
        &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;css/ie8.css&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<p>These are the links to the CSS docs for Internet Explorer. It&#8217;s pretty much like any other CSS link, but these ones are wrapped by the conditional comment, therefore only IE will use them.</p>
<p><strong>Step 2</strong></p>
<p>Now create the Style Sheets called <strong>ie6.css</strong>, <strong>ie7.css</strong> and <strong>ie8.css</strong>.</p>
<p><strong>Step 3</strong></p>
<p>Now you need to render your site using each version of IE. Identify which elemtns IE might be rendering differently than intended. Once you know what&#8217;s wrong, you can override your original CSS rules with the rules in these new CSS for IE. Use each Style Sheet for the different versions of IE. Sometimes you need to use more specific selectors, or apply rules to different elements. It&#8217;s different every time, of course.</p>
<p>And, that&#8217;s it! It&#8217;s simple, but the tricky part, which is taming IE, is up to you!</p>
<p><strong>Common fixes for IE6.</strong></p>
<p>These rules can be used for IE6. They will correct one of the most common problems: IE6 doesn&#8217;t center the website if you used the <strong>margin:auto</strong> rule.<br />
Here is the code:</p>
<pre class="brush: css; title: ; notranslate"> body { text-align: center; } #wrap { text-align: left; } </pre>
<p>The first rule will force IE6 to center the page. The problem is that the text will also be centered. So, we apply the second rule to your wrap element to put the text back in place. And that&#8217;s it, you will have a centered page. Easy, right?</p>
<p>Here a link for some more common fixes. <a href="http://css-tricks.com/ie-css-bugs-thatll-get-you-every-time/">IE Bugs</a>.</p>
<p><strong>Some useful tools.</strong></p>
<p>There are different tools to check your sites in IE. Here there are a few I find useful:</p>
<p><a href="http://multipleies.en.softonic.com/">Multiple IEs</a> This one misses IE7, though. (For PC)<br />
<a href="http://www.my-debugbar.com/wiki/IETester/HomePage">IE Tester</a> This one does have IE7, but it crashes quite a bit. (For PC)<br />
<a href="https://browserlab.adobe.com/en-us/index.html">Browser Lab</a> Adobe gives you a free subscription for a year on this one. (It works online)</p>
<p>If anybody wants to share their favorite tools for IE testing, go ahead, I&#8217;m curious!</p>
<p>I hope you find this tut useful! If you have comments of questions let me know <img src='http://lilianagaete.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://lilianagaete.com/blog/use-conditional-comments-to-add-css-for-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Make the dropdown menu work in Internet Explorer [Part 3]</title>
		<link>http://lilianagaete.com/blog/make-the-dropdown-work-in-internet-explorer/</link>
		<comments>http://lilianagaete.com/blog/make-the-dropdown-work-in-internet-explorer/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 20:24:49 +0000</pubDate>
		<dc:creator>LilianaGaete</dc:creator>
				<category><![CDATA[IE Fixes]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://lilianagaete.com/blog/?p=136</guid>
		<description><![CDATA[As you may have gathered, Internet Explorer doesn&#8217;t support the CSS rules we use for our dropdown menus. So, we have to work around this using a especial style sheet for it, and little bit of Javascript. Step 1 First add this code to the head of your HTML document. Step 2 Now, create the [...]]]></description>
			<content:encoded><![CDATA[<p>As you may have gathered, Internet Explorer doesn&#8217;t support the CSS rules we use for our dropdown menus. So, we have to work around this using a especial style sheet for it, and little bit of Javascript.</p>
<p><span id="more-136"></span></p>
<h1>Step 1</h1>
<p>First add this code to the head of your HTML document.</p>
<pre class="brush: xml; title: ; notranslate">&lt;!--[if(IE)]&gt; &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot;
href=&quot;css/ie_dropdown.css&quot; /&gt; &lt;![endif]--&gt;</pre>
<h1>Step 2</h1>
<p>Now, create the css doc called ie_dropdown.css and put in it this code:</p>
<pre class="brush: css; title: ; notranslate">
#menu {
    padding: 0;
    margin: 0;
}
#menu li ul {
    display: none;
    position: absolute; left: 0; /*aligns the dropdown to the horizontal tabs*/
}
#menu li:hover ul, #menu li.over ul {
    display: block;
    padding: 0;
}
#menu li a:hover {
    background: #EAF6F5 url(shadow3.png) repeat-x top left;
    text-decoration: underline;
}
#menu li ul li {
    height: 30px;
    line-height: 30px;
}
</pre>
<p>What it is important to notice is that we are back using the <strong>display:none</strong> to <strong>display:block</strong> set of rules. Also notice that in the <strong>li ul</strong> element we set <strong>left</strong> to <strong>0</strong> pixels. This aligns the dropdown to its parent element and corrects IE tendencies to display elements in the wrong places. We need to set the chaging background, and the underline rules to the <strong>a:hover</strong> element because that&#8217;s the only hover IE supports. Finally we also set the <strong>height</strong> and <strong>line-height</strong> to 30 pixels.</p>
<h1>Step 3</h1>
<p>But no, sadly this alone won&#8217;t do for older versions of IE. So, we are forced to use some Javascript to make it work. Here is the Javascript (source: <a href="http://www.alistapart.com/articles/dropdowns/">Suckerfish Dropdowns</a>).</p>
<pre class="brush: jscript; title: ; notranslate">
startList = function() {
if (document.all&amp;&amp;document.getElementById) {
navRoot = document.getElementById(&quot;nav&quot;);
for (i=0; i&lt;navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName==&quot;LI&quot;) {
node.onmouseover=function() {
this.className+=&quot; over&quot;;
  }
  node.onmouseout=function() {
  this.className=this.className.replace(&quot; over&quot;, &quot;&quot;);
   }
   }
  }
 }
}
window.onload=startList;
</pre>
<p>Place a link to this Javascript document in the head of your HTML. And, you&#8217;re done! You will have dropdown menus that work across all browsers, and take advantage of both CSS 2 and CSS 3!</p>
<h1>Resources and useful links</h1>
<ul>
<li><a href="http://www.alistapart.com/articles/dropdowns/">Suckerfish Dropdowns</a></li>
<li><a href="http://www.newmediacampaigns.com/page/nicer-navigation-with-css-transitions">CSS3 Dropdown Tutorial</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://lilianagaete.com/blog/make-the-dropdown-work-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Enhance the dropdown menu with CSS 3 transitions. [Part 2]</title>
		<link>http://lilianagaete.com/blog/enhance-the-dropdown-menu-with-css-3-transitions-part-2/</link>
		<comments>http://lilianagaete.com/blog/enhance-the-dropdown-menu-with-css-3-transitions-part-2/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 20:03:15 +0000</pubDate>
		<dc:creator>LilianaGaete</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://lilianagaete.com/blog/?p=131</guid>
		<description><![CDATA[Now we are going to enhance our Navigation bar using CSS 3 to add transitions to it. Instead of just appearing at once, the dropdowns will slide down. Step 1 First, there are just a few rules we need to change in the dropdown.css document to prepare for the CSS 3 rules. Here is the [...]]]></description>
			<content:encoded><![CDATA[<p>Now we are going to enhance our Navigation bar using CSS 3 to add transitions to it. Instead of just appearing at once, the dropdowns will slide down.
			</p>
<p>
<span id="more-131"></span></p>
<h1>Step 1</h1>
<p></p>
<p>First, there are just a few rules we need to change in the dropdown.css document to prepare for the CSS 3 rules.
			</p>
<p>Here is the code:</p>
<pre class="brush: css; title: ; notranslate">

		#menu li ul {
			opacity: 0;
			position: absolute;
		}

		#menu li:hover ul {
			opacity: 1;
		}
</pre>
<p>Instead of using the <b>display: none</b> to <b>display:block</b>, we will use the opacity set to 0, and then set to 1 on the <b>li:hover</b> element. This will have the same effect of hiding the dropdowns, and showing them just when hovered.
			</p>
<p></p>
<p>Now, we add the <b>height</b> and <b>line-height</b> from 0 in the <b>li ul li</b> to 30 pixels in the <b>li:hover ul</b>. This will allow the dropdowns to expand from 0 to 30 pixels when they are hovered. Choose your own height and line-height but make sure you are consistent throughout your code.
			</p>
<p></p>
<p>Here is the code:
			</p>
<pre class="brush: css; title: ; notranslate">

		#menu li ul li {
			height: 0;
			line-height: 0;
		}

		#menu li:hover ul li {
			height: 30px;
			line-height: 30px;
			background: none;
		}
			</pre>
<h1>Step 2</h1>
<p></p>
<p>Now we add the CSS 3 rules. These will control how the transitions take place. Here is the code:
			</p>
<pre class="brush: css; title: ; notranslate">

		#menu li {
			-webkit-transition: all 0.2s;
		}

		#menu li a {
			-webkit-transition: all 0.5s;
		}

		#menu li ul {
			-webkit-transition: all 1s;
		}

		#menu li ul li {
			-webkit-transition: height 0.5s;
		}
</pre>
<p>The <b>all</b> means that all properties of the element will be animated. Next, we specify the time that it will take for the transition to complete. In the case of the last rule, we are only affecting the <b>height</b> property.
			</p>
<p></p>
<p>Remember that these will only work on browsers that support CSS 3, such as Chrome. However, they will degrade gracefully in the rest of the browsers, except for IE of course.
			</p>
<p></p>
<p>Continue reading Part 3 to learn how to make the menu work in Internet Explorer.</p>
]]></content:encoded>
			<wfw:commentRss>http://lilianagaete.com/blog/enhance-the-dropdown-menu-with-css-3-transitions-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

