<?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>DivitoDesign &#187; HTML</title>
	<atom:link href="http://divitodesign.com/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://divitodesign.com</link>
	<description>Articles, Tutorials and Resources for the Webdesigner</description>
	<lastBuildDate>Mon, 08 Mar 2010 14:24:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How-to: DropDown CSS Menu</title>
		<link>http://divitodesign.com/css/how-to-dropdown-css-menu/</link>
		<comments>http://divitodesign.com/css/how-to-dropdown-css-menu/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 18:23:11 +0000</pubDate>
		<dc:creator>Stefan Vervoort</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.divitodesign.com/?p=539</guid>
		<description><![CDATA[<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Fcss%2Fhow-to-dropdown-css-menu%2F"><br />
				<br />
			</a>
		
<p><a class="img" href="http://www.divitodesign.com/dd-articles/horizontal-css-menu/"></a></p>
<p>Due a large stream of requests for the horizontal, drop-down version of the <a href="http://www.divitodesign.com/2008/01/vertical-css-menu-with-a-behavior-file/">Vertical CSS menu tutorial</a>, I will write a tutorial covering all the basic points of building a horizontal drop-down... &#187;</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Fcss%2Fhow-to-dropdown-css-menu%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdivitodesign.com%2Fcss%2Fhow-to-dropdown-css-menu%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><a class="img" href="http://www.divitodesign.com/dd-articles/horizontal-css-menu/"><img title="horizontal-css-menu-2" src="http://www.divitodesign.com/wp-content/uploads/2008/09/horizontal-css-menu-2.jpg" alt="howto DropDown CSS menu" /></a></p>
<p>Due a large stream of requests for the horizontal, drop-down version of the <a href="http://www.divitodesign.com/2008/01/vertical-css-menu-with-a-behavior-file/">Vertical CSS menu tutorial</a>, I will write a tutorial covering all the basic points of building a horizontal drop-down CSS menu!</p>
<p>This CSS menu will have submenus and will use the web-techniques <em>HTML</em>, <em>CSS</em> and the &#8220;<a href="http://www.xs4all.nl/~peterned/csshover.html">whatever:hover</a>&#8221; <em>behavior</em> file to make things work in Firefox and IE6+. By the end of this tutorial, you will be able to make this <a href="http://www.divitodesign.com/dd-articles/horizontal-css-menu/">example CSS menu</a>.</p>
<h2>Structure</h2>
<p>Before we can start building an awesome design, we need to have structure. We will use <em>HTML</em> for that. The structure of our menu is based on a simple un-ordered list.</p>
<h3>HTML</h3>
<pre class="html">
<span class="htmlOtherTag">&lt;ul id=<span class="htmlAttributeValue">&quot;nav&quot;</span>&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;</span>Home<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;</span>Services<span class="htmlAnchorTag">&lt;/a&gt;</span>
<span class="htmlOtherTag">&lt;ul&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;</span>Webdesign<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;</span>Development<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;</span>Illustration<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;</span>Search engine<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;</span>WordPress<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
<span class="htmlOtherTag">&lt;/ul&gt;</span>
<span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;</span>Blog<span class="htmlAnchorTag">&lt;/a&gt;</span>
<span class="htmlOtherTag">&lt;ul&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;</span>Themes<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;</span>Plugins<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
<span class="htmlOtherTag">&lt;/ul&gt;</span>
<span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;</span>Contact<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
<span class="htmlOtherTag">&lt;/ul&gt;</span>
</pre>
<p><span id="more-539"></span><br />
The <em>ul</em> element is the begin and end of the un-ordered list, and the <em>li</em> elements are the menu-items In some of the <em>li</em> elements, you see another un-ordered list and these will be our drop-down submenu&#8217;s.</p>
<h2>Make the menu Accessible</h2>
<p>Accessibility is important. Not everyone is on the same computer with that same settings as you. Maybe they&#8217;ve disabled CSS, or any other thing that makes this menu not work.</p>
<p>We will add some titles to our menu items, so that when people roll over an item or visit the menu in a screenreader, they see the title popping up telling them what that item is about. Here is our more accessible structure.</p>
<h3>HTML</h3>
<pre class="html">
<span class="htmlOtherTag">&lt;ul id=<span class="htmlAttributeValue">&quot;nav&quot;</span>&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a title=<span class="htmlAttributeValue">&quot;Home&quot;</span> href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;</span>Home<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a title=<span class="htmlAttributeValue">&quot;Services&quot;</span> href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;</span>Services<span class="htmlAnchorTag">&lt;/a&gt;</span>
<span class="htmlOtherTag">&lt;ul&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a title=<span class="htmlAttributeValue">&quot;Services &gt;</span> Webdesign&quot;</span> href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;Webdesign<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a title=<span class="htmlAttributeValue">&quot;Services &gt;</span> Developement&quot;</span> href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;Development<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a title=<span class="htmlAttributeValue">&quot;Services &gt;</span> Illustration&quot;</span> href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;Illustration<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a title=<span class="htmlAttributeValue">&quot;Services &gt;</span> Search Engine&quot;</span> href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;Search engine<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a title=<span class="htmlAttributeValue">&quot;Services &gt;</span> WordPress&quot;</span> href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;WordPress<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
<span class="htmlOtherTag">&lt;/ul&gt;</span>
<span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a title=<span class="htmlAttributeValue">&quot;Blog&quot;</span> href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;</span>Blog<span class="htmlAnchorTag">&lt;/a&gt;</span>
<span class="htmlOtherTag">&lt;ul&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a title=<span class="htmlAttributeValue">&quot;Blog &gt;</span> Themes&quot;</span> href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;Themes<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a title=<span class="htmlAttributeValue">&quot;Blog &gt;</span> Plugins&quot;</span> href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;Plugins<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
<span class="htmlOtherTag">&lt;/ul&gt;</span>
<span class="htmlOtherTag">&lt;/li&gt;</span>
	<span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a title=<span class="htmlAttributeValue">&quot;Contact&quot;</span> href=<span class="htmlAttributeValue">&quot;#&quot;</span>&gt;</span>Contact<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span>
<span class="htmlOtherTag">&lt;/ul&gt;</span>
</pre>
<p>To learn more about accessibility in a CSS menu, you should read my past tips regarding accessibility <a href="http://www.divitodesign.com/2007/10/6-accessibility-tips/">here</a>.</p>
<p>This part of the menu should be clear. If not, you should consider <a href="http://www.htmlgoodies.com/primers/html/article.php/3478131">learning the basics of HTML</a> first, before you start on a CSS menu like this.</p>
<h2>CSS for your menu</h2>
<p>The style language <em>CSS</em> will add functionality to the menu and we will combine that later on with the bahavior file I mentioned earlier. I will start to give you the elements we need to style. If we forget one part of these, our menu might not have the functionality we require. More explanation follows below when we add the &#8216;core&#8217; codes.</p>
<h3>CSS</h3>
<pre class="css"><span class="cssSelector">ul#nav {</span><span class="cssSelector">}</span>    <span class="cssComment">/* the structure of our head-menu */</span>
<span class="cssSelector">li {</span><span class="cssSelector">}</span> <span class="cssComment">/* the structure of the first items */</span>
<span class="cssSelector">ul#nav li a {</span><span class="cssSelector">}</span> <span class="cssComment">/* the links inside our first items */</span>
<span class="cssSelector">ul#nav li a:hover {</span><span class="cssSelector">}</span> <span class="cssComment">/* the roll-over styles for the links in our first items */</span>
<span class="cssSelector">ul#nav li ul {</span><span class="cssSelector">}</span> <span class="cssComment">/* first items &gt; submenu structure */</span>
<span class="cssSelector">ul li  {</span><span class="cssSelector">}</span> <span class="cssComment">/* the structure of our submenu items */</span>
li &gt; ul <span class="cssMedia">}</span> <span class="cssComment">/* extra styles for Internet Explorer (behavior file) */</span>
<span class="cssSelector">li:hover ul, li.over ul {</span><span class="cssSelector">}</span> <span class="cssComment">/* to make things work in Internet Explorer (call for the behavior file) */</span></pre>
<h2>Stripped Version</h2>
<p><a href="http://www.divitodesign.com/dd-articles/horizontal-css-menu/index-stripped.html"><img title="horizontal-css-menu-1" src="http://www.divitodesign.com/wp-content/uploads/2008/09/horizontal-css-menu-1.jpg" alt="" /></a><br />
<a href="http://www.divitodesign.com/dd-articles/horizontal-css-menu/index-stripped.html"></a></p>
<p>The codes that I will provide below are really necessary for the menu, it is the <strong>core</strong> of our menu. Delete any of these codes and your menu might not work. Here&#8217;s the demo; <a href="http://www.divitodesign.com/dd-articles/horizontal-css-menu/index-stripped.html">Stripped Version</a>.</p>
<h3>CSS</h3>
<pre class="css"><span class="cssSelector">ul#nav {</span>
<span class="cssProperty">list-style</span><span class="cssRest">:</span><span class="cssValue"> none</span><span class="cssRest">;</span>
<span class="cssProperty">padding</span><span class="cssRest">:</span><span class="cssValue"> 0</span><span class="cssRest">;</span>
<span class="cssProperty">margin</span><span class="cssRest">:</span><span class="cssValue"> 0</span><span class="cssRest">;</span>
<span class="cssSelector">}</span></pre>
<p>Everything clear here. List-style should be none if you would like to have no bullets or arrows in front of every item on the list. Padding and margin to zero: we can change that later and now we have full control of spacing.</p>
<h3>CSS</h3>
<pre class="css"><span class="cssSelector">li {</span>
<span class="cssProperty">float</span><span class="cssRest">:</span><span class="cssValue"> left</span><span class="cssRest">;</span>
<span class="cssProperty">position</span><span class="cssRest">:</span><span class="cssValue"> relative</span><span class="cssRest">;</span>
<span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue"> 100px</span><span class="cssRest">;</span>
<span class="cssSelector">}</span></pre>
<p>Next in line are the list items. Float all our items to the left, position set to relative to make sure the submenu is displayed relatively to the first items.</p>
<h3>CSS</h3>
<pre class="css"><span class="cssSelector">ul#nav li a {</span>
<span class="cssProperty">display</span><span class="cssRest">:</span><span class="cssValue"> block</span><span class="cssRest">;</span>
<span class="cssSelector">}</span></pre>
<p>A user should be able to click on the whole menu item in order to get to the source. Therefore we need to transform the click-able area of the link the same width/height as the item itself. We do that with <em>display:block;</em>.</p>
<h3>CSS</h3>
<pre class="css"><span class="cssSelector">li ul {</span>
<span class="cssProperty">display</span><span class="cssRest">:</span><span class="cssValue"> none</span><span class="cssRest">;</span>
<span class="cssProperty">position</span><span class="cssRest">:</span><span class="cssValue"> absolute</span><span class="cssRest">;</span>
<span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue">100px</span><span class="cssRest">;</span>
<span class="cssProperty">top</span><span class="cssRest">:</span><span class="cssValue"> 0</span><span class="cssRest">;</span>
<span class="cssProperty">left</span><span class="cssRest">:</span><span class="cssValue"> 0</span><span class="cssRest">;</span>
<span class="cssProperty">margin-left</span><span class="cssRest">:</span><span class="cssValue">-1px</span><span class="cssRest">;</span>
<span class="cssSelector">}</span></pre>
<p><em>Display:none;</em> for the submenu because the submenu shouldn&#8217;t display when we aren&#8217;t hovering the menu item. The submenu is positioned absolute, 0 pixels from the top, 0 pixels from the left and therefore he&#8217;s aligned just below our first-level menu.</p>
<h3>CSS</h3>
<pre class="css">li&gt;ul {
<span class="cssProperty">top</span><span class="cssRest">:</span><span class="cssValue"> auto</span><span class="cssRest">;</span>
<span class="cssProperty">left</span><span class="cssRest">:</span><span class="cssValue"> auto</span><span class="cssRest">;</span>
<span class="cssMedia">}</span></pre>
<p>To reset the <em>top</em> and <em>left</em> attributes used in the <em>ul#nav li ul{}</em> we use this set of codes. It&#8217;s Internet Explorer causing the problem here. In <em>li ul</em> we have set those attributes to zero, but Firefox and other modern browsers need <em>auto</em> to do the job.</p>
<h3>CSS</h3>
<pre class="css"><span class="cssSelector">li:hover ul, li.over ul {</span>
<span class="cssProperty">display</span><span class="cssRest">:</span><span class="cssValue"> block</span><span class="cssRest">;</span>
<span class="cssSelector">}</span></pre>
<p>This is the part where the behavior file comes in. When we hover with our mouse over the first-level menu items, the <em>display:block;</em> makes sure the second-level menu pops up.</p>
<p>Next we will go through the <em>behavior</em> part.</p>
<h2>Behavior file to add li:hover support</h2>
<p>In the modern browsers, we simply add a <em>:hover</em> pseudo selector to a <em>li</em> element because that is supported. Unfortunately, we still have Internet Explorer 6 around and that&#8217;s a problem. IE6 doesn&#8217;t support <em>:hover</em> selectors on anything other then links. I have found a trick to add the extra functionality.</p>
<p>The work-around is a <em>behavior</em> file called &#8220;whatever:hover&#8221;. More information about the &#8220;whatever:hover&#8221; file can be found on the <a href="http://www.xs4all.nl/~peterned/csshover.html">author&#8217;s website</a> and you should <a href="http://naarvoren.nl/artikel/hover/csshover.htc">have the actual file</a> on your disk and in the same directory with your CSS file.</p>
<p>We can add this behavior file to our CSS with the following codes:</p>
<h3>CSS</h3>
<pre class="css"><span class="cssSelector">body {</span>   <span class="cssProperty">behavior</span><span class="cssRest">:</span><span class="cssValue">url(csshover.htc)</span><span class="cssRest">;</span> <span class="cssSelector">}</span> </pre>
<h2>Current Item</h2>
<p>Here is a little extra that might tweak up your CSS menu.</p>
<p>Sometimes it is a nice add-on to a CSS menu to change the style of one item a bit when you are on that source. For example, if you are on the Homepage, the Homepage menu item has a little difference in style and when we are on a Services page, it has a little difference in style. You get the point?</p>
<p>We do this by adding a new class to a menu item. When we want to style our Homepage item differently, here&#8217;s how we do that.</p>
<p>Change:</p>
<pre class="html"><span class="htmlOtherTag">&lt;li&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span> title=<span class="htmlAttributeValue">&quot;Homepage&quot;</span>&gt;</span>Homepage<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span></pre>
<p>To:</p>
<pre class="html"><span class="htmlOtherTag">&lt;li class=<span class="htmlAttributeValue">&quot;current&quot;</span>&gt;</span><span class="htmlAnchorTag">&lt;a href=<span class="htmlAttributeValue">&quot;&quot;</span> title=<span class="htmlAttributeValue">&quot;Homepage&quot;</span>&gt;</span>Homepage<span class="htmlAnchorTag">&lt;/a&gt;</span><span class="htmlOtherTag">&lt;/li&gt;</span></pre>
<p>With the CSS:</p>
<pre class="css"><span class="cssSelector">ul#nav li.current{</span>  <span class="cssComment">/* your styles */</span> <span class="cssSelector">}</span></pre>
<p>Why don&#8217;t we just style the class  <em>.current</em>?</p>
<p>Because the CSS specificity of the normal list item (<em>ul#nav li</em> ) rules over <em>.current</em> and your &#8216;current&#8217; item will not change. <em>ul#nav li.current</em> on the other hand will work. CSS specificity is one of the most hard parts of CSS and you can read a detailed article regarding <a href="http://htmldog.com/guides/cssadvanced/specificity/">CSS specificity here</a>.</p>
<h2>Time to hop in</h2>
<p>We have worked our way into a horizontal CSS menu that works in both Internet Explorer 6, Firefox and all other modern browsers. It&#8217;s time to let your fantasy go and create a beautiful drop-down CSS menu yourself!</p>
<h2>Download &amp; Demo</h2>
<p>Of course, I couldn&#8217;t resist and gave it a shot as well and put it in the download too. You should visit the demos and download the sources. Enjoy!</p>
<p><a href="http://www.divitodesign.com/dd-articles/horizontal-css-menu/"><img title="horizontal-css-menu-2" src="http://www.divitodesign.com/wp-content/uploads/2008/09/horizontal-css-menu-2.jpg" alt="" /></a></p>
<p><strong>DEMO</strong>: <a href="http://www.divitodesign.com/dd-articles/horizontal-css-menu/index-stripped.html">Stripped Version<br />
</a><strong>DEMO</strong>: <a href="http://www.divitodesign.com/dd-articles/horizontal-css-menu/index.html">My Version<br />
</a><strong>DOWNLOAD</strong>: <a href="http://www.divitodesign.com/dd-articles/horizontal-css-menu/horizontal-css-menu.rar">horizontal-css-menu.rar<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://divitodesign.com/css/how-to-dropdown-css-menu/feed/</wfw:commentRss>
		<slash:comments>114</slash:comments>
		</item>
		<item>
		<title>CheatSheets That Webdesigners Should Use</title>
		<link>http://divitodesign.com/tips/cheatsheets-that-webdesigners-should-use/</link>
		<comments>http://divitodesign.com/tips/cheatsheets-that-webdesigners-should-use/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 22:16:42 +0000</pubDate>
		<dc:creator>Stefan Vervoort</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.divitodesign.com/?p=127</guid>
		<description><![CDATA[<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Ftips%2Fcheatsheets-that-webdesigners-should-use%2F"><br />
				<br />
			</a>
		
<p>Some time back I discovered some of the so-called CheatSheets. These CheatSheets are PDF files packed full of information on a specific topic. In this article I will give you a couple of those... &#187;</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Ftips%2Fcheatsheets-that-webdesigners-should-use%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdivitodesign.com%2Ftips%2Fcheatsheets-that-webdesigners-should-use%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Some time back I discovered some of the so-called CheatSheets. These CheatSheets are PDF files packed full of information on a specific topic. In this article I will give you a couple of those CheatSheets, with a explanation and download link.</p>
<h2>CSS related</h2>
<p><a style="color:#000!important;" href="http://www.ilovejackdaniels.com/cheat-sheets/css-cheat-sheet/">CSS CheatSheet by IloveJackDaniels.com</a> &#8211; This Cheat Sheet is the first one I ever saw and is very advanced. If you have forgotten a small thing or if you aren&#8217;t sure things are possible, this CheatSheet is here for the resque. All CSS developers should have this one available and printed on their desk.</p>
<p><a style="color:#000!important;" href="http://lesliefranke.com/sandbox/ref/csscheatsheet.pdf">Leslie Franke&#8217;s CSS CheatSheet</a> &#8211; A less advanced CheatSheet as Dave Child&#8217;s one but it&#8217;s very easy to understand and the look is great. I really like the cleanness and organization of the design.</p>
<h2>HTML Related</h2>
<p><a style="color:#000!important;" href="http://www.ilovejackdaniels.com/cheat-sheets/html-cheat-sheet/">HTML CheatSheet by IloveJackDaniels.com</a> &#8211; Yes, yet again IloveJackDaniels.com, because I think Dave Child really created some great Sheets. This is the only one I have used, but I don&#8217;t need it anymore.</p>
<p><a style="color:#000!important;" href="http://www.petefreitag.com/cheatsheets/ascii-codes/">ASCII Character Codes Table</a> &#8211; Use this one all the time because I don&#8217;t remember all them signs and marks and their HTML entities. This is simply a great reference.</p>
<p><span id="more-127"></span></p>
<h2>WordPress related</h2>
<p><a style="color:#000!important;" href="http://bueltge.de/wp-content/download/wp/WP_loop.pdf">Wp-Loop by bueltge.de</a> &#8211; Very simple CheatSheet with exactly the information you need if you are working on a WordPress theme. The loop is always a bit hard, and really important to do that right.</p>
<p><a style="color:#000!important;" href="http://wpcandy.com/wp-content/uploads/WordPress-Help-Sheet.pdf">WordPress Help Sheet by WPcandy</a> &#8211; WPcandy has developed a Sheet that includes the general WordPress theme knowledge. It is very handy when you are just starting out developing themes.</p>
<h2>Miscellaneous CheatSheets</h2>
<p><a style="color:#000!important;" href="http://www.webmonkey.com/reference/Color_Charts">Web safe color color chart</a> &#8211; Handy if you need a couple HEX color codes and you need to know if those are web-safe. I don&#8217;t use it myself, because I have a great Firefox plugin called <a href="http://www.iosart.com/firefox/colorzilla/">ColorZilla</a> installed, but it could be handy in some cases.</p>
<p><a style="color:#000!important;" href="http://www.googleguide.com/advanced_operators_reference.html">Google&#8217;s CheatSheet</a> &#8211; Get all the Google commands in one place with this great CheatSheet. Take a look yourself and find out what you can do with Google. Many things, I guess.</p>
<p><a style="color:#000!important;" href="http://www.thejackol.com/htaccess-cheatsheet/">Htaccess CheatSheet</a> &#8211; Htaccess isn&#8217;t as expanded as it could be, but with this CheatSheet it is easy to find everything you need.</p>
<p><a style="color:#000!important;" href="http://www.creativetechs.com/tips/tip_resources/PSCS2_Shortcuts_Windows.pdf">Photoshop Shortcuts</a> &#8211; Great reference to learn the shortcuts you could use in Photoshop CS2. I didn&#8217;t know Photoshop had that many!</p>
<p>I hope that help.</p>
]]></content:encoded>
			<wfw:commentRss>http://divitodesign.com/tips/cheatsheets-that-webdesigners-should-use/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HTML &#8211; ABBR Property to Explain Abbreviations</title>
		<link>http://divitodesign.com/html/html-abbr-property-to-explain-abbreviations/</link>
		<comments>http://divitodesign.com/html/html-abbr-property-to-explain-abbreviations/#comments</comments>
		<pubDate>Sun, 01 Jun 2008 16:42:44 +0000</pubDate>
		<dc:creator>Stefan Vervoort</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Accesibility]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Search Engine Optimizing]]></category>

		<guid isPermaLink="false">http://www.divitodesign.com/?p=106</guid>
		<description><![CDATA[<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Fhtml%2Fhtml-abbr-property-to-explain-abbreviations%2F"><br />
				<br />
			</a>
		
<p>HTML has many properties. There are a couple of them we don&#8217;t use that often and we will discuss one today. It is called the ABBR property and is used to explain and mark-up... &#187;</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Fhtml%2Fhtml-abbr-property-to-explain-abbreviations%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdivitodesign.com%2Fhtml%2Fhtml-abbr-property-to-explain-abbreviations%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>HTML has many properties. There are a couple of them we don&#8217;t use that often and we will discuss one today. It is called the ABBR property and is used to explain and mark-up abbreviations. We bloggers write for the web and we shouldn&#8217;t forget the text should be understandable for everyone.</p>
<p>You might have seen news sites and information websites use this property. In the text, an abbreviation is underlined with a little gray and dashed line. When your mouse rolls over that link-look-alike, you come to the conclusion it is something else. An explanation about the abbreviation shows up. You might have seen this property more than you think. </p>
<p>Ok. But what is the point of using ABBR in your website? These arguments should convince you:</p>
<p><strong>1. Better for Accessibility</strong> &#8211; Using ABBR properties in your website will only optimize the accessibility of your website. Some visitors might don’t know terms like &#8220;SQL&#8221;, &#8220;AI&#8221; or &#8220;NASA&#8221;. Look at yourself, do you know them all? You should try as hard as possible to make your content as accessible as possible. </p>
<p><strong>2. Educate your visitors</strong> &#8211; Many websites and blogs are here to teach people with their knowledge. Those have different subjects and different visitors. When they are reading an article, everything should be clear about the topic. When acronyms or abbreviations aren&#8217;t clear enough, the visitor might do not understand the whole article.<br />
<span id="more-106"></span><br />
<strong>3. Multiple purposes</strong> &#8211; Not only are you educating your visitors, you will make it easier for spell checkers, translators and speech synthesizers to understand the meaning of an abbreviation and therefore the meaning of a sentence. </p>
<p><strong>4. Search engine optimizing</strong> &#8211; Another advantage is the search engine (yes, they are everywhere!). When you are using an abbreviation instead of a couple keywords, the <abbr title="Search Engine">SE</abbr> isn&#8217;t totally clear what you mean and therefore they couldn&#8217;t display the most accurate data to their users. </p>
<p>When you are using the ABBR function in HTML, it will explain the abbreviation to the search engine as well and you have yourself an extra keyword. Always great, right?</p>
<h2>How to use ABBR?</h2>
<p>ABBR is not hard to use. It only uses the &#8220;title&#8221; tag to explain the abbreviation. As always, CSS is around the corner to style your ABBR tag in a way you prefer.</p>
<pre class="html"><span class="htmlOtherTag">&lt;abbr title=<span class="htmlAttributeValue">&quot;Structured Query Language&quot;</span>&gt;</span>SQL<span class="htmlOtherTag">&lt;/abbr&gt;</span></pre>
<p>When you add ABBR to an other &#8220;SQL&#8221; abbreviation elsewhere in the page, <abbr></abbr> around it is everything you need to do.</p>
<h2>When ABBR, and when Acronym?</h2>
<p>Some abbreviations like &#8220;URL&#8221; and &#8220;SQL&#8221; are pronounced letter by letter by some, and as a normal word by others. The ABBR property should be used in these cases. Other abbreviations are just normal &#8216;words&#8217; like &#8220;NAVO&#8221; or &#8220;ASAP&#8221;. Those should be surrounded by the acronym property.</p>
<pre class="html"><span class="htmlOtherTag">&lt;abbr title=<span class="htmlAttributeValue">&quot;Structured Query Language&quot;</span>&gt;</span>SQL<span class="htmlOtherTag">&lt;/abbr&gt;</span>
<span class="htmlOtherTag">&lt;acronym title=<span class="htmlAttributeValue">&quot;Naval Oceanographic Office&quot;</span>&gt;</span>NAVO<span class="htmlOtherTag">&lt;/acronym&gt;</span></pre>
<h2>Disadvantages?</h2>
<p>Everything has its disadvantages. The use on a blog or website has a major problem. Internet Explorer will not play along as it simply doesn&#8217;t recognize the property. </p>
<p>But there is a solution for Internet Explorer. We can add something extra HTML to the original codes:</p>
<pre class="html"><span class="htmlOtherTag">&lt;abbr title=<span class="htmlAttributeValue">&quot;Structured Query Language&quot;</span>&gt;</span><span class="htmlOtherTag">&lt;span class=<span class="htmlAttributeValue">&quot;abbr&quot;</span> title=<span class="htmlAttributeValue">&quot;Structured Query Language&quot;</span>&gt;</span>SQL<span class="htmlOtherTag">&lt;/span&gt;</span><span class="htmlOtherTag">&lt;/abbr&gt;</span></pre>
<p>In Internet Explorer, ABBR isn&#8217;t recognized and therefore not styled. The extra span is there to get this done in another way. Below are the style declarations you should use if you want your visitors to think they are dealing with the original ABBR property:</p>
<pre class="css">
<span class="cssSelector">abbr, acronym, .abbr {</span>
  <span class="cssProperty">cursor</span><span class="cssRest">:</span><span class="cssValue"> help</span><span class="cssRest">;</span>
  <span class="cssProperty">border-bottom</span><span class="cssRest">:</span><span class="cssValue"> 1px dashed #ccc</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
</pre>
<h2>Conclusion</h2>
<p>Internet Explorer is always bugging a webdesigner. All we can do is waiting until all IE users switch to a better browser. This is hard to achieve and in the meantime&#8230; We have to live with it. </p>
<p>I think the advantages of this property really are great, and the Internet Explorer problem is not that big. Thanks for your time.</p>
]]></content:encoded>
			<wfw:commentRss>http://divitodesign.com/html/html-abbr-property-to-explain-abbreviations/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Guide to HTML Emails</title>
		<link>http://divitodesign.com/html/guide-to-html-emails/</link>
		<comments>http://divitodesign.com/html/guide-to-html-emails/#comments</comments>
		<pubDate>Fri, 16 May 2008 10:52:27 +0000</pubDate>
		<dc:creator>Stefan Vervoort</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Guide]]></category>

		<guid isPermaLink="false">http://www.divitodesign.com/?p=95</guid>
		<description><![CDATA[<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Fhtml%2Fguide-to-html-emails%2F"><br />
				<br />
			</a>
		
<p><em>This guide will tell you exactly what HTML emails are, how to make them and how to design your HTML emails.</em></p>
What are HTML emails?
<p>HTML emails are emails send with mark-up. Most of... &#187;</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Fhtml%2Fguide-to-html-emails%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdivitodesign.com%2Fhtml%2Fguide-to-html-emails%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><em>This guide will tell you exactly what HTML emails are, how to make them and how to design your HTML emails.</em></p>
<h2>What are HTML emails?</h2>
<p>HTML emails are emails send with mark-up. Most of the time, an email just contains letters and words to bring over a message to the recipient. It doesn&#8217;t need any fancy colors or tables. HTML emails can be used to make the user experience more entertaining and can be used to focus the visitors’ attention to the most important parts.</p>
<h2>Why should you use HTML emails?</h2>
<p>When you are in the blogging or publishing industry you might want to send a newsletter to inform your regular visitors of new articles, updates and/or news. Most of the time, to keep your subscribers entertained, a more professional look is required. Or you want to point visitors in the direction of a great headline. This all can be achieved by using HTML emails with CSS in a proper way.</p>
<h2>Do HTML emails always look good?</h2>
<p>To give your HTML email a proper look, we should watch out for a couple points. As you might know, <em>HTML</em> and <em>CSS</em> are rendered slightly different by different browsers. Email clients have this problem as well. All Web-based (Gmail, Hotmail) and standalone clients (Outlook, Thunderbird) will react different.</p>
<p>When you have designed a website, you have to check for browser-compability by simple checking your webpage in different browsers. What we are going to with HTML has the same principle. We will test the email in different clients.<br />
<span id="more-95"></span></p>
<h2>Designing HTML emails</h2>
<p>Designing emails has the same principles as designing websites. You should grab the users’ attention, without loosing accessibility and usability out of sight.</p>
<p>To make sure your email looks as good as possible in as many clients as possible, it is advised to use the simplest elements. <a href="http://www.anandgraves.com/html-email-validator/">Validating your email</a> is a good step in the right position!</p>
<h3>Simple elements</h3>
<p>Some elements are used for a longer time, and usually an email client will have a better support for those elements. For example, <em>Div</em>&#8217;s will not get supported by most clients, but <em>tables</em> are supported much better. The reason is simple; <em>div</em>&#8217;s are relative new compared to <em>tables</em>.</p>
<pre class="html">
<span class="htmlTableTag">&lt;table border=<span class="htmlAttributeValue">&quot;0&quot;</span>&gt;</span>
<span class="htmlTableTag">&lt;tbody&gt;</span>
<span class="htmlTableTag">&lt;tr&gt;</span>
<span class="htmlTableTag">&lt;td&gt;</span><span class="htmlTableTag">&lt;/td&gt;</span>
<span class="htmlTableTag">&lt;/tr&gt;</span>
<span class="htmlTableTag">&lt;/tbody&gt;</span><span class="htmlTableTag">&lt;/table&gt;</span>
</pre>
<h3>Stylesheets</h3>
<p>Because we are using CSS to style our HTML elements, we have to add style declarations. Strangely, his is not possible in the regular way. Extern stylesheets are ignored by most of the email clients. Extern stylesheets are stylesheets called for via a tag in the HTML, or via the <em>@import</em> attribute. We have to use <strong>inline</strong> CSS to style our elements.</p>
<p>Styles can be declared as <em>&lt;style&gt;</em> in the <em>&lt;head&gt;&lt;/head&gt;</em> area as well. Some email clients doesn&#8217;t read those, so it is advised to use inline styles.</p>
<pre class="html"><span class="htmlAnchorTag">&lt;a style=<span class="htmlAttributeValue">&quot;<span class="cssProperty">color</span><span class="cssRest">:</span><span class="cssValue"> #333</span><span class="cssRest">;</span> <span class="cssProperty">text-decoration</span><span class="cssRest">:</span><span class="cssValue"> none</span><span class="cssRest">;</span>&quot;</span>&gt;</span><span class="htmlAnchorTag">&lt;/a&gt;</span></pre>
<h3>Images</h3>
<p>Images aren&#8217;t something that you should use to show important information in your email. Spammers abuse images to bring over the spam message and as a result, email clients usually give the recipient the choice to show images. Therefore, always add an ALT tag so people can recognize what the image is about, and so does the email client. Otherwise your email might get flagged as spam and will not get to your receiver.</p>
<h3>The fold</h3>
<p>The fold in websites is the area of that website you can view without scrolling. In email messages, a fold area is important as well, and you have to make sure the most important information and headlines are above the fold. Remember an email client (especially web-based) has a lot of buttons above your email, which makes the fold higher as a website. Remember to place the most important information as high as possible in your email to make sure people sees the important parts first by using contrast!</p>
<h2>All points in a list</h2>
<h3>You should&#8230;</h3>
<ol>
<li> Validate your email</li>
<li>Use inline styles</li>
<li>Use tables</li>
<li> Test your email in different email clients (Web-based + Standalone)</li>
<li>Place the most important information as high as possible.</li>
</ol>
<h3>You should not&#8230;</h3>
<ol>
<li>Use external or embedded stylesheets</li>
<li> Use to many images (Don&#8217;t display your whole email in images)</li>
<li>Make your email to hard to read (contrast should be alright)</li>
<li>Use div&#8217;s with style declaration &#8216;float&#8217;.</li>
<li>Put headlines and important information under the fold.</li>
</ol>
<h2>Questions?</h2>
<p>If you have any questions regarding this article or if you don&#8217;t understand a tip I gave, please let me know. I will answer your questions and help you out! Please post a comment or <a href="contact/" title="contact me">contact me</a></p>
]]></content:encoded>
			<wfw:commentRss>http://divitodesign.com/html/guide-to-html-emails/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Z-Index : Overlap HTML Elements With CSS</title>
		<link>http://divitodesign.com/css/z-index-overlap-html-elements-with-css/</link>
		<comments>http://divitodesign.com/css/z-index-overlap-html-elements-with-css/#comments</comments>
		<pubDate>Tue, 06 May 2008 11:25:04 +0000</pubDate>
		<dc:creator>Stefan Vervoort</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Guide]]></category>

		<guid isPermaLink="false">http://www.divitodesign.com/?p=91</guid>
		<description><![CDATA[<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Fcss%2Fz-index-overlap-html-elements-with-css%2F"><br />
				<br />
			</a>
		
<p><em>Via this guide, you will learn what a Z-Index is and how to use this property to overlap HTML elements with CSS.</em></p>
What is a Z-Index
<p><strong>Z-index</strong> is an property in CSS and has... &#187;</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Fcss%2Fz-index-overlap-html-elements-with-css%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdivitodesign.com%2Fcss%2Fz-index-overlap-html-elements-with-css%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><em>Via this guide, you will learn what a Z-Index is and how to use this property to overlap HTML elements with CSS.</em></p>
<h2>What is a Z-Index</h2>
<p><strong>Z-index</strong> is an property in CSS and has been included in CSS because people asked for an property with the possibility to make HTML elements overlap. Overlapping HTML elements can have a lot of advantages. You can make the important parts of your website fall out from the background some more.</p>
<h2>How to use Z-Index?</h2>
<p>Z-index uses values to identify which element is more important then the other. The default value is <strong>0</strong>. Usually, I give the item that should be on top value <strong>20</strong>, the less important <strong>10 </strong> and the least important item <strong>1</strong>.</p>
<p>It doesn&#8217;t really matter which numbers you give to the Z-index. The only thing you should remember is that your top item should have to highest value. But adding Z-index to items isn&#8217;t enough to make things work.</p>
<p>For our example, we will use the following HTML structure. Those boxes should get &#8216;Z-indexed&#8217; later on!</p>
<pre class="html"><span class="htmlOtherTag">&lt;div class=<span class="htmlAttributeValue">&quot;box1&quot;</span>&gt;</span>Blue = Div #1 <span class="htmlOtherTag">&lt;/div&gt;</span>
<span class="htmlOtherTag">&lt;div class=<span class="htmlAttributeValue">&quot;box2&quot;</span>&gt;</span>Pink = Div #2 <span class="htmlOtherTag">&lt;/div&gt;</span>
<span class="htmlOtherTag">&lt;div class=<span class="htmlAttributeValue">&quot;box3&quot;</span>&gt;</span>Yellow = Div #3 <span class="htmlOtherTag">&lt;/div&gt;</span>
</pre>
<p><span id="more-91"></span><br />
<a title="Not-working Z-index example" href="http://divitodesign.com/dd-articles/z-index/not-working.html">Click here to take a look at an example I made</a>. The item that should be on top (because of the Z-index value) is not on top: the boxes are displayed <em>under</em> each other instead of <em>on top</em> of each other. It looks like the Z-index is not working in this example, right?</p>
<p>The codes I have used in this example. It should work was my first guess as well.</p>
<pre class="css"><span class="cssSelector">div.box1 {</span>
<span class="cssProperty">height</span><span class="cssRest">:</span><span class="cssValue"> 250px</span><span class="cssRest">;</span>
<span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue"> 250px</span><span class="cssRest">;</span>
<span class="cssProperty">background-color</span><span class="cssRest">:</span><span class="cssValue"> blue</span><span class="cssRest">;</span>
<span class="cssProperty">z-index</span><span class="cssRest">:</span><span class="cssValue"> 1</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
<span class="cssSelector">div.box2 {</span>
<span class="cssProperty">height</span><span class="cssRest">:</span><span class="cssValue"> 100px</span><span class="cssRest">;</span>
<span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue"> 300px</span><span class="cssRest">;</span>
<span class="cssProperty">background-color</span><span class="cssRest">:</span><span class="cssValue"> pink</span><span class="cssRest">;</span>
<span class="cssProperty">z-index</span><span class="cssRest">:</span><span class="cssValue"> 20</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
<span class="cssSelector">div.box3 {</span>
<span class="cssProperty">height</span><span class="cssRest">:</span><span class="cssValue"> 125px</span><span class="cssRest">;</span>
<span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue"> 125px</span><span class="cssRest">;</span>
<span class="cssProperty">background-color</span><span class="cssRest">:</span><span class="cssValue"> yellow</span><span class="cssRest">;</span>
<span class="cssProperty">z-index</span><span class="cssRest">:</span><span class="cssValue"> 10</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
</pre>
<h2>What&#8217;s up?</h2>
<p>The Z-index requires an other property to style the elements that should get &#8216;Z-indexed&#8217;. Our element requires the position property is set to absolute to make things works. Otherwise our Z-index won&#8217;t work, as can be seen in the example above.</p>
<p>It&#8217;s now time for an example that works. The boxes has been styled with the right properties and is ready to be used. <a title="Working Z-index Example" href="http://www.divitodesign.com/dd-articles/z-index/working.html">A working Z-index example can be found here</a>.</p>
<p>These are the codes I used here. I simply added an <em>position:absolute;</em> and a couple placement values (top, left) to the boxes. It works!</p>
<pre class="css"><span class="cssSelector">div.box1 {</span>
	<span class="cssProperty">position</span><span class="cssRest">:</span><span class="cssValue"> absolute</span><span class="cssRest">;</span>
 	<span class="cssProperty">top</span><span class="cssRest">:</span><span class="cssValue"> 20px</span><span class="cssRest">;</span> <span class="cssProperty">left</span><span class="cssRest">:</span><span class="cssValue"> 20px</span><span class="cssRest">;</span>
 	<span class="cssProperty">height</span><span class="cssRest">:</span><span class="cssValue"> 250px</span><span class="cssRest">;</span> <span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue"> 250px</span><span class="cssRest">;</span>
 	<span class="cssProperty">color</span><span class="cssRest">:</span><span class="cssValue"> white</span><span class="cssRest">;</span>
 	<span class="cssProperty">background-color</span><span class="cssRest">:</span><span class="cssValue"> blue</span><span class="cssRest">;</span>
 	<span class="cssProperty">z-index</span><span class="cssRest">:</span><span class="cssValue"> 1</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
<span class="cssSelector">div.box2 {</span>
	<span class="cssProperty">position</span><span class="cssRest">:</span><span class="cssValue"> absolute</span><span class="cssRest">;</span>
 	<span class="cssProperty">top</span><span class="cssRest">:</span><span class="cssValue"> 150px</span><span class="cssRest">;</span> <span class="cssProperty">left</span><span class="cssRest">:</span><span class="cssValue"> 10px</span><span class="cssRest">;</span>
 	<span class="cssProperty">height</span><span class="cssRest">:</span><span class="cssValue"> 100px</span><span class="cssRest">;</span> <span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue"> 300px</span><span class="cssRest">;</span>
 	<span class="cssProperty">background-color</span><span class="cssRest">:</span><span class="cssValue"> pink</span><span class="cssRest">;</span>
 	<span class="cssProperty">z-index</span><span class="cssRest">:</span><span class="cssValue"> 20</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
<span class="cssSelector">div.box3 {</span>
	<span class="cssProperty">position</span><span class="cssRest">:</span><span class="cssValue"> absolute</span><span class="cssRest">;</span>
	 <span class="cssProperty">top</span><span class="cssRest">:</span><span class="cssValue"> 15px</span><span class="cssRest">;</span> <span class="cssProperty">left</span><span class="cssRest">:</span><span class="cssValue"> 175px</span><span class="cssRest">;</span>
 	<span class="cssProperty">height</span><span class="cssRest">:</span><span class="cssValue"> 125px</span><span class="cssRest">;</span> <span class="cssProperty">width</span><span class="cssRest">:</span><span class="cssValue"> 125px</span><span class="cssRest">;</span>
 	<span class="cssProperty">background-color</span><span class="cssRest">:</span><span class="cssValue"> yellow</span><span class="cssRest">;</span>
 	<span class="cssProperty">z-index</span><span class="cssRest">:</span><span class="cssValue"> 10</span><span class="cssRest">;</span>
<span class="cssSelector">}</span>
</pre>
<h2>We are done</h2>
<p>I hope you now have fully understood the Z-index principle. You should always remember to add a <em>position:absolute;</em> property, or your Z-index will not work! If you have any questions regarding this subject, <a href="/contact/" title="contact">contact me</a> or leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://divitodesign.com/css/z-index-overlap-html-elements-with-css/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Guide to Robots.txt Usage</title>
		<link>http://divitodesign.com/tips/robots-txt-explanation/</link>
		<comments>http://divitodesign.com/tips/robots-txt-explanation/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 08:09:10 +0000</pubDate>
		<dc:creator>Stefan Vervoort</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.divitodesign.com/?p=75</guid>
		<description><![CDATA[<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Ftips%2Frobots-txt-explanation%2F"><br />
				<br />
			</a>
		
<p><em>This guide has all the information, examples and explanation you need about Robots.txt files.</em></p>
What is a Robots.txt file
<p>As the name already tells you, Robots.txt is a <em>text</em> file. A text file telling... &#187;</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Ftips%2Frobots-txt-explanation%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdivitodesign.com%2Ftips%2Frobots-txt-explanation%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><em>This guide has all the information, examples and explanation you need about Robots.txt files.</em></p>
<h2>What is a Robots.txt file</h2>
<p>As the name already tells you, Robots.txt is a <em>text</em> file. A text file telling search engine &#8216;robots&#8217; what to do with certain pages in your website. That is all a Robots.txt file does. For example, if you have a private weblog for your colleagues, which people outside your work group, should not be reading or if you have a site displaying time tables for a high school, the use of Robots.txt is an option.</p>
<h2>Content in a Robots.txt file</h2>
<p>The Robots.txt isn&#8217;t as expanded as it could be. This means there are disadvantages to the use of this file and of course the lack of features. Let&#8217;s start to go through them.</p>
<p>If you would like to include any of these features to your website, simply open up Notepad and save that file as <em>Robots.txt</em>. You should upload this file always in the <em>root</em> of your website.<span id="more-75"></span></p>
<h3>Block all robots on all files</h3>
<pre lang="html">User-agent: *
Disallow:</pre>
<h3>Block all robots</h3>
<pre lang="html">User-agent: *
Disallow: /</pre>
<h3>Block all robots on specific directories</h3>
<pre lang="html">User-agent: *
Disallow: /admin/
Disallow: /private/</pre>
<h3>Block a Bad Crawler</h3>
<pre lang="html">User-agent: Bad Crawler
Disallow: /
# In a Robots.txt file, you can add comments. Add a '#' and type your comment.</pre>
<h2>What you should know about Robots.txt</h2>
<p>As I mentioned earlier: there are some shortcomings and disadvantages to the use of these files. In this part of the guide I will add a couple tips.</p>
<p><strong>1.</strong> Always place your Robots.txt file <span style="text-decoration: underline;">in the root of your website</span>. Example: http://divitodesign.com and http://blog.divitodesign.com both fit the criteria.</p>
<p><strong>2. </strong>Usually, <span style="text-decoration: underline;">blocking bad robots will not work</span>. Those bad robots are usually spam bots and they will not even look for a Robots.txt file. They just ignore them.</p>
<p><strong>3.</strong> <span style="text-decoration: underline;">The Robots.txt file is a public file</span>. Everyone can look and find via the Robots.txt file which parts of the site is blocked. The part is blocked for the robots, but they aren&#8217;t for the users! Do not forget this.</p>
<p><strong>4.</strong> As we aren&#8217;t perfect, typo&#8217;s and syntax errors are possible. Fortunately, there are some <a href="http://tool.motoricerca.info/robots-checker.phtml">Robots.txt</a> <a href="http://www.searchenginepromotionhelp.com/m/robots-text-tester/robots-checker.php">syntax</a> <a href="http://www.sxw.org.uk/computing/robots/check.html">checkers</a> <a href="http://www.ukoln.ac.uk/web-focus/webwatch/services/robots-txt/">out there.</a></p>
<p><strong>5.</strong> When you use Google&#8217;s <a id="bg8u" title="Webmaster Tools" href="http://www.google.com/webmasters/tools/">Webmaster Tools</a>, you could use Google&#8217;s Robots.txt generator to generate your Robots.txt file.</p>
<p><strong>6.</strong> WordPress blogs could get a <span style="text-decoration: underline;">penalty for duplicating content</span> (For example: same content on the &#8220;Categories and Archives&#8221; pages.) and you can use a Robots.txt file to exclude those archives and categories pages from the search results.</p>
<p><strong>7.</strong> To block specific robots you need the right name. Here is a <a href="http://www.robotstxt.org/db.html">database of those robots</a> with description per robot.</p>
<h2>Do you need more information?</h2>
<p>If you have any questions, please post a comment or <a href="http://www.divitodesign.com/contact/">contact me.</a> You could check out the following sites if you need even more info;  <a href="http://www.robotstxt.org/"> </a><a href="http://www.divitodesign.com/contact/"></a><a href="http://www.robotstxt.org/">Robotstxt.org</a> and the <a href="http://en.wikipedia.org/wiki/Robots_Exclusion_Standard">Wikipedia</a> page.<a href="http://www.divitodesign.com/contact/"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://divitodesign.com/tips/robots-txt-explanation/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How To Use HTML Heading Tags with SEO Purpose</title>
		<link>http://divitodesign.com/seo/html-heading-tags-seo/</link>
		<comments>http://divitodesign.com/seo/html-heading-tags-seo/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 16:12:47 +0000</pubDate>
		<dc:creator>Stefan Vervoort</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Search Engine Optimizing]]></category>
		<category><![CDATA[Guide]]></category>

		<guid isPermaLink="false">http://www.divitodesign.com/2008/03/how-to-properly-use-htmls-heading-tags/</guid>
		<description><![CDATA[<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Fseo%2Fhtml-heading-tags-seo%2F"><br />
				<br />
			</a>
		
<p><em>This article is <strong>a beginners guide</strong> to heading tags in HTML and their search engine purpose. </em></p>
<p>This time we are going to talk about the heading tags you can use in HTML. To... &#187;</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Fseo%2Fhtml-heading-tags-seo%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdivitodesign.com%2Fseo%2Fhtml-heading-tags-seo%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><em>This article is <strong>a beginners guide</strong> to heading tags in HTML and their search engine purpose. </em></p>
<p>This time we are going to talk about the heading tags you can use in HTML. To give you an example: <em>h1</em>, <em>h2</em>, <em>h3</em>, <em>h4</em>, <em>h5</em>, <em>h6</em>. These tags are used in HTML to define a heading or title.</p>
<h2>The advantages of using heading tags?</h2>
<p>Heading tags are used to create split content in parts to make things easier to read. It gets easier for the visitor to scan the document for the more important points of the article. A article with great use of heading tags could keep users reading on.</p>
<p>But there is more. Another great advantage of headings is the power it has in search engine optimizing. The search engines have accepted the use of headings and will give more value to this text in an article.  A keyword-rich heading will significant improve your search engine visibility.<span id="more-69"></span></p>
<h2>Which heading tag to choose from when looking from the SEO-aspect?</h2>
<p>You have the choice between <em>h1</em>, <em>h2</em> and all the way up to <em>h6</em>.  The standard font-sizes vary between large and very small. <em>h1</em> is the largest, and <em>h6</em> is the smallest. The largest is the most important one and should be used only once in a single article or website. Using only one keyword-rich <em>h1</em> tag will tell the search engine what your article or page is about.</p>
<p>The <em>h2</em> tags should be used for sub-headings. To give you an example, this tag should be used to redivide the content described in the <em>h1</em> tag. The content split by the <em>h2</em> tag should be redivided by the <em>h3</em> tag and so all the way down to <em>h6</em>.</p>
<p>Of course, a <em>h1</em> is more important than <em>h2</em> or <em>h6</em>. But a proper use of <em>h2</em> and <em>h3</em> tags will definitely improve the search engine visibility of your web page as well as a using <em>h1</em>.</p>
<h2>A real example, please?</h2>
<p>I have created <a title="Example: HTML Heading tags" href="http://www.divitodesign.com/dd-articles/headings/headings.html">an example</a> which explains where to use what heading tag. And I&#8217;ve added some information behind it, to make sure you <span style="text-decoration: underline;">understand</span> the meaning of each tags and what their purpose is in websites and articles.</p>
<p>In my opinion, it is the best to use the tags in the way of the example, when you want to make your website a bit search engine friendly.</p>
<h4>Questions?</h4>
<p>Shoot your questions at me via the contact page or drop your comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://divitodesign.com/seo/html-heading-tags-seo/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>What is a DOCTYPE and What Does it do?</title>
		<link>http://divitodesign.com/html/what-is-a-doctype-and-what-does-it-do/</link>
		<comments>http://divitodesign.com/html/what-is-a-doctype-and-what-does-it-do/#comments</comments>
		<pubDate>Sat, 19 May 2007 05:06:56 +0000</pubDate>
		<dc:creator>Stefan Vervoort</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.divitodesign.com/blog/2007/05/what%e2%80%99s-a-doctype-and-what-does-it-do/</guid>
		<description><![CDATA[<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Fhtml%2Fwhat-is-a-doctype-and-what-does-it-do%2F"><br />
				<br />
			</a>
		
<p>When a browser scans your website, the first thing it looks for is its DOCTYPE. It helps render your website the proper way. Ever realized that a browser isn&#8217;t a real life guy that... &#187;</p>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdivitodesign.com%2Fhtml%2Fwhat-is-a-doctype-and-what-does-it-do%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdivitodesign.com%2Fhtml%2Fwhat-is-a-doctype-and-what-does-it-do%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>When a browser scans your website, the first thing it looks for is its DOCTYPE. It helps render your website the proper way. Ever realized that a browser isn&#8217;t a real life guy that can guess in what language and type it is written? Well, a browser is just a tool for people to view your website and if it doesn&#8217;t know what and how it has to show a page, there can be some problems in layout. So when there&#8217;s a wrong, outdated or no DOCTYPE at all, your HTML, CSS or DOM codes are rendered as they where designed in the late 90&#8217;s. That&#8217;s not something a web developer like you want, right?<br />
<span id="more-4"></span><br />
Most new, major browsers render the page the way the DOCTYPE says them to do. With major browsers I mean Internet Explorer 5.0 and up and of course Mozilla&#8217;s Firefox 1.0 and up. It is very logical new upcoming browsers will be using DOCTYPES as well. Only Opera doesn&#8217;t use DOCTYPEs, they always render a webpage a standard-compliant way.</p>
<p>So, you know why to use a DOCTYPE, but what is a DOCTYPE really. A DOCTYPE describes a <strong>document type definition</strong> (DTD). This is a machine-readable document that gives the browser the information it needs to display the right way as defined in the DOCTYPE. Example; if the DOCTYPE refers to <em>XHTML 1.0 transitional</em>, it get the information the <em>XHTML 1.0 transitional</em> DTD provides to proper render the webpage.</p>
<p>I hope you understand now what a DOCTYPE is. As a web developer you have to make choices and you might not know how you can use a DOCTYPE and when. In the next topic, I&#8217;ll show you the DOCTYPES you can use. You can also visit the W3C&#8217;s site for more information.</p>
<h2>Different types of DOCTYPES</h2>
<p>Of course, there are differences between HTML 4.01, XHTML 1.0 and XHTML 1.1. The DOCTYPE you have to choose depends on the language you have chosen.</p>
<p><strong>HTML 4.01</strong></p>
<h4>Strict</h4>
<pre lang="html">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"  "http://www.w3.org/TR/html4/strict.dtd">
</pre>
<h4>Transitional</h4>
<pre lang="html">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
</pre>
<h4>Frameset</h4>
<pre lang="html">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
</pre>
<p><strong>XHTML 1.0</strong></p>
<h4>Strict</h4>
<pre lang="html">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
</pre>
<h4>Transitional</h4>
<pre lang="html">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
</pre>
<h4>Frameset</h4>
<pre lang="html">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
</pre>
<p><strong>XHTML 1.1</strong></p>
<pre lang="html">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
</pre>
<h2>Conclusion</h2>
<p>Now, do you understand why you need to add a DOCTYPE? If not, please read my article again or leave a comment on this blog. In my opinion, this is a code everyone should use, especially if you think standards are important for the development of the web!</p>
<p>Thanks for reading this article. Please send me an <a href="mailto:info@divitodesign.com">email</a> or leave a comment.</p>
<div class="postadver">If you want to make your own <a href="http://www.1-hit.com/website-design.htm">website design</a> and want to upload doc type file and donâ€™t know how to do this then you can take help from <a href="http://www.1-hit.com/web-hosting.htm">web site hosting</a> service providers. They will not only assist you in making website but will also aid you creating a good <a href="http://www.envisionwebhosting.com/business.php">business opportunity</a> with the help of affiliate programs like CPC, <a href="http://www.topthechart.com/PPC-Advertising.html">pay per click</a> and many more. You can get lot of information about affiliate programs by reading <a href="http://marketing.byu.edu/htmlpages/studentpapers/iamarketing.htm">internet affiliate marketing review</a>. The majority of these providers are normally using <a href="http://www.envisionwebhosting.com/dedicated-servers.htm">dedicated servers</a> in order to give their users the speedy access to internet. If you want to select best provider then it is good to read <a href="http://cit.nih.gov/ProductsAndServices/WebServices/WebHostingServices/">webhosting reviews</a> and blogs in order to get clear idea about webhosting provides rating and their services.</div>
]]></content:encoded>
			<wfw:commentRss>http://divitodesign.com/html/what-is-a-doctype-and-what-does-it-do/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
	</channel>
</rss>
