<?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>Dave PC Guy &#187; navbar</title>
	<atom:link href="http://www.davepcguy.com/archive/tag/navbar/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davepcguy.com</link>
	<description>Computers and Technology</description>
	<lastBuildDate>Fri, 08 Apr 2011 15:01:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>CSS Lesson 4 Lists</title>
		<link>http://www.davepcguy.com/archive/css-lesson-4-lists/</link>
		<comments>http://www.davepcguy.com/archive/css-lesson-4-lists/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 19:24:54 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[formatting]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[lists]]></category>
		<category><![CDATA[navbar]]></category>
		<category><![CDATA[webpage]]></category>

		<guid isPermaLink="false">http://www.davepcguy.com/?p=469</guid>
		<description><![CDATA[Lists HTML CSS Lists are an important part of CSS, they are used to primarily make navbars. I&#8217;ll cover some basics with you and how to set up your list. In my NEXT tutorial, I&#8217;ll show you how to make VERTICAL navbars. I know, I know, you&#8217;re asking, &#8220;Why are you splitting it up?&#8221; Well,]]></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%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-4-lists%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=clrkmck&amp;style=normal&amp;service_api=clrkmck%3AR_a73f58a91ed3515157df75ab6c37730f&amp;hashtags=css,formatting,lesson,lists,navbar,webpage&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<ul style="list-style: circle inside">
<li>
<h1 style="padding: 20px; font-size: 45px; color: white; text-shadow: 0px 1px .3px black"><a href="http://www.davepcguy.com/archive/css-lesson-4-lists/">Lists</a> </h1>
<ol style="list-style: lower-greek inside">
<li><a href="#html">HTML</a></li>
<li><a href="#css">CSS</a></li>
</ol>
</li>
</ul>
<p>Lists are an important part of CSS, they are used to primarily make navbars. I&#8217;ll cover some basics with you and how to set up your list. In my NEXT tutorial, I&#8217;ll show you how to make VERTICAL navbars. I know, I know, you&#8217;re asking, &#8220;Why are you splitting it up?&#8221; Well, mostly because I&#8217;ll have to cover vertical and horizontal navigation separately. There are tips and tricks to both, and although some apply to both, many do not. I&#8217;m starting out with lists all alone because it&#8217;s easier that way. When you need to review an item in CSS, you can switch between the different lessons and it won&#8217;t be all jumbled up.  I&#8217;ve found that numerous tutorials online do not explain this area thoroughly enough so I hope it will help you out.<br />
<span id="more-469"></span><br />
</p>
<ul>
<li>
<h1 style="padding: 15px"><a name="html">Lists (HTML)</a></h1>
</li>
</ul>
<p>Lists are important in PHP, and especially to navbars so I plan to spend some time discussing the HTML as well. There are two basic types of lists: an ordered list that starts with the tag &lt;ol&gt; and an unordered list &lt;ul&gt;. The idea is that you enclose a list in these tags and then write out each item with the tags &lt;li&gt; surrounding them. Here is what it should look like:</p>
<blockquote><p>&lt;ul&gt;</p>
<p>&lt;li&gt;first item&lt;/li&gt;</p>
<p>&lt;li&gt;second item&lt;/li&gt;</p>
<p>&lt;/ul&gt;</p>
<ul>
<li>first item</li>
<li>second item</li>
</ul>
</blockquote>
<p>Substitute &lt;ol&gt; for &lt;ul&gt; and you&#8217;ll get a numbered list:</p>
<blockquote>
<ol>
<li>first item</li>
<li>second item</li>
</ol>
</blockquote>
<p>There are also definition lists but you won&#8217;t need to know these to create navbars, at least not with me, but here is how they work. You start out with a &lt;dl&gt; tag to tell the browser you&#8217;re making a definition list. Then you list a definition term &lt;dt&gt; followed by the defintion description &lt;dd&gt; like this:</p>
<blockquote><p>&lt;dl&gt;</p>
<p>&lt;dt&gt;cow&lt;/dt&gt;</p>
<p>&lt;dd&gt;an animal&lt;/dd&gt;</p>
<p>&lt;dt&gt;dog&lt;/dt&gt;</p>
<p>&lt;dd&gt;another animal&lt;/dd&gt;</p>
<p>&lt;/dl&gt;</p>
<dl>
<dt>cow</dt>
<dd>an animal</dd>
<dt>dog</dt>
<dd>another animal</dd>
</dl>
</blockquote>
<p>One more thing, you can embed multiple lists by starting another list inside a list. Let me show you:</p>
<blockquote><p>&lt;ul&gt;</p>
<p>&lt;li&gt;first item</p>
<p>&lt;ul&gt;</p>
<p>&lt;li&gt;item a&lt;/li&gt;</p>
<p>&lt;li&gt;item b&lt;/li&gt;</p>
<p>&lt;/ul&gt;</p>
<p>&lt;/li&gt;</p>
<p>&lt;li&gt;second item&lt;/li&gt;</p>
<p>&lt;/ul&gt;</p>
<ul>
<li>first item
<ul>
<li>item a</li>
<li>item b</li>
</ul>
</li>
<li>second item</li>
</ul>
</blockquote>
<p>And that&#8217;s it for the HTML part. Simple, huh? Well remember it. All you need to really remember is how to start an unordered list with &lt;ul&gt; and that each item in the list has to be enclosed within the &lt;li&gt; tag.</p>
<ul>
<li>
<h1 style="padding: 15px"><a name="css">Lists (CSS)</a></h1>
</li>
</ul>
<p>The above was just to make sure you know how to do all of that basic stuff. Let&#8217;s move onto the basic CSS when it comes to lists. Now, you may wonder, what basics? Well, to create a navbar, you need to know everything from the previous lessons, especially all that stuff about borders and padding. There are SOME properties only inherent to lists, and that&#8217;s what I&#8217;ll deal with here.</p>
<p>Let&#8217;s start with the <strong>unordered list</strong>. You see those bullet points on the left of the item? Let&#8217;s change them to something else:</p>
<blockquote>
<p style="text-align: left;">ul.circle {list-style-type: circle}</p>
<ul style="list-style-type:circle">
<li>circle</li>
</ul>
<p style="text-align: left;">ul.square {list-style-type: square}</p>
<ul style="list-style-type:square">
<li>square</li>
</ul>
<p style="text-align: left;">ul.disc {list-style-type: disc}</p>
<ul style="list-style-type:disc">
<li>disc</li>
</ul>
<p style="text-align: left;">ul.none {list-style-type: none}</p>
<ul style="list-style-type:none">
<li>none</li>
</ul>
</blockquote>
<p>For the <strong>ordered list, </strong>you can use the same as above except in the CSS you&#8217;d change &#8220;ul&#8221; to &#8220;ol&#8221;. You can also use the following:</p>
<blockquote><p>ol.armenian {list-style-type: armenian}</p>
<ol style="list-style-type:armenian">
<li>armenian</li>
</ol>
<p>ol.decimal {list-style-type: decimal}</p>
<ol style="list-style-type:decimal">
<li>decimal</li>
</ol>
<p>ol.leadingzero {list-style-type: decimal-leading-zero}</p>
<ol style="list-style-type:decimal-leading-zero">
<li>decimal-leading-zero</li>
</ol>
<p>ol.georgian {list-style-type: georgian}</p>
<ol style="list-style-type:georgian">
<li>georgian</li>
</ol>
<p>ol.loweralpha {list-style-type: lower-alpha}</p>
<ol style="list-style-type:lower-alpha">
<li>lower-alpha</li>
</ol>
<p>ol.upperalpha {list-style-type: upper-alpha}</p>
<ol style="list-style-type:upper-alpha">
<li>upper-alpha</li>
</ol>
<p>ol.lowergreek {list-style-type: lower-greek}</p>
<ol style="list-style-type:lower-greek">
<li>lower-greek</li>
</ol>
<p>ol.lowerlatin {list-style-type: lower-latin}</p>
<ol style="list-style-type:lower-latin">
<li>lower-latin</li>
</ol>
<p>ol.upperlatin {list-style-type: upper-latin}</p>
<ol style="list-style-type:upper-latin">
<li>upper-latin</li>
</ol>
<p>ol.lowerroman {list-style-type: lower-roman}</p>
<ol style="list-style-type:lower-roman">
<li>lower-roman</li>
</ol>
<p>ol.upperroman {list-style-type: upper-roman}</p>
<ol style="list-style-type:upper-roman">
<li>upper-roman</li>
</ol>
</blockquote>
<p><strong>List-style-position</strong> is the next property,  its values are &#8220;inside&#8221; and &#8220;outside&#8221;. The default is set to &#8220;outside&#8221; and it determines the indent of the list. If you want the indent to be counted from the beginning of the text, it&#8217;s &#8220;outside&#8221;. If you want the text to start from the bulletpoint, use inside.</p>
<blockquote><p>&lt;ul style=&#8221;list-style-position: inside&#8221;&gt;</p>
<ul style="list-style-position: inside">
<li>text</li>
</ul>
<p>&lt;ul style=&#8221;list-style-position: outside&#8221;&gt;</p>
<ul style="list-style-position: outside">
<li>text</li>
</ul>
</blockquote>
<p>Let&#8217;s say you want an image to replace the bulletpoint, you set up a special &#8220;arrow&#8221; or whatever to replace it. You can do that using <strong>list-style-image</strong> and the following formula:</p>
<blockquote><p>ul { list-style-image: url(&#8216;image.png&#8217;) }</p></blockquote>
<p>Replace image.png with the right address. Unfortunately, this style is not supported by all browsers so I&#8217;ll use a little trick mentioned at <a href="http://www.w3schools.com/css/tryit.asp?filename=trycss_list_background-image">W3Schools:</a></p>
<blockquote><p>ul<br />
{<br />
list-style-type:none;<br />
padding:0px;<br />
margin:0px;<br />
}<br />
li<br />
{<br />
background-image:url(&#8216;arrow.png&#8217;);<br />
background-repeat:no-repeat;<br />
background-position:0px 5px;<br />
padding-left:14px;<br />
}</p></blockquote>
<p>All you do there is remove the lis-style-type and added a background image to the &lt;li&gt; tag that will be used as the bullet point. Finally, let&#8217;s look at the <strong>shorthand</strong>:</p>
<blockquote><p>ul {</p>
<p>list-style: none outside url(arrow.png);</p>
<p>}</p></blockquote>
<p>The order of properties is: type, position, image.</p>
<p>That&#8217;s it for lists! Yeah, nothing exciting, I know but it&#8217;s essential to know these things before moving on to navigation bars.</p>
<p>Here&#8217;s what we&#8217;ll be dealing with in my next tutorial by putting all the previous tutorial information together:</p>
<div id="attachment_501" class="wp-caption aligncenter" style="width: 172px"><a href="http://www.davepcguy.com/wp-content/uploads/2009/09/navbar.html"><img class="size-full wp-image-501" title="navbar" src="http://www.davepcguy.com/wp-content/uploads/2009/09/navbar.png" alt="NAvBar picture" width="162" height="79" /></a><p class="wp-caption-text">NAvBar picture</p></div>
<p>Click on the picture and it&#8217;ll take you to an example vertical navbar</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-4-lists%2F&amp;partner=sociable" title="Print"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-4-lists%2F&amp;title=CSS%20Lesson%204%20Lists&amp;bodytext=Lists%20HTMLCSS%0D%0ALists%20are%20an%20important%20part%20of%20CSS%2C%20they%20are%20used%20to%20primarily%20make%20navbars.%20I%27ll%20cover%20some%20basics%20with%20you%20and%20how%20to%20set%20up%20your%20list.%20In%20my%20NEXT%20tutorial%2C%20I%27ll%20show%20you%20how%20to%20make%20VERTICAL%20navbars.%20I%20know%2C%20I%20know%2C%20you%27re%20asking%2C%20%22" title="Digg"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-4-lists%2F&amp;title=CSS%20Lesson%204%20Lists&amp;notes=Lists%20HTMLCSS%0D%0ALists%20are%20an%20important%20part%20of%20CSS%2C%20they%20are%20used%20to%20primarily%20make%20navbars.%20I%27ll%20cover%20some%20basics%20with%20you%20and%20how%20to%20set%20up%20your%20list.%20In%20my%20NEXT%20tutorial%2C%20I%27ll%20show%20you%20how%20to%20make%20VERTICAL%20navbars.%20I%20know%2C%20I%20know%2C%20you%27re%20asking%2C%20%22" title="del.icio.us"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-4-lists%2F&amp;t=CSS%20Lesson%204%20Lists" title="Facebook"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-4-lists%2F&amp;title=CSS%20Lesson%204%20Lists&amp;annotation=Lists%20HTMLCSS%0D%0ALists%20are%20an%20important%20part%20of%20CSS%2C%20they%20are%20used%20to%20primarily%20make%20navbars.%20I%27ll%20cover%20some%20basics%20with%20you%20and%20how%20to%20set%20up%20your%20list.%20In%20my%20NEXT%20tutorial%2C%20I%27ll%20show%20you%20how%20to%20make%20VERTICAL%20navbars.%20I%20know%2C%20I%20know%2C%20you%27re%20asking%2C%20%22" title="Google Bookmarks"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-4-lists%2F&amp;title=CSS%20Lesson%204%20Lists&amp;source=Dave+PC+Guy+Computers+and+Technology&amp;summary=Lists%20HTMLCSS%0D%0ALists%20are%20an%20important%20part%20of%20CSS%2C%20they%20are%20used%20to%20primarily%20make%20navbars.%20I%27ll%20cover%20some%20basics%20with%20you%20and%20how%20to%20set%20up%20your%20list.%20In%20my%20NEXT%20tutorial%2C%20I%27ll%20show%20you%20how%20to%20make%20VERTICAL%20navbars.%20I%20know%2C%20I%20know%2C%20you%27re%20asking%2C%20%22" title="LinkedIn"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-4-lists%2F&amp;title=CSS%20Lesson%204%20Lists" title="Reddit"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-4-lists%2F&amp;t=CSS%20Lesson%204%20Lists&amp;s=Lists%20HTMLCSS%0D%0ALists%20are%20an%20important%20part%20of%20CSS%2C%20they%20are%20used%20to%20primarily%20make%20navbars.%20I%27ll%20cover%20some%20basics%20with%20you%20and%20how%20to%20set%20up%20your%20list.%20In%20my%20NEXT%20tutorial%2C%20I%27ll%20show%20you%20how%20to%20make%20VERTICAL%20navbars.%20I%20know%2C%20I%20know%2C%20you%27re%20asking%2C%20%22" title="Tumblr"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=CSS%20Lesson%204%20Lists%20-%20http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-4-lists%2F" title="Twitter"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  target="_blank" href="mailto:?subject=CSS%20Lesson%204%20Lists&amp;body=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-4-lists%2F" title="email"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/email_link.png" title="email" alt="email" /></a>
	<a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=CSS%20Lesson%204%20Lists&amp;url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-4-lists%2F" title="Slashdot"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.davepcguy.com%2Farchive%2Fcss-lesson-4-lists%2F&amp;title=CSS%20Lesson%204%20Lists" title="StumbleUpon"><img src="http://www.davepcguy.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.davepcguy.com/archive/css-lesson-4-lists/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

