<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Video Training - Tutorials &#187; CSS Tabbed Menu Tutorial</title>
	<atom:link href="http://learnola.com/category/xhtml-and-css-tutorials/css-tabbed-menu-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://learnola.com</link>
	<description>An insight into the world of Training Software</description>
	<lastBuildDate>Thu, 05 Jan 2012 08:00:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='learnola.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Video Training - Tutorials &#187; CSS Tabbed Menu Tutorial</title>
		<link>http://learnola.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://learnola.com/osd.xml" title="Video Training - Tutorials" />
	<atom:link rel='hub' href='http://learnola.com/?pushpress=hub'/>
		<item>
		<title>XHTML Tutorial CSS Tabbed Menu</title>
		<link>http://learnola.com/2008/10/28/xhtml-tutorial-css-tabbed-menu/</link>
		<comments>http://learnola.com/2008/10/28/xhtml-tutorial-css-tabbed-menu/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 21:57:45 +0000</pubDate>
		<dc:creator>apexmedia</dc:creator>
				<category><![CDATA[CSS Tabbed Menu Tutorial]]></category>
		<category><![CDATA[CSS Menu]]></category>
		<category><![CDATA[CSS Tutorials]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[XHTML Training]]></category>

		<guid isPermaLink="false">http://apexmedia.wordpress.com/?p=130</guid>
		<description><![CDATA[Tabbed menu One hugely useful way of displaying your menu items is in the form of tabs. The following tutorial will take you through some simple steps to build your own tabbed menu, without so much as a .gif or line of JavaScript in sight&#8230; Open up a blank XHTML document with a style statement [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learnola.com&amp;blog=4742992&amp;post=130&amp;subd=apexmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Tabbed menu</h2>
<p>One hugely useful way of displaying your menu items is in the form of tabs. The following tutorial will take you through some simple steps to build your own<a href="example.html" target="_blank"> tabbed menu</a>, without so much as a .gif or line of JavaScript in sight&#8230;</p>
<p>Open up a blank XHTML document with a style statement within the &lt;head&gt; tags. This is where we&#8217;ll place out CSS code.</p>
<div style="color:#999900;">
<p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;</p>
<p>&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=UTF-8&#8243; /&gt;<br />
&lt;title&gt;button&lt;/title&gt;<br />
&lt;style&gt;<br />
&lt;/style&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></div>
<p>Now let&#8217;s set out the XHTML markup for our menu, between the &lt;body&gt; tags:</p>
<div style="color:#999900;">&lt;ul class=&#8221;menu_tabbed&#8221;&gt;<br />
&lt;li&gt;&lt;a href=&#8221;"&gt;tab one&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#8221;"&gt;tab two&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#8221;"&gt;tab three&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&#8221;"&gt;tab four&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</div>
<p>This is a straight-forward unordered list which we&#8217;ve given the class of &#8216;menu_tabbed&#8217;. Within it are four list items, each one of which contains a link.</p>
<p>That&#8217;s it for the markup, now let&#8217;s set up some CSS to give our document some basic styles. Place the following between the &lt;style&gt; tags:</p>
<div style="color:#999900;">body {<br />
font-family:Verdana, Arial, Helvetica, sans-serif;<br />
font-size:12px;<br />
color:#333333;<br />
padding: 30px;<br />
}</div>
<p>This just gives our document a default text color (#333333), font and font size. I&#8217;ve also just given the documents &#8216;body&#8217; a padding of 30px in order for our menu to be held away from the page edges. This will make it all slightly easier to view on our part.</p>
<p>Now some attributes for our unordered list, identifiable by it&#8217;s class &#8216;menu_tabbed&#8217;. Firstly, it has no list-style. This removes the bullet points from the list items &#8211; in all circumstances, in all browsers. Secondly it has a solid border along it&#8217;s bottom edge of 1px and the color #999999. Lastly some padding at the bottom in order to hold the border away from our tabs as we&#8217;ll soon see.</p>
<div style="color:#999900;">ul.menu_tabbed {<br />
list-style: none;<br />
border-bottom: 1px #999999 solid;<br />
padding-bottom: 10px<br />
}</div>
<p>Test it in a browser, your menu should now look something like this:</p>
<div><img src="http://talentedpixel.com/wp-content/themes/revolution_music-10/images/tab1.jpg" alt=" " /></div>
<p>Now let&#8217;s style our list items, identifiable as &#8216;li&#8217; within the &#8216;ul&#8217; which has a class of &#8216;menu_tabbed&#8217;.</p>
<div style="color:#999900;">ul.menu_tabbed li {<br />
display: inline;<br />
margin-right: 5px;<br />
}</div>
<p>We&#8217;ll display the list items &#8216;inline&#8217; which will distribute them horizontally across the page. Each one has a margin on the right of 5px in order to hold it away from the previous list item. Now your menu should now look something like this:</p>
<div><img src="http://talentedpixel.com/wp-content/themes/revolution_music-10/images/tab2.jpg" alt="" /></div>
<p>Having dealt with our list and the list items within it, we can now turn our attention to the links, identifiable as the &#8216;a&#8217; within the &#8216;li&#8217; within the &#8216;ul&#8217; which has a class of &#8216;menu_tabbed&#8217;. Place the following within your CSS code:</p>
<div style="color:#999900;">ul.menu_tabbed li a {<br />
color:#999999;<br />
text-decoration: none;<br />
background: #f7f7f7;<br />
border: 1px #CCCCCC solid;<br />
border-bottom: none;<br />
padding: 10px 14px;</div>
<p>}</p>
<p>There&#8217;s a little more styling involved here as most of the visual effects are tied to the links. First give the text a faint color of #999999 and remove the underline by stating no text-decoration. Then give a background of #f7f7f7 and a solid 1px border of #CCCCCC. There&#8217;ll be no border on the bottom, as this is catered for by the border on the bottom of our unordered list.</p>
<p>Lastly, give the links some padding; 10px at the top and bottom and 14px left and right. The 10px padding at the bottom will allow the links&#8217; bottom edge to meet with the bottom edge of the unordered list which we also gave a padding of 10px.</p>
<p>Check your menu again in a browser:</p>
<div><img src="http://talentedpixel.com/wp-content/themes/revolution_music-10/images/tab3.jpg" alt="" /></div>
<p>Now let&#8217;s give our tabs some styling for their hover state, one simple line of CSS:</p>
<div style="color:#999900;">ul.menu_tabbed li a:hover {<br />
padding: 14px 14px 10px 14px;<br />
}</div>
<p>This padding overrides the padding for the links which we&#8217;ve previously set. It differs only by giving an extra 4px padding at the top which gives the tabs the impression of being lifted like so:</p>
<div><img src="http://talentedpixel.com/wp-content/themes/revolution_music-10/images/tab4.jpg" alt="" /></div>
<p>Finally we&#8217;re going add some style for when one of the menu items is selected. Add the class &#8216;selected&#8217; to your second list item:</p>
<div style="color:#999900;">&lt;li&gt;&lt;a href=&#8221;" class=&#8221;selected&#8221;&gt;tab two&lt;/a&gt;&lt;/li&gt;</div>
<p>Now let&#8217;s add some CSS to determine what the selected tab looks like:</p>
<div style="color:#999900;">ul.menu_tabbed li a.selected {<br />
color:#666666;<br />
background:#FFFFFF;<br />
border: 1px #999999 solid;<br />
border-bottom: 1px #FFFFFF solid;<br />
padding: 14px 14px 10px 14px;<br />
}</div>
<p>We&#8217;ve darkened the text to make it stand out, the background is white, as is it&#8217;s bottom border. This will cover the bottom border of the unordered list giving the impression that the tab is &#8216;connected&#8217; to the page underneath. The padding will match the padding we&#8217;ve given to the link hover state; slightly raising the tab.</p>
<p>That&#8217;s it! Check your final menu in a browser!</p>
<div><img src="http://talentedpixel.com/wp-content/themes/revolution_music-10/images/tab5.jpg" alt="" /></div>
<div style="margin:15px;">It should look like this: <a href="http://talentedpixel.com/wp-content/themes/revolution_music-10/tab-example.html" target="_blank">CSS Tabbed Example »</a> </div>
<br /> Tagged: CSS Menu, CSS Tutorials, XHTML, XHTML Training <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/apexmedia.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/apexmedia.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/apexmedia.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/apexmedia.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/apexmedia.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/apexmedia.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/apexmedia.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/apexmedia.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/apexmedia.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/apexmedia.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/apexmedia.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/apexmedia.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/apexmedia.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/apexmedia.wordpress.com/130/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=learnola.com&amp;blog=4742992&amp;post=130&amp;subd=apexmedia&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://learnola.com/2008/10/28/xhtml-tutorial-css-tabbed-menu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2529d8f6ec74ee1afd5fd7dd213c6d5c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">apexmedia</media:title>
		</media:content>

		<media:content url="http://talentedpixel.com/wp-content/themes/revolution_music-10/images/tab1.jpg" medium="image">
			<media:title type="html"> </media:title>
		</media:content>

		<media:content url="http://talentedpixel.com/wp-content/themes/revolution_music-10/images/tab2.jpg" medium="image" />

		<media:content url="http://talentedpixel.com/wp-content/themes/revolution_music-10/images/tab3.jpg" medium="image" />

		<media:content url="http://talentedpixel.com/wp-content/themes/revolution_music-10/images/tab4.jpg" medium="image" />

		<media:content url="http://talentedpixel.com/wp-content/themes/revolution_music-10/images/tab5.jpg" medium="image" />
	</item>
	</channel>
</rss>
