<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss 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" version="2.0">

<channel>
	<title>Free CSS Templates</title>
	
	<link>http://freecss.info</link>
	<description />
	<pubDate>Sat, 19 Jul 2008 02:15:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/freecss/ANAz" type="application/rss+xml" /><item>
		<title>rgrgrr</title>
		<link>http://freecss.info/free-css-templates/rgrgrr/</link>
		<comments>http://freecss.info/free-css-templates/rgrgrr/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 02:15:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Free CSS Templates]]></category>

		<guid isPermaLink="false">http://freecss.info/?p=60</guid>
		<description><![CDATA[grg
]]></description>
			<content:encoded><![CDATA[<p>grg</p>
]]></content:encoded>
			<wfw:commentRss>http://freecss.info/free-css-templates/rgrgrr/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Freeness Template</title>
		<link>http://freecss.info/free-css-templates/freeness-template-2/</link>
		<comments>http://freecss.info/free-css-templates/freeness-template-2/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 02:12:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Free CSS Templates]]></category>

		<guid isPermaLink="false">http://freecss.info/?p=55</guid>
		<description><![CDATA[This is a nice modern looking and colourful template to be enjoyed.
]]></description>
			<content:encoded><![CDATA[<p>This is a nice modern looking and colourful template to be enjoyed.</p>
]]></content:encoded>
			<wfw:commentRss>http://freecss.info/free-css-templates/freeness-template-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>add</title>
		<link>http://freecss.info/free-css-templates/add/</link>
		<comments>http://freecss.info/free-css-templates/add/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 02:06:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Free CSS Templates]]></category>

		<guid isPermaLink="false">http://freecss.info/?p=52</guid>
		<description><![CDATA[asddd
]]></description>
			<content:encoded><![CDATA[<p>asddd</p>
]]></content:encoded>
			<wfw:commentRss>http://freecss.info/free-css-templates/add/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Freeness Template</title>
		<link>http://freecss.info/free-css-templates/freeness-template/</link>
		<comments>http://freecss.info/free-css-templates/freeness-template/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 01:59:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Free CSS Templates]]></category>

		<guid isPermaLink="false">http://freecss.info/?p=48</guid>
		<description><![CDATA[This is a simple and great looking, modern template.
]]></description>
			<content:encoded><![CDATA[<p>This is a simple and great looking, modern template.</p>
]]></content:encoded>
			<wfw:commentRss>http://freecss.info/free-css-templates/freeness-template/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Complete CSS Tutorial</title>
		<link>http://freecss.info/site-news/complete-css-tutorial/</link>
		<comments>http://freecss.info/site-news/complete-css-tutorial/#comments</comments>
		<pubDate>Sun, 16 Sep 2007 11:44:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Site News]]></category>

		<guid isPermaLink="false">http://localhost/wordpress/?p=41</guid>
		<description><![CDATA[The tutorial is finally here.  It will guide you through all the processes involved in coding a design from photoshop into valid XHTML and CSS. The tutorial took quite a while to write so I hope you like it and can learn from it.  The tutorial covers many CSS techniques and can teach [...]]]></description>
			<content:encoded><![CDATA[<p>The tutorial is finally here.  It will guide you through all the processes involved in coding a design from photoshop into valid XHTML and CSS. The tutorial took quite a while to write so I hope you like it and can learn from it.  The tutorial covers many CSS techniques and can teach someone with no experience to code CSS.</p>
<p>You can visit the content page for the tutorial outlining all the different parts over at the following:<a href="http://www.freecss.info/complete"> Complete CSS Tutorial</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://freecss.info/site-news/complete-css-tutorial/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS Template Tutorial - Right column links</title>
		<link>http://freecss.info/free-css-tutorials/css-template-tutorial-right-column-links-2/</link>
		<comments>http://freecss.info/free-css-tutorials/css-template-tutorial-right-column-links-2/#comments</comments>
		<pubDate>Sun, 16 Sep 2007 11:40:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Free CSS Tutorials]]></category>

		<guid isPermaLink="false">http://localhost/wordpress/?p=40</guid>
		<description><![CDATA[Welcome to the final part of the tutorial. So far you should have picked up all the techniques and expertise to code a template. I will show you in this part how to finish the template off with a footer and just make our coding a little neater. I will also give a few tips [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to the final part of the tutorial. So far you should have picked up all the techniques and expertise to code a template. I will show you in this part how to finish the template off with a footer and just make our coding a little neater. I will also give a few tips for optimizing you website.<span id="more-33"></span></p>
<h4>Coding the footer using CSS</h4>
<p>I reckon you should probably be able to do this on your own by now but if not don&#8217;t worry. I will go through making the footer for the template. Basically its going to be within the wrapper div (holding the website content) and below the ending tags for the content. The attributes needed for our example will be width 100% and with a solid background colour.</p>
<blockquote><p>.footer{<br />
width:100%;<br />
padding-top:15px;<br />
padding-bottom:15px;<br />
color:#fff;<br />
text-align:center;<br />
background:#4E4739;<br />
}</p></blockquote>
<p>All pretty self explanatory I would say. No need for anything complicated for this one. For the XHTML simple place the following just before the final div end tag (the one for wrapper div):</p>
<blockquote><p>&lt;div class=&#8221;footer&#8221;&gt;Template by &lt;a href=&#8221;http://www.freecss.info&#8221;&gt;freecss.info&lt;/a&gt;&lt;/div&gt;</p></blockquote>
<p>So thats its for the CSS and XHTML. You are completed. Now time to just clean a couple things up.</p>
<h4>CSS in external stylesheet</h4>
<p>I believe you can do this in more than one way but I will just do it the way I am used to. Its quite simple. Press file then new and select CSS. Go to code mode of your current template and copy everything after &lt;style type=&#8221;text/css&#8221;&gt; and before &lt;/style&gt;. Past this into the code mode for the CSS file. If want you can only copy it into notepad. Next save the file as style.css and in your tutorial folder.</p>
<p>You have now created your style sheet. Next thing to do is to remove from &lt;style type=&#8221;text/css&#8221;&gt; to &lt;/style&gt; on your index.html. Also remove the tags themselves. The template now has no CSS defined. If you switch to design mode you will see what your website would look like with CSS turned off- Just as well CSS exists <img src='http://freecss.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now you will need to link in your index.html to you style sheet. This is simple. Just add the following code you to your index.html&#8217;s head section (after title tag probably and before the &lt;/head&gt; tag).</p>
<blockquote><p>&lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; href=&#8221;style.css&#8221;/&gt;</p></blockquote>
<p>If you check in design mode you should now see your template with CSS defined.</p>
<h4>Make sure everything validates</h4>
<p>I always do this with my websites but sometimes it doesn&#8217;t really make much of a difference. Its best to have proper compliant code which validates. To check your CSS and HTML use <a href="http://validator.w3.org/">w3c validator</a>. You can choose various options to validate your code there. It will tell you any problems which you should be able to then go and fix.</p>
<p>After checking my coding I found no errors. That just comes after many years of coding. At first I would make something like 20 different errors on my first draft of coding so to speak. If you have problems with the way your website is displaying its often worth checking to see what the errors if any for your coding are. It can often show up spelling mistakes and typos.</p>
<h4>Some search engine optimization tips</h4>
<p>A few tips for coding templates. First off try to keep any text in your templates as html text. Try not to contain text in images. If you do this its best to use the image replacement technique to make it look as though the image is text. Its also best to use alt tags for you images that you do have. This helps with accessibility. Have your website title or keyword in your title tag. This is probably the biggest on page seo factor so use it!</p>
<h4>You have reached the end</h4>
<p>Well if I was to say it was great fun <img src='http://freecss.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> I would be lying (deleted parts and had to rewrite them. Lots of stumbling blocks and time was spent on this tutorial so please if you find any problems with it post them here and I will try to sort them out. I hope you found the tutorial interesting and informative. You can hopefully learn something from what I have written.</p>
<p><a href="tutorial_files/tutorial.zip">Download Finished Template</a></p>
<p><a href="tutorial/index.html">Preview Finished Template </a></p>
<p>If you wish to request or ask me something please post them here. Thats all for now folks!</p>
]]></content:encoded>
			<wfw:commentRss>http://freecss.info/free-css-tutorials/css-template-tutorial-right-column-links-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS Template Tutorial - Right column links</title>
		<link>http://freecss.info/free-css-tutorials/css-template-tutorial-right-column-links/</link>
		<comments>http://freecss.info/free-css-tutorials/css-template-tutorial-right-column-links/#comments</comments>
		<pubDate>Sun, 16 Sep 2007 11:37:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Free CSS Tutorials]]></category>

		<guid isPermaLink="false">http://localhost/wordpress/?p=39</guid>
		<description><![CDATA[The tutorial is almost over and the template is almost finished. In this part I will show you how to create the simple navigation which is on the right column in the design preview. It is going to be a navigation created using unordered lists just like other ones.
If we look at the design we [...]]]></description>
			<content:encoded><![CDATA[<p>The tutorial is almost over and the template is almost finished. In this part I will show you how to create the simple navigation which is on the right column in the design preview. It is going to be a navigation created using unordered lists just like other ones.</p>
<p>If we look at the design we can see each list item is going to need a border at the bottom and a custom bullet on the left.</p>
<h4>Slicing the bullet image </h4>
<p>As usual I slice the images needed first. We are just going to need the one image for this navigation. Simply slice the square bullet in image ready and save as usual. Remember to zoom in to make it easier.</p>
<p><img src="tutorial_files/t21.gif" alt="css tutorial" width="300" height="83" /> </p>
<h4>Coding the vertical navigation in CSS </h4>
<p>Right now we have the images needed. All we have to do now is to code it. The code isn&#8217;t very difficult so I will just present it to you. You should be able to see each thing is created using the CSS. If you want something explained just ask.</p>
<blockquote><p>.rightcolumn ul<br />
  {<br />
  list-style-type: none;<br />
  padding-left:0;<br />
  margin:0;<br />
  text-align: left;<br />
  width:100%;<br />
  font-family:Verdana, Arial, Helvetica, sans-serif;<br />
  padding-top:5px;<br />
  }<br />
  .rightcolumn ul li{<br />
  padding-top:6px;<br />
  padding-bottom:6px;<br />
  border-bottom:1px solid #E8D9BD;<br />
  margin:0;<br />
  }<br />
  .rightcolumn ul li a<br />
  {<br />
  background:url(images/nullet_29.gif) left no-repeat;<br />
  text-align: left;<br />
  padding-left: 20px;<br />
  font-size:11px;<br />
  text-decoration: none;<br />
  color: #4E4739;<br />
  }</p>
<p>.rightcolumn ul li a:hover<br />
  {<br />
  background:url(images/nullet_29.gif) left no-repeat;<br />
  color: #4E4739;<br />
  padding-left: 20px;<br />
  text-decoration:underline;</br><br />
}</p></blockquote>
<p>A couple things to note from the above example. List navigations such as this can be given paddings by default. That is the reason for the padding-left:0 for the ul. The list-type:none removes the regular bullet and the background attribute is used for our bullet image.</p>
<p>The XHML for the navigation is really simple. The navigations like this can only be shown on the right column but numerous can be added. The XHTML should be:</p>
<blockquote><p> &lt;ul&gt;<br />
&lt;li&gt;&lt;a href=&quot;http://www.yoururl.com&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</p></blockquote>
<p>After you have added this you should see something like below when you preview:</p>
<p><img src="tutorial_files/rightnav.gif" alt="right navigation" width="200" height="173" /> </p>
<h4>Something wrong? </h4>
<p>As in other parts if you have done something wrong or need further explanation please post a comment. You can also download the example source code thus for from here: <a href="tutorial_files/code6.txt">example code</a>. </p>
<h4>In the next part </h4>
<p>We will finish off the template by adding a footer and cleaning it up a little. We will also move the CSS into a separate file.</p>
<p><a href="#">Step 8- Finishing Off </a></p>
]]></content:encoded>
			<wfw:commentRss>http://freecss.info/free-css-tutorials/css-template-tutorial-right-column-links/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS Template Tutorial - Coding post content</title>
		<link>http://freecss.info/free-css-tutorials/css-template-tutorial-coding-post-content/</link>
		<comments>http://freecss.info/free-css-tutorials/css-template-tutorial-coding-post-content/#comments</comments>
		<pubDate>Sun, 16 Sep 2007 11:36:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Free CSS Tutorials]]></category>

		<guid isPermaLink="false">http://localhost/wordpress/?p=38</guid>
		<description><![CDATA[In this part we will code the article background and the comments button. For the design we are using for the tutorial the content on the left is a post in wordpress. The content of each post is going to be held in a div with a background at the top. There is also a [...]]]></description>
			<content:encoded><![CDATA[<p>In this part we will code the article background and the comments button. For the design we are using for the tutorial the content on the left is a post in wordpress. The content of each post is going to be held in a div with a background at the top. There is also a div tag inside that one with the background at the bottom. The comment button will then be added into the end of the inner article div into its own div. </p>
<h4>Coding the article CSS  </h4>
<p>This part is going to be simple so it probably won&#8217;t be very long. Simply slice the background pattern at the top of the article like so:</p>
<p><img src="tutorial_files/t19.gif" alt="rustic content" width="300" height="111" /> </p>
<p>The coding is actually quite complicated because the inner div used. Basically you have the article div. This is the holder for artfoot and has the background at the top. The line-height attribute just spaces the lines a bit more. The art foot is therefore inside the article div and has the borders and paddings applied to it. The margin bottom is also added so when you have numerous posts there is a gap between them. </p>
<blockquote><p> .article{<br />
width:500px;<br />
background:#F5EEE0 url(images/topbg_26.gif) top repeat-x;<br />
line-height:20px;<br />
}<br />
.artfoot{<br />
width:479px;<br />
margin-bottom:30px;<br/><br />
text-align:left;<br />
padding-top:5px;<br />
padding-left:10px;<br />
padding-right:10px;<br />
border-left:1px solid #CBA964;<br />
border-right:1px solid #CBA964;<br />
background:url(images/artfoot_30.gif) repeat-x bottom;<br />
border-bottom:3px solid #CBA964;<br />
}</p></blockquote>
<p>You should place the XHTML for the article and artfoot divs after the closing tag for holder. When you add text inside the artfoot div you should have &lt;p&gt; before each paragraph and &lt;/p&gt; at the end.</p>
<blockquote><p>&lt;div class=&quot;article&quot;&gt;<br />
&lt;div class=&quot;artfoot&quot;&gt;<br />
&lt;p&gt;This is an example paragraph . &lt;/p&gt;<br />
&lt;div class=&quot;infobar&quot;&gt; Comments (5)&lt;/div&gt; &lt;/div&gt;<br />
&lt;/div&gt;</p></blockquote>
<h4>Coding the comments button  </h4>
<p>As you can see from the above code I have put the comments button into an info bar div. So lets first define the CSS for the infobar then change the coding for the actual comments button. The coding for the infobar should be simple. Some padding at the bottom, full width, padding to the right and text aligned to the right. The coding of the infobar is just to get the comments button in the right place.</p>
<blockquote><p> .infobar{<br />
width:438px;<br />
padding-right:40px;<br />
text-align:right;<br />
padding-bottom:10px;<br />
} </p></blockquote>
<p><strong>Note</strong>: Since the artfoot has a 1px border on either side and 10px padding on either side the width available for the infobar is a maximum of 500 - (2+20) = 478px.</p>
<p>That should be all the coding we need for the info bar. The actual comments link is going to be more difficult. I am going to make it easier by making the button a fixed width meaning we just need to slice the button background and no need for repeats.</p>
<p><img src="tutorial_files/t20.gif" alt="comment button" width="300" height="95" /></p>
<h4>CSS for comments link </h4>
<p>I have referred to the comments link as a button as it appears like a button. Please don&#8217;t confuse this with a form button. It is simply a link with CSS used to define the background image and area for the link. The coding for this is actually pretty complicated. I decided to make it a list so other links could be added as well such as read more. If you want me to explain it please post a comment. Otherwise you can just use my code and try to adapt it if you need to:</p>
<blockquote><p> .infobar ul{<br />
list-style:none;<br />
text-align:right;<br />
margin:0;<br />
}<br />
.infobar ul li{<br />
width:109px;<br />
height:24px;<br />
padding-top:2px;<br />
background:no-repeat top center url(images/button_33.gif);<br />
text-align:center;<br />
color:#F4EDDF;<br />
float:right;<br />
font-weight:bold;<br />
font-size:11px;<br />
font-family:Verdana;<br />
}<br />
.infobar ul li a:link, .infobar ul li a:visited, .infobar ul li a:hover{<br />
display:block;<br />
text-decoration:none;<br />
color:#F4EDDF;<br />
} </p></blockquote>
<p>The XHTML has therefore also changed and a clear has been added since the li items are floated to the right. You should end up with XHTML like:</p>
<blockquote><p> &lt;div class=&quot;article&quot;&gt;<br />
&lt;div class=&quot;artfoot&quot;&gt;<br />
&lt;p&gt;Example paragraph in a post  &lt;/p&gt;<br />
&lt;div class=&quot;infobar&quot;&gt; &lt;ul&gt;&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Comments (5)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;&lt;/div&gt; <br />
&lt;/div&gt;<br />
&lt;/div&gt; </p></blockquote>
<p>You should now have completed the left column. All that is left to do is the links on the right and a really simple footer. Like always if you have any problems post a comment and check out the <a href="tutorial_files/code5.txt">example code</a>. </p>
<p><a href="#">Step 7- Right Column Navigation </a></p>
]]></content:encoded>
			<wfw:commentRss>http://freecss.info/free-css-tutorials/css-template-tutorial-coding-post-content/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS Template Tutorial - Column floating</title>
		<link>http://freecss.info/free-css-tutorials/css-template-tutorial-column-floating/</link>
		<comments>http://freecss.info/free-css-tutorials/css-template-tutorial-column-floating/#comments</comments>
		<pubDate>Sun, 16 Sep 2007 11:32:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Free CSS Tutorials]]></category>

		<guid isPermaLink="false">http://localhost/wordpress/?p=37</guid>
		<description><![CDATA[This is going to be a short part of the tutorial. In this part I will basically set up the left and right columns so they are ready to add the content to. This is the basic structuring of our template. First thing you will need to note is the gradient underneath the navigation on [...]]]></description>
			<content:encoded><![CDATA[<p>This is going to be a short part of the tutorial. In this part I will basically set up the left and right columns so they are ready to add the content to. This is the basic structuring of our template. First thing you will need to note is the gradient underneath the navigation on the design. This will have to be added as a background for a content div.</p>
<h4>Slice content background </h4>
<p>Like always go into image ready and slice the top gradient underneath the navigation as such:</p>
<p><img src="tutorial_files/t13.gif" alt="slice guide" width="400" height="111" /> </p>
<p>Most designs have gradients underneath the navigation and above the content or as a background for the content. In those cases make the slice 1px wide. In this case I also have a pattern. Therefore to make it flow it has to be a reasonable width as describe in previous parts of the tutorial.</p>
<h4>CSS coding for columns and content </h4>
<p>The idea is we we have a div called content which will hold both columns. It should be the full width of the wrapper div. Since the columns will be floated inside the content div we will need a clearing div after the columns but before the ending tag of the content div (clearing divs are explained in previous part). To work out the widths for the columns use the technique of slicing images on the design. This isn&#8217;t going to work for the example since the width of the design in the psd is not 800px. </p>
<p>We should therefore have the following CSS coding:</p>
<blockquote><p> .content{<br />
width:800px;<br />
background:url(images/undernav_22.gif) repeat-x top;<br />
}<br />
.leftcolumn{<br />
float:left;<br />
width:500px;<br />
padding:20px;<br />
}<br />
.rightcolumn{<br />
width:220px;<br />
padding-top:20px;<br />
padding-bottom:20px;<br />
padding-right:20px;<br />
float:right;<br />
}</p></blockquote>
<p>To me that coding seems pretty logical, yeah? Basically the content holds the two columns. One is wide and floated on the left side with padding so the text inside it won&#8217;t go right to the edges and the other is think and floated to the right (will hold further navigations and links). There is also a gap between the two columns so the are not too close and cluttered looking. To do that simply make sure the widths of the two columns (including paddings) is less that 800px. It just takes some experimenting to get the right looking dimensions. I tend to guess then change them instead of calculating it properly.</p>
<p>The XHTML code used is:</p>
<blockquote><p><span class="style1">&lt;div class=&quot;content&quot;&gt;</span><br />
  <span class="style4">&lt;div class=&quot;leftcolumn&quot;&gt;&lt;/div&gt;</span><br />
  <span class="style6">&lt;div class=&quot;rightcolumn&quot;&gt;&lt;/div&gt;</span><br />
  <span class="style7">&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;</span><br />
<span class="style2">&lt;/div&gt;  </span></p></blockquote>
<p>You should already know how XHTML works by now but if you didn&#8217;t I have highlighted which closing tags go with which opening tags. It may make it easier to understand. Put this coding section after the closing tag for the nav. If the XHTML worked any differently ie the first red closing div closed the content div you would end up with overlapping element and it just wouldn&#8217;t work.</p>
<p>If you go to the design mode on dreamweaver you should now have something like the following:</p>
<p><img src="tutorial_files/t14.gif" alt="css columns" width="400" height="117" /> </p>
<p>We have the basic shell which we will add the content to. We may find that we will change the width of the columns later and add some extra CSS but this will do for now.</p>
<p>You can download the example code thus far here: <a href="tutorial_files/code3.txt">Example code.</a> </p>
<p><a href="#">Step 6- Coding the content </a></p>
]]></content:encoded>
			<wfw:commentRss>http://freecss.info/free-css-tutorials/css-template-tutorial-column-floating/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS Template Tutorial - CSS Horizontal Navigation</title>
		<link>http://freecss.info/free-css-tutorials/css-template-tutorial-css-horizontal-navigation/</link>
		<comments>http://freecss.info/free-css-tutorials/css-template-tutorial-css-horizontal-navigation/#comments</comments>
		<pubDate>Sat, 15 Sep 2007 21:49:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Free CSS Tutorials]]></category>

		<guid isPermaLink="false">http://localhost/wordpress/?p=36</guid>
		<description><![CDATA[Welcome to the horizontal navigation tutorial. So far you should understand CSS and the way it works and you should have a header with a logo. In this part you will be coding and slicing the horizontal navigation as you can see in the preview. of the design. The tutorial is to create a &#34;sliding [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to the horizontal navigation tutorial. So far you should understand CSS and the way it works and you should have a header with a logo. In this part you will be coding and slicing the horizontal navigation as you can see in the preview. of the design. The tutorial is to create a &quot;sliding door&quot; technique navigation since it has rounded edges.</p>
<p>If there was not rounded corners we could simple repeat an image in the horizontal direction. Since it has rounded corners we cannot do this.</p>
<h4>Slicing the navigation background </h4>
<p>First we need the light background to repeat the full way across the wrapper and to hold each navigation item. To do this you first need to slice the background image like in the diagram. This will be repeated in the x-axis:</p>
<p><img src="tutorial_files/t9.gif" width="300" height="94" alt="css navigation tab" /></p>
<p>Usually I would make the selection 1px wide but since there is a pattern it must flow just like the header background had to flow together.</p>
<h4>Coding the navigation background </h4>
<p>This is going to be very simple. Just a div container with the full width of wrapper and of the height of the image which will be repeated on the x-axis.</p>
<blockquote><p>.nav{<br />
  width:800px;<br />
  height:37px;<br />
  background:url(images/navbg_12.gif) repeat-x top;<br />
  } </p></blockquote>
<p>That should be the CSS of the nav container which will hold each navigation item. We may need to adjust it with some padding but we can do that later. You then need to add the XHTML for the nav div container after the closing tag for the header:</p>
<blockquote><p>&lt;body&gt;<br />
  &lt;div class=&quot;wrapper&quot;&gt;<br />
&lt;div class=&quot;header&quot;&gt;<br />
&lt;h1&gt;&lt;a href=&quot;#&quot;&gt;Free CSS &lt;/a&gt;&lt;/h1&gt;<br />
&lt;/div&gt;<br />
<strong>&lt;div class=&quot;nav&quot;&gt;&lt;/div&gt;</strong><br />
&lt;/div&gt;<br />
&lt;/body&gt; </p></blockquote>
<h4>Slicing the images for the navigation tabs </h4>
<p>This part is the simple part. Things you need to keep in mind. The left image is as thin as possible and the right is to be bigger than you should ever need as it will vary how much of that image is displayed. It doesn&#8217;t repeat, just more of it is revealed.</p>
<p>The first image is the left side. To slice that image you will use the slice tool as always in image ready:</p>
<p><img src="tutorial_files/t10.gif" alt="navigation item" width="400" height="120" />  </p>
<p>Make sure you have no text on the tab and that the right side is going to be wider than you should ever require (wider than any link will be):</p>
<p><img src="tutorial_files/t11.gif" alt="rounder corners" width="300" height="44" /> </p>
<h4>Coding a navigation as a list </h4>
<p>When coding a navigation using CSS we use the &lt;ul&gt; and &lt;li&gt; tags. This stands for unordered list and list item. Each link is a list item which is part of an unordered list. This means the unordered list will be held inside the nav div container we just created. </p>
<p>The coding for the navigation is quite complicated. I will paste the code first then go through each part so you can understand what we are doing:</p>
<blockquote><p>.nav ul {<br />
  margin:0;<br />
  font-size:11px;<br />
  font-weight:bold;<br />
  padding-left:50px;<br />
  padding-top:7px;<br />
  list-style:none;<br />
  }<br />
  .nav li {<br />
  float:left;<br />
  background:url(images/navleft_15.gif) no-repeat left top;<br />
  margin-right:10px;<br />
  padding:0 0 0 15px;<br />
  border-bottom:1px solid #ccc;<br />
  }<br />
  .nav a {<br />
  float:left;<br />
  display:block;<br />
  background:url(images/navright_16.gif) no-repeat right top;<br />
  padding-top:5px;<br />
  padding-right:20px;<br />
  padding-bottom:7px;<br />
  padding-left:6px;<br />
  text-decoration:none;<br />
  color:#FFFFFF;<br />
  }<br />
  /* Commented Backslash Hack<br />
  hides rule from IE5-Mac \*/<br />
  .nav a {float:none;}<br />
  /* End IE5-Mac hack */<br />
  .nav a:hover {<br />
  color:#FFF;<br />
  text-decoration:underline;<br />
  }<br />
  .clear{<br />
  clear:both;<br />
  }</p></blockquote>
<p>The XHTML is very simple in comparison:</p>
<blockquote><p> &lt;ul&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;News&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Products&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Categories&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt; </p></blockquote>
<p>The whole extract should go between the opening and closing tags for the nav container. Each li is a link.</p>
<h4>CSS explained </h4>
<p>The coding for the CSS looks huge and overwhelming? Don&#8217;t worry, in reality its not too complicated. You don&#8217;t even have to understand it to use it. This is one of the more complex types off navigations because each item consists of two images and must be able to expand.</p>
<p><em>list-style:none</em> - This removes the bullets for each item. This is a standard with unordered lists.</p>
<p>Something else which you should note when using the sliding door technique. The padding on the left side (in this case 15px) must equal the width of the left image. You can see this in the second set of coding. Instead of writing it out I wrote it in one padding. The order goes top, right, bottom and then left.</p>
<p>In the third set of coding the right padding 20px needs to be equal to the left padding on the previous set plus the padding on the left defined in that one. In this example that means 15px plus 5px. That ensures the text is displayed in the exact center of the tab background.</p>
<h4>The use of css hacks  </h4>
<p>You will also notice in the CSS coding a hack. This is something which is used to fix any cross browser differences. Firefox may display the code correctly but IE6 may show it incorrectly. This is a problem with some code and the hack is needed here. I don&#8217;t often use hacks and tend to just copy it from other code. This is actually a really good way to learn.</p>
<h4>Whats up with the .clear css? </h4>
<p>The class called clear is used to clear the floats which we use in the navigation. Floats are pretty self explanatory. It floats an object either to the left or right. This allows multiple objects on the one line whereas without the float it would just appear on the left and one underneath the other. A problem with floats however is that it can break the look of your design. It can cause other div containers not to expand to hold them. So in this case the wrapper div would not expand. </p>
<p>To fix div containers which don&#8217;t expand due to floats held inside them you simply add the clear:both attribute to the css class for clear. You can then insert a short line underneath your floats to clears them and make the wrapper or containing div expand. For this example place the following XHTML under the closing tag for the <strong>nav container</strong> not ul . </p>
<blockquote><p>&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;</p></blockquote>
<p>You should now have a functioning and great looking css navigation. No? If you have some problems post a comment here and I will try to help you.</p>
<p><img src="tutorial_files/t12.gif" alt="css template" width="400" height="105" /> </p>
<p>You should have something like the above. If you want here is the source code which I have thus far: <a href="/tutorial_files/code2.txt">Example code</a>. Also just to say to people who are familiar with CSS. I am currently keeping the css in the head section of the page instead of in an external stylesheet purely to make things easier while coding. I will switch it to an external sheet at the end and show how to link to it properly. </p>
<p><a href="#">Step 5- Floating the columns</a></p>
]]></content:encoded>
			<wfw:commentRss>http://freecss.info/free-css-tutorials/css-template-tutorial-css-horizontal-navigation/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
