<?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>Coders Cult Web Development Blog &#187; HTML/XHTML and CSS</title>
	<atom:link href="http://coderscult.com/category/xhtml-css/feed/" rel="self" type="application/rss+xml" />
	<link>http://coderscult.com</link>
	<description>Website development - HTML/XHTML, CSS, Javascript/AJAX, PHP, MySQL</description>
	<lastBuildDate>Thu, 31 Dec 2009 12:58:08 +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>Rounded Corners on ALL Browsers</title>
		<link>http://coderscult.com/xhtml-css/2008/11/17/rounded-corners-on-all-browsers/</link>
		<comments>http://coderscult.com/xhtml-css/2008/11/17/rounded-corners-on-all-browsers/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 03:48:30 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
				<category><![CDATA[HTML/XHTML and CSS]]></category>
		<category><![CDATA[Javascript/AJAX]]></category>
		<category><![CDATA[rounded corners]]></category>

		<guid isPermaLink="false">http://coderscult.com/?p=51</guid>
		<description><![CDATA[






Web designers out there!  Have you ever wanted to have rounded corners on the web pages you design but without the use of ugly GIFs or IE-troublesome PNGs?  I&#8217;ve got good news for you and it&#8217;s called jQuery Corners.  Have a look at the screenshot below:


This nifty little jQuery plugin will allow [...]]]></description>
			<content:encoded><![CDATA[<p>Web designers out there!  Have you ever wanted to have rounded corners on the web pages you design but without the use of ugly GIFs or IE-troublesome PNGs?  I&#8217;ve got good news for you and it&#8217;s called jQuery Corners.  Have a look at the screenshot below:</p>
<p><span id="more-51"></span></p>
<p><a href="http://www.atblabs.com/jquery.corners.html"><img src="http://coderscult.com/wp-content/uploads/2008/11/jquery-rounded-corners.jpg" alt="jQuery Rounded Corners" title="jQuery Rounded Corners" width="400" height="146" class="size-full wp-image-54" /></a></p>
<p>This nifty little jQuery plugin will allow you to have anti-aliased rounded corners on your design without the hassle of creating images or worrying about browser compatibility.  Note that it&#8217;s just a jQuery plugin which means that you&#8217;ll also need the <a href="http://jquery.com/">jQuery library</a> which you can get for free.</p>
<p><em>How does jQuery Corners do it?</em></p>
<p>Well, first it checks if the browser supports rounded corners and if so uses the browser&#8217;s built-in rounded corners support.  If the browser however doesn&#8217;t support rounded corners, then jQuery Corners uses its own algorithm to emulate rounded corners.  I took a look at the algorithm&#8217;s generated code and it looks like it&#8217;s using DIVs with varying width and colors to do to the trick.  Simple and elegant but most of all it works.</p>
<p>Give it a try for yourself &#8211; <a href="http://www.atblabs.com/jquery.corners.html">jQuery Corners</a></p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share this Post through Social Bookmarking</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F11%2F17%2Frounded-corners-on-all-browsers%2F&amp;title=Rounded%20Corners%20on%20ALL%20Browsers&amp;bodytext=Web%20designers%20out%20there%21%20%20Have%20you%20ever%20wanted%20to%20have%20rounded%20corners%20on%20the%20web%20pages%20you%20design%20but%20without%20the%20use%20of%20ugly%20GIFs%20or%20IE-troublesome%20PNGs%3F%20%20I%27ve%20got%20good%20news%20for%20you%20and%20it%27s%20called%20jQuery%20Corners.%20%20Have%20a%20look%20at%20the%20screenshot%20bel" title="Digg"><img src="http://coderscult.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F11%2F17%2Frounded-corners-on-all-browsers%2F" title="Sphinn"><img src="http://coderscult.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F11%2F17%2Frounded-corners-on-all-browsers%2F&amp;title=Rounded%20Corners%20on%20ALL%20Browsers&amp;notes=Web%20designers%20out%20there%21%20%20Have%20you%20ever%20wanted%20to%20have%20rounded%20corners%20on%20the%20web%20pages%20you%20design%20but%20without%20the%20use%20of%20ugly%20GIFs%20or%20IE-troublesome%20PNGs%3F%20%20I%27ve%20got%20good%20news%20for%20you%20and%20it%27s%20called%20jQuery%20Corners.%20%20Have%20a%20look%20at%20the%20screenshot%20bel" title="del.icio.us"><img src="http://coderscult.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F11%2F17%2Frounded-corners-on-all-browsers%2F&amp;t=Rounded%20Corners%20on%20ALL%20Browsers" title="Facebook"><img src="http://coderscult.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F11%2F17%2Frounded-corners-on-all-browsers%2F&amp;title=Rounded%20Corners%20on%20ALL%20Browsers" title="Mixx"><img src="http://coderscult.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F11%2F17%2Frounded-corners-on-all-browsers%2F&amp;title=Rounded%20Corners%20on%20ALL%20Browsers&amp;annotation=Web%20designers%20out%20there%21%20%20Have%20you%20ever%20wanted%20to%20have%20rounded%20corners%20on%20the%20web%20pages%20you%20design%20but%20without%20the%20use%20of%20ugly%20GIFs%20or%20IE-troublesome%20PNGs%3F%20%20I%27ve%20got%20good%20news%20for%20you%20and%20it%27s%20called%20jQuery%20Corners.%20%20Have%20a%20look%20at%20the%20screenshot%20bel" title="Google Bookmarks"><img src="http://coderscult.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F11%2F17%2Frounded-corners-on-all-browsers%2F&amp;title=Rounded%20Corners%20on%20ALL%20Browsers" title="StumbleUpon"><img src="http://coderscult.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F11%2F17%2Frounded-corners-on-all-browsers%2F" title="Technorati"><img src="http://coderscult.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="" title="YahooMyWeb"><img src="http://coderscult.com/wp-content/plugins/sociable/images/" title="YahooMyWeb" alt="YahooMyWeb" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/xhtml-css/2008/11/17/rounded-corners-on-all-browsers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Design with Search Engine Optimization in Mind</title>
		<link>http://coderscult.com/xhtml-css/2008/06/25/web-design-with-search-engine-optimization-in-mind/</link>
		<comments>http://coderscult.com/xhtml-css/2008/06/25/web-design-with-search-engine-optimization-in-mind/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 07:48:48 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
				<category><![CDATA[HTML/XHTML and CSS]]></category>

		<guid isPermaLink="false">http://coderscult.com/?p=46</guid>
		<description><![CDATA[Web designers and developers often take search engine optimization for granted thinking that it is something that can be done later.  While that is true, I would still say that things will be a lot easier and better if search engine optimization is already incorporated into the architecture of a website before it is [...]]]></description>
			<content:encoded><![CDATA[<p>Web designers and developers often take search engine optimization for granted thinking that it is something that can be done later.  While that is true, I would still say that things will be a lot easier and better if search engine optimization is already incorporated into the architecture of a website before it is even created.</p>
<p><span id="more-46"></span></p>
<p>As a quick and easy to follow guide, here are a few things that web designers have to do when creating website.</p>
<ul>
<li>Don&#8217;t forget to put something descriptive in the Title Tag</li>
<li>Use the H1 tag for the heading instead of just increasing the font size of your heading text.  The content between the H1 tag is a huge factor in SEO.  Remember though to use the H1 tag only once!</li>
<li>Use H2 and H3 tags for subheadings.  That&#8217;s what they&#8217;re meant for.  Again, don&#8217;t just change font-sizes.  Use the header tags accordingly.  As opposed to the H1 tag, you can use H2 and H3 tags as often as you want.</li>
<li>Make use of the &#8220;alt&#8221; attribute in images. The main purpose of the &#8220;alt&#8221; attribute in images is for usability.  Some users just choose to browse with images turned off.  The &#8220;alt&#8221; attribute gives them an idea of what the image is about.  On the other hand, search engines also give credit to the value of the alt attribute so make good use of it.</li>
<li>Avoid Javascript and Flash in navigation.  Search engines like HTML and plain TEXT.  That&#8217;s it.  So if you rely on some fancy javascript or flash for your navigation then you&#8217;re doing it wrong.  Use ordinary HTML links for navigation as much as possible.  You can use CSS to achieve most of the fancy effects you want anyway.</li>
<li>Don&#8217;t use images for paragraphs of text.  I know this is absurd but I&#8217;ve seen many websites who use images to display paragraphs of text.  While people can read it, the search engines can&#8217;t.  Use plain text for text content&#8230; makes sense?</li>
<li>Comply with the W3C standards.  It&#8217;s not just for browser compliance.  It&#8217;s also for the search engines.  You can validate your HTML and CSS code at <a href="http://validator.w3.org/">http://validator.w3.org/</a></li>
</ul>
<p>I&#8217;m sure I missed a few things but the list above should you get started.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share this Post through Social Bookmarking</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F06%2F25%2Fweb-design-with-search-engine-optimization-in-mind%2F&amp;title=Web%20Design%20with%20Search%20Engine%20Optimization%20in%20Mind&amp;bodytext=Web%20designers%20and%20developers%20often%20take%20search%20engine%20optimization%20for%20granted%20thinking%20that%20it%20is%20something%20that%20can%20be%20done%20later.%20%20While%20that%20is%20true%2C%20I%20would%20still%20say%20that%20things%20will%20be%20a%20lot%20easier%20and%20better%20if%20search%20engine%20optimization%20is%20a" title="Digg"><img src="http://coderscult.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F06%2F25%2Fweb-design-with-search-engine-optimization-in-mind%2F" title="Sphinn"><img src="http://coderscult.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F06%2F25%2Fweb-design-with-search-engine-optimization-in-mind%2F&amp;title=Web%20Design%20with%20Search%20Engine%20Optimization%20in%20Mind&amp;notes=Web%20designers%20and%20developers%20often%20take%20search%20engine%20optimization%20for%20granted%20thinking%20that%20it%20is%20something%20that%20can%20be%20done%20later.%20%20While%20that%20is%20true%2C%20I%20would%20still%20say%20that%20things%20will%20be%20a%20lot%20easier%20and%20better%20if%20search%20engine%20optimization%20is%20a" title="del.icio.us"><img src="http://coderscult.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F06%2F25%2Fweb-design-with-search-engine-optimization-in-mind%2F&amp;t=Web%20Design%20with%20Search%20Engine%20Optimization%20in%20Mind" title="Facebook"><img src="http://coderscult.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F06%2F25%2Fweb-design-with-search-engine-optimization-in-mind%2F&amp;title=Web%20Design%20with%20Search%20Engine%20Optimization%20in%20Mind" title="Mixx"><img src="http://coderscult.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F06%2F25%2Fweb-design-with-search-engine-optimization-in-mind%2F&amp;title=Web%20Design%20with%20Search%20Engine%20Optimization%20in%20Mind&amp;annotation=Web%20designers%20and%20developers%20often%20take%20search%20engine%20optimization%20for%20granted%20thinking%20that%20it%20is%20something%20that%20can%20be%20done%20later.%20%20While%20that%20is%20true%2C%20I%20would%20still%20say%20that%20things%20will%20be%20a%20lot%20easier%20and%20better%20if%20search%20engine%20optimization%20is%20a" title="Google Bookmarks"><img src="http://coderscult.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F06%2F25%2Fweb-design-with-search-engine-optimization-in-mind%2F&amp;title=Web%20Design%20with%20Search%20Engine%20Optimization%20in%20Mind" title="StumbleUpon"><img src="http://coderscult.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F06%2F25%2Fweb-design-with-search-engine-optimization-in-mind%2F" title="Technorati"><img src="http://coderscult.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="" title="YahooMyWeb"><img src="http://coderscult.com/wp-content/plugins/sociable/images/" title="YahooMyWeb" alt="YahooMyWeb" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/xhtml-css/2008/06/25/web-design-with-search-engine-optimization-in-mind/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS Dropdown Menu</title>
		<link>http://coderscult.com/xhtml-css/2008/03/13/css-dropdown-menu/</link>
		<comments>http://coderscult.com/xhtml-css/2008/03/13/css-dropdown-menu/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 14:22:07 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
				<category><![CDATA[HTML/XHTML and CSS]]></category>

		<guid isPermaLink="false">http://coderscult.com/htmlxhtml-and-css/2008/03/13/css-dropdown-menu/</guid>
		<description><![CDATA[Ever wondered how to make those drop-down menus using CSS?  There are many ways to do it but they are all pretty similar.  Here&#8217;s how I do it.
The CSS Code

This is the part that gives the dropdown structure.  Without the CSS, all you&#8217;ll get is plain HTML only output.
Filename: dropdown.css
/*
&#160;CSS Dropdown Stylesheet
&#160;by [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wondered how to make those drop-down menus using <acronym title="Cascading Style Sheet">CSS</acronym>?  There are many ways to do it but they are all pretty similar.  Here&#8217;s how I do it.</p>
<h3>The CSS Code</h3>
<p><span id="more-6"></span></p>
<p>This is the part that gives the dropdown structure.  Without the CSS, all you&#8217;ll get is plain HTML only output.</p>
<p><b><u>Filename: dropdown.css</u></b></p>
<div class="dean_ch" style="white-space: wrap;"><span class="coMULTI">/*<br />
&nbsp;CSS Dropdown Stylesheet<br />
&nbsp;by Mike Lopez<br />
&nbsp;http://coderscult.com<br />
*/</span></p>
<p>ul<span class="re1">.dropdown</span> <span class="br0">&#123;</span><br />
&nbsp;<span class="kw1">margin</span>: <span class="nu0">0</span>;<br />
&nbsp;<span class="kw1">padding</span>: <span class="nu0">0</span>;<br />
&nbsp;<span class="kw1">list-style</span>: <span class="kw2">none</span>;<br />
&nbsp;<span class="kw1">float</span>: <span class="kw1">left</span>;<br />
&nbsp;<span class="kw1">width</span>: <span class="re3"><span class="nu0">100</span>%</span>;<br />
<span class="br0">&#125;</span><br />
<span class="re1">.dropdown</span> li <span class="br0">&#123;</span><br />
&nbsp;<span class="kw1">margin</span>: <span class="nu0">0</span>;<br />
&nbsp;<span class="kw1">padding</span>: <span class="nu0">0</span>;<br />
&nbsp;<span class="kw1">float</span>: <span class="kw1">left</span>;<br />
&nbsp;<span class="kw1">position</span>: <span class="kw2">relative</span>;<br />
<span class="br0">&#125;</span><br />
<span class="re1">.dropdown</span> ul <span class="br0">&#123;</span><br />
&nbsp;<span class="kw1">display</span>: <span class="kw2">none</span>;<br />
&nbsp;<span class="kw1">float</span>: <span class="kw2">none</span>;<br />
&nbsp;<span class="kw1">margin</span>: <span class="nu0">0</span>;<br />
&nbsp;<span class="kw1">padding</span>: <span class="nu0">0</span>;<br />
&nbsp;<span class="kw1">list-style</span>: <span class="kw2">none</span>;<br />
<span class="br0">&#125;</span><br />
<span class="re1">.dropdown</span> li li <span class="br0">&#123;</span><br />
&nbsp;<span class="kw1">float</span>: <span class="kw2">none</span>;<br />
&nbsp;<span class="kw1">display</span>: <span class="kw2">inline</span>;<br />
&nbsp;<span class="kw1">white-space</span>: <span class="kw2">nowrap</span>;<br />
<span class="br0">&#125;</span></p>
<p><span class="re1">.dropdown</span> li<span class="re2">:hover</span> ul, <span class="re1">.dropdown</span> li<span class="re1">.lihover</span> ul <span class="br0">&#123;</span><br />
&nbsp;<span class="kw1">position</span>: <span class="kw2">absolute</span>;<br />
&nbsp;<span class="kw1">display</span>: <span class="kw2">block</span>;<br />
<span class="br0">&#125;</span></p>
<p><span class="re1">.dropdown</span> a <span class="br0">&#123;</span><br />
&nbsp;<span class="kw1">display</span>: <span class="kw2">block</span>;<br />
&nbsp;<span class="kw1">padding</span>: <span class="re3">3px</span> <span class="re3">10px</span>;<br />
&nbsp;<span class="kw1">margin</span>: <span class="nu0">0</span> <span class="re3">1px</span> <span class="re3">1px</span> <span class="nu0">0</span>;<br />
&nbsp;<span class="kw1">font-family</span>: Arial, Helvetica, <span class="kw2">sans-serif</span>;<br />
&nbsp;<span class="kw1">font-size</span>: <span class="re3">9pt</span>;<br />
&nbsp;<span class="kw1">background</span>: <span class="re0">#<span class="nu0">080</span></span>;<br />
&nbsp;<span class="kw1">color</span>: <span class="re0">#fff</span>;<br />
&nbsp;<span class="kw1">text-decoration</span>: <span class="kw2">none</span>;<br />
<span class="br0">&#125;</span></p>
<p><span class="re1">.dropdown</span> a<span class="re2">:hover</span> <span class="br0">&#123;</span><br />
&nbsp;<span class="kw1">background</span>: <span class="re0">#0a0</span>;<br />
<span class="br0">&#125;</span></div>
<h3>The Internet Explorer Javascript Hack</h3>
<p>Hey!  Didn&#8217;t I say CSS?  Why do I need Javascript?  Well, if the guys in Microsoft just followed CSS standards properly then we won&#8217;t need to put this javascript.  Yes, this is here because we don&#8217;t want to make those IE users feel left out.</p>
<p><b><u>Filename: dropdown.js</u></b></p>
<div class="dean_ch" style="white-space: wrap;"><span class="coMULTI">/*<br />
&nbsp;CSS Dropdown Javascript for Internet Explorer<br />
&nbsp;by Mike Lopez based on Son-Of-Sucker-Fish IE Hack<br />
&nbsp;http://coderscult.com<br />
*/</span></p>
<p><span class="kw2">var</span> liHover = <span class="kw2">function</span> <span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp;<span class="kw2">var</span> liEls = document.<span class="me1">getElementById</span> <span class="br0">&#40;</span><span class="st0">&quot;dropdown&quot;</span><span class="br0">&#41;</span>.<span class="me1">getElementsByTagName</span> <span class="br0">&#40;</span><span class="st0">&quot;LI&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp;<span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i = <span class="nu0">0</span>; i &lt; liEls.<span class="me1">length</span>; i++<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; liEls<span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">onmouseover</span> = <span class="kw2">function</span> <span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp;<span class="kw1">this</span>.<span class="me1">className</span> += <span class="st0">&quot; lihover&quot;</span>;<br />
&nbsp; <span class="br0">&#125;</span><br />
&nbsp; liEls<span class="br0">&#91;</span>i<span class="br0">&#93;</span>.<span class="me1">onmouseout</span> = <span class="kw2">function</span> <span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp;<span class="kw1">this</span>.<span class="me1">className</span> = <span class="kw1">this</span>.<span class="me1">className</span>.<span class="me1">replace</span> <span class="br0">&#40;</span><span class="kw2">new</span> RegExp <span class="br0">&#40;</span><span class="st0">&quot; lihover<span class="es0">\\</span>b&quot;</span><span class="br0">&#41;</span>, <span class="st0">&quot;&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; <span class="br0">&#125;</span><br />
&nbsp;<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span><br />
<span class="kw1">if</span> <span class="br0">&#40;</span>window.<span class="me1">attachEvent</span><span class="br0">&#41;</span> window.<span class="me1">attachEvent</span> <span class="br0">&#40;</span><span class="st0">&quot;onload&quot;</span>, liHover<span class="br0">&#41;</span>;</div>
<h3>The HTML</h3>
<p>Finally, here&#8217;s the stuff that puts these things together, the html page.</p>
<p><b><u>Filename: dropdown.html</u></b></p>
<div class="dean_ch" style="white-space: wrap;"><span class="sc2"><a href="http://december.com/html/4/element/html.html"><span class="kw2">&lt;html</span></a> xmlns=<span class="st0">&quot;http://www.w3.org/1999/xhtml&quot;</span><span class="kw2">&gt;</span></span><br />
&nbsp;<span class="sc2"><a href="http://december.com/html/4/element/head.html"><span class="kw2">&lt;head&gt;</span></a></span><br />
&nbsp; <span class="sc2"><a href="http://december.com/html/4/element/title.html"><span class="kw2">&lt;title&gt;</span></a></span>CSS Dropdown<span class="sc2"><span class="kw2">&lt;/title&gt;</span></span><br />
&nbsp; <span class="sc2"><a href="http://december.com/html/4/element/link.html"><span class="kw2">&lt;link</span></a> <span class="kw3">rel</span>=<span class="st0">&quot;stylesheet&quot;</span> <span class="kw3">type</span>=<span class="st0">&quot;text/css&quot;</span> <span class="kw3">href</span>=<span class="st0">&quot;dropdown.css&quot;</span> /<span class="kw2">&gt;</span></span><br />
&nbsp; <span class="sc2"><a href="http://december.com/html/4/element/script.html"><span class="kw2">&lt;script</span></a> <span class="kw3">language</span>=<span class="st0">&quot;javascript&quot;</span> <span class="kw3">src</span>=<span class="st0">&quot;dropdown.js&quot;</span><span class="kw2">&gt;</span></span><span class="sc2"><span class="kw2">&lt;/script&gt;</span></span><br />
&nbsp;<span class="sc2"><span class="kw2">&lt;/head&gt;</span></span><br />
&nbsp;<span class="sc2"><a href="http://december.com/html/4/element/body.html"><span class="kw2">&lt;body&gt;</span></a></span><br />
&nbsp; <span class="sc2"><a href="http://december.com/html/4/element/ul.html"><span class="kw2">&lt;ul</span></a> <span class="kw3">class</span>=<span class="st0">&quot;dropdown&quot;</span> <span class="kw3">id</span>=<span class="st0">&quot;dropdown&quot;</span><span class="kw2">&gt;</span></span><br />
&nbsp; &nbsp;<span class="sc2"><a href="http://december.com/html/4/element/li.html"><span class="kw2">&lt;li&gt;</span></a></span><span class="sc2"><a href="http://december.com/html/4/element/a.html"><span class="kw2">&lt;a</span></a> <span class="kw3">href</span>=<span class="st0">&quot;#&quot;</span><span class="kw2">&gt;</span></span>Link 1<span class="sc2"><span class="kw2">&lt;/a&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc2"><a href="http://december.com/html/4/element/ul.html"><span class="kw2">&lt;ul&gt;</span></a></span><br />
&nbsp; &nbsp; &nbsp;<span class="sc2"><a href="http://december.com/html/4/element/li.html"><span class="kw2">&lt;li&gt;</span></a></span><span class="sc2"><a href="http://december.com/html/4/element/a.html"><span class="kw2">&lt;a</span></a> <span class="kw3">href</span>=<span class="st0">&quot;#&quot;</span><span class="kw2">&gt;</span></span>Sublink 1-1<span class="sc2"><span class="kw2">&lt;/a&gt;</span></span><span class="sc2"><span class="kw2">&lt;/li&gt;</span></span><br />
&nbsp; &nbsp; &nbsp;<span class="sc2"><a href="http://december.com/html/4/element/li.html"><span class="kw2">&lt;li&gt;</span></a></span><span class="sc2"><a href="http://december.com/html/4/element/a.html"><span class="kw2">&lt;a</span></a> <span class="kw3">href</span>=<span class="st0">&quot;#&quot;</span><span class="kw2">&gt;</span></span>Sublink 1-2<span class="sc2"><span class="kw2">&lt;/a&gt;</span></span><span class="sc2"><span class="kw2">&lt;/li&gt;</span></span><br />
&nbsp; &nbsp; &nbsp;<span class="sc2"><a href="http://december.com/html/4/element/li.html"><span class="kw2">&lt;li&gt;</span></a></span><span class="sc2"><a href="http://december.com/html/4/element/a.html"><span class="kw2">&lt;a</span></a> <span class="kw3">href</span>=<span class="st0">&quot;#&quot;</span><span class="kw2">&gt;</span></span>Sublink 1-3<span class="sc2"><span class="kw2">&lt;/a&gt;</span></span><span class="sc2"><span class="kw2">&lt;/li&gt;</span></span><br />
&nbsp; &nbsp; &nbsp;<span class="sc2"><a href="http://december.com/html/4/element/li.html"><span class="kw2">&lt;li&gt;</span></a></span><span class="sc2"><a href="http://december.com/html/4/element/a.html"><span class="kw2">&lt;a</span></a> <span class="kw3">href</span>=<span class="st0">&quot;#&quot;</span><span class="kw2">&gt;</span></span>Sublink 1-4<span class="sc2"><span class="kw2">&lt;/a&gt;</span></span><span class="sc2"><span class="kw2">&lt;/li&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc2"><span class="kw2">&lt;/ul&gt;</span></span><br />
&nbsp; &nbsp;<span class="sc2"><span class="kw2">&lt;/li&gt;</span></span><br />
&nbsp; &nbsp;<span class="sc2"><a href="http://december.com/html/4/element/li.html"><span class="kw2">&lt;li&gt;</span></a></span><span class="sc2"><a href="http://december.com/html/4/element/a.html"><span class="kw2">&lt;a</span></a> <span class="kw3">href</span>=<span class="st0">&quot;#&quot;</span><span class="kw2">&gt;</span></span>Link 2<span class="sc2"><span class="kw2">&lt;/a&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc2"><a href="http://december.com/html/4/element/ul.html"><span class="kw2">&lt;ul&gt;</span></a></span><br />
&nbsp; &nbsp; &nbsp;<span class="sc2"><a href="http://december.com/html/4/element/li.html"><span class="kw2">&lt;li&gt;</span></a></span><span class="sc2"><a href="http://december.com/html/4/element/a.html"><span class="kw2">&lt;a</span></a> <span class="kw3">href</span>=<span class="st0">&quot;#&quot;</span><span class="kw2">&gt;</span></span>Sublink 2-1<span class="sc2"><span class="kw2">&lt;/a&gt;</span></span><span class="sc2"><span class="kw2">&lt;/li&gt;</span></span><br />
&nbsp; &nbsp; &nbsp;<span class="sc2"><a href="http://december.com/html/4/element/li.html"><span class="kw2">&lt;li&gt;</span></a></span><span class="sc2"><a href="http://december.com/html/4/element/a.html"><span class="kw2">&lt;a</span></a> <span class="kw3">href</span>=<span class="st0">&quot;#&quot;</span><span class="kw2">&gt;</span></span>Sublink 2-2 lipsum<span class="sc2"><span class="kw2">&lt;/a&gt;</span></span><span class="sc2"><span class="kw2">&lt;/li&gt;</span></span><br />
&nbsp; &nbsp; &nbsp;<span class="sc2"><a href="http://december.com/html/4/element/li.html"><span class="kw2">&lt;li&gt;</span></a></span><span class="sc2"><a href="http://december.com/html/4/element/a.html"><span class="kw2">&lt;a</span></a> <span class="kw3">href</span>=<span class="st0">&quot;#&quot;</span><span class="kw2">&gt;</span></span>Sublink 2-3<span class="sc2"><span class="kw2">&lt;/a&gt;</span></span><span class="sc2"><span class="kw2">&lt;/li&gt;</span></span><br />
&nbsp; &nbsp; &nbsp;<span class="sc2"><a href="http://december.com/html/4/element/li.html"><span class="kw2">&lt;li&gt;</span></a></span><span class="sc2"><a href="http://december.com/html/4/element/a.html"><span class="kw2">&lt;a</span></a> <span class="kw3">href</span>=<span class="st0">&quot;#&quot;</span><span class="kw2">&gt;</span></span>Sublink 2-4<span class="sc2"><span class="kw2">&lt;/a&gt;</span></span><span class="sc2"><span class="kw2">&lt;/li&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc2"><span class="kw2">&lt;/ul&gt;</span></span><br />
&nbsp; &nbsp;<span class="sc2"><span class="kw2">&lt;/li&gt;</span></span><br />
&nbsp; &nbsp;<span class="sc2"><a href="http://december.com/html/4/element/li.html"><span class="kw2">&lt;li&gt;</span></a></span><span class="sc2"><a href="http://december.com/html/4/element/a.html"><span class="kw2">&lt;a</span></a> <span class="kw3">href</span>=<span class="st0">&quot;#&quot;</span><span class="kw2">&gt;</span></span>Link 3<span class="sc2"><span class="kw2">&lt;/a&gt;</span></span><span class="sc2"><span class="kw2">&lt;/li&gt;</span></span><br />
&nbsp; <span class="sc2"><span class="kw2">&lt;/ul&gt;</span></span><br />
&nbsp;<span class="sc2"><span class="kw2">&lt;/body&gt;</span></span><br />
<span class="sc2"><span class="kw2">&lt;/html&gt;</span></span></div>
<p>There you go.  Copy and paste the code into their proper filenames and check it out.  Here&#8217;s a working sample:</p>
<div align="center"><iframe src='http://coderscult.com/wp-content/uploads/2008/03/dropdown.html'><a href='http://coderscult.com/wp-content/uploads/2008/03/dropdown.html' title='dropdown.html' target='_blank'>CSS Dropdown Sample</a></iframe></div>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share this Post through Social Bookmarking</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F03%2F13%2Fcss-dropdown-menu%2F&amp;title=CSS%20Dropdown%20Menu&amp;bodytext=Ever%20wondered%20how%20to%20make%20those%20drop-down%20menus%20using%20CSS%3F%20%20There%20are%20many%20ways%20to%20do%20it%20but%20they%20are%20all%20pretty%20similar.%20%20Here%27s%20how%20I%20do%20it.%0D%0A%0D%0AThe%20CSS%20Code%0A%0A%0D%0A%0D%0AThis%20is%20the%20part%20that%20gives%20the%20dropdown%20structure.%20%20Without%20the%20CSS%2C%20all%20you%27ll%20get%20i" title="Digg"><img src="http://coderscult.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F03%2F13%2Fcss-dropdown-menu%2F" title="Sphinn"><img src="http://coderscult.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://delicious.com/post?url=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F03%2F13%2Fcss-dropdown-menu%2F&amp;title=CSS%20Dropdown%20Menu&amp;notes=Ever%20wondered%20how%20to%20make%20those%20drop-down%20menus%20using%20CSS%3F%20%20There%20are%20many%20ways%20to%20do%20it%20but%20they%20are%20all%20pretty%20similar.%20%20Here%27s%20how%20I%20do%20it.%0D%0A%0D%0AThe%20CSS%20Code%0A%0A%0D%0A%0D%0AThis%20is%20the%20part%20that%20gives%20the%20dropdown%20structure.%20%20Without%20the%20CSS%2C%20all%20you%27ll%20get%20i" title="del.icio.us"><img src="http://coderscult.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F03%2F13%2Fcss-dropdown-menu%2F&amp;t=CSS%20Dropdown%20Menu" title="Facebook"><img src="http://coderscult.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F03%2F13%2Fcss-dropdown-menu%2F&amp;title=CSS%20Dropdown%20Menu" title="Mixx"><img src="http://coderscult.com/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F03%2F13%2Fcss-dropdown-menu%2F&amp;title=CSS%20Dropdown%20Menu&amp;annotation=Ever%20wondered%20how%20to%20make%20those%20drop-down%20menus%20using%20CSS%3F%20%20There%20are%20many%20ways%20to%20do%20it%20but%20they%20are%20all%20pretty%20similar.%20%20Here%27s%20how%20I%20do%20it.%0D%0A%0D%0AThe%20CSS%20Code%0A%0A%0D%0A%0D%0AThis%20is%20the%20part%20that%20gives%20the%20dropdown%20structure.%20%20Without%20the%20CSS%2C%20all%20you%27ll%20get%20i" title="Google Bookmarks"><img src="http://coderscult.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F03%2F13%2Fcss-dropdown-menu%2F&amp;title=CSS%20Dropdown%20Menu" title="StumbleUpon"><img src="http://coderscult.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://technorati.com/faves?add=http%3A%2F%2Fcoderscult.com%2Fxhtml-css%2F2008%2F03%2F13%2Fcss-dropdown-menu%2F" title="Technorati"><img src="http://coderscult.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="" title="YahooMyWeb"><img src="http://coderscult.com/wp-content/plugins/sociable/images/" title="YahooMyWeb" alt="YahooMyWeb" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/xhtml-css/2008/03/13/css-dropdown-menu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
