<?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>WebMuch &#187; HTML &amp; CSS</title>
	<atom:link href="http://webmuch.com/category/tutorials/html-css/feed/" rel="self" type="application/rss+xml" />
	<link>http://webmuch.com</link>
	<description>Everything about the web</description>
	<lastBuildDate>Tue, 16 Feb 2010 10:05:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Website Build-Up Series &#8211; Final</title>
		<link>http://webmuch.com/website-build-up-series-final/</link>
		<comments>http://webmuch.com/website-build-up-series-final/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 00:24:52 +0000</pubDate>
		<dc:creator>Aayush</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=57</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/04/post-intro-image2.png" alt="Website Build-Up Series Photo" title="Website Build-Up Series Photo" width="150" height="150" class="alignnone size-full wp-image-58" />This is the final part of the website build-up series I started, In this tutorial we will be styling the main content part of the page and the footer. By the end of this tutorial you will have a complete web page totally hand coded by you and totally understood by you for future maintenance and hopefully better understanding of XHTML &#038; CSS.]]></description>
			<content:encoded><![CDATA[<h3>Preview:</h3>
<p><img src="http://webmuch.com/wp-content/uploads/2009/04/preview1.png" alt="Website Build-Up Series Preview" title="Website Build-Up Series Preview" width="585" height="530" class="alignnone size-full wp-image-60" /><br />
<a href="http://webmuch.com/demos/website_buildup_series/index.html"><br />
<h3>DEMO!</h3>
<p></a><br />
So as you&#8217;ve seen what we are going to end up with. Let&#8217;s start working for it.</p>
<h3>Add Mark Up:</h3>
<p>Inside the content division start by adding a H2 heading and type any heading between the tags. Add a few paragraphs and at-least two images, give one of them a class of rightimg and the other one leftimg. You can add more images but make sure you give them any one of the two class I just mentioned.</p>
<pre class="code">
&lt;div id="content">
	&lt;h2>This is a heading:&lt;/h2>
	&lt;img src="./images/leftimg.png" alt="Title of the image" class="leftimg" />
	&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.&lt;/p>&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.&lt;/p>
	&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.&lt;/p>&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.&lt;/p>
	&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus&lt;/p>&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus&lt;/p>
	&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.&lt;/p>&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.&lt;/p>
	&lt;img src="./images/rightimg.png" alt="Title of the image" class="rightimg" />
	&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.&lt;/p>&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.&lt;/p>
	&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus&lt;/p>&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus&lt;/p>
	&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.&lt;/p>&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.&lt;/p>
	&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.&lt;/p>&lt;p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.&lt;/p>
&lt;/div>&lt;!-- end content -->
</pre>
<p>As we are adding content to the division I would like to share an amazing service I always use. It&#8217;s a Chris Coyier project called <a href="http://html-ipsum.com/">HTML-Ipsum</a>. This is special: as clicking on any heading will copy the respective mark-up onto your clipboard. For example, if you want to add a couple of paras to the page, instead of finding the lorem ipsum routine online, go to <a href="http://html-ipsum.com/">HTML-Ipsum</a> and click on Medium Paragraph come back to your source code and start pasting it. Trust me in the long run it will really make your life easier.</p>
<p>After we&#8217;ve added content to the content division, after the closing tags of content division and content-container division, right before closing tag of the container division(the main website container) add this code:</p>
<pre class="code">

&lt;div id="footer">
	&lt;ul>
		&lt;li>&lt;a href="#">Home&lt;/a>&lt;/li>
		&lt;li>&lt;a href="#">About&lt;/a>&lt;/li>
		&lt;li>&lt;a href="#">Feedback&lt;/a>&lt;/li>
		&lt;li>&lt;a href="#">Contact&lt;/a>&lt;/li>
	&lt;/ul>
	&lt;span id="copy">&copy; Copyrights 2009&lt;/span>
&lt;/div>&lt;!-- end footer -->
</pre>
<p>If we view the page in the browser, we can see the non styled part of the page.<br />
<img src="http://webmuch.com/wp-content/uploads/2009/04/unstyled-footer.png" alt="Website Build-Up Series Picture" title="Website Build-Up Series Picture" width="314" height="96" class="alignnone size-full wp-image-64" /></p>
<h3>Let&#8217;s Style It:</h3>
<p>The CSS code below should be added to the master CSS file. Due to some rendering issues on the page there were few minor tweaks(mostly width and border) I had to do in the master CSS file. Although I have notified most of the issues in the CSS file as comments, I would tell you a method to check the differences between your code and the downloadable source code available below. Google a software called WinMerge or goto: <a href="http://winmerge.org/">winmerge.org</a> (for MAC users the software is: <a href="http://pdb.finkproject.org/pdb/package.php/meld">MELD</a>). These softwares let you find differences between two text files. Just compare your master.css with my downloaded master.css and it will highlight all the differences for you. Me being a Windows User have experience with WinMerge and it&#8217;s awesome. As of MELD is supposed to be the MAC alternative for WinMerge and hopefully it will be good. Although I would like to know about it through the comments.</p>
<p>As of my CSS code, it is filled with explanatory comments and is pretty easy to understand.</p>
<pre class="code">
/* Inside Content */

/*
I have changed the width of the content division we made in the last tutorial by 2 pixels as I have added 1 pixel left and right borders to it.
*/
#content{
overflow:hidden;/* as we will be floating elements inside this (mostly images)*/
/*you can and you should insert this property with the content division properties above I have placed it here to let you know that I have added this now*/
}
#content img{
background: #fff;
padding:5px;/*so the white background is visible*/
border:1px solid #000;
}
#content p{
margin-bottom:10px;
line-height:130%;/*to increase the vertical spacing between lines*/
}
#content h2{
font-size:25px;
font-weight:bold;
color:#263f5d;
font-family:Times, Times New Roman, Georgia, serif;
padding-bottom:5px;/*to make space between the border and text*/
border-bottom:2px dotted #263f5d;
margin-bottom:10px;
}
img.leftimg{/*a class for floating images left*/
float:left;
margin-right:5px;
}
img.rightimg{/*a class for floating images right*/
float:right;
margin-left:5px;
}
#footer{
width:958px;/*as there are left and right borders of 1px each which makes it 960*/
border:1px solid #444;
border-bottom:none;/*to remove the border-bottom*/
background:gray url('../images/footer-bg.png') repeat-x;/*just made a 1px wide and 80px long gradient image and repeated the background on the x-axis*/
height:80px;
line-height:80px;/*to vertically center the inline elements inside it*/
clear:left;/*for clearing the float of sidebar and content. had to insert it as the page wasn't rendering properly*/
/*for some reason our overflow hidden isn't clearing this float. Therefore the clear: left;*/
overflow:hidden;/*for clearing floats inside it*/
}
#footer ul{
width:50%;
float:left;
margin-left:10px;
}
#footer ul li{
display:inline;
margin-right:30px;
}
#footer ul li a{
color:#fff;
text-decoration:none;/*to remove the underline*/
}
#copy{
color:#fff;
float:right;
width:auto;
margin-right:10px;
}
</pre>
<p>If there are any queries please notify me in the comments and I will try my level best to help you with the code. You can also suggest tutorials you want in the comments. Also, please subscribe to my RSS feed, it will help me reach you much faster.</p>
<p>Thanks for reading!<br />
<strong><a href="http://www.webmuch.com/source_files/website_buildup_series.zip">Download the Source Code</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/website-build-up-series-final/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lightbox Effect Maintenance Page</title>
		<link>http://webmuch.com/lightbox-effect-maintenance-page/</link>
		<comments>http://webmuch.com/lightbox-effect-maintenance-page/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 20:50:50 +0000</pubDate>
		<dc:creator>Aayush</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PNG Fix]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=50</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/04/post-intro.png" alt="Lightbox Effect Maintenance Page Photo" title="Lightbox Effect Maintenance Page Photo" width="150" height="150" class="alignnone size-full wp-image-51" />Well the Website Build-Up series was getting a little same-ish so I thought I’d share this cool little technique for telling the user that a page is currently not in use. By the way, this technique would make a great 404 page.]]></description>
			<content:encoded><![CDATA[<h3>Preview:</h3>
<p><img class="alignnone size-full wp-image-52" title="Lightbox Effect Maintenance Page Preview" src="http://webmuch.com/wp-content/uploads/2009/04/preview1.jpg" alt="Lightbox Effect Maintenance Page Preview" width="585" height="585" /><br />
OK! Before starting let me warn you that this technique is totally based on HTML &amp; CSS, so make sure you take care of all this on the server end as-well, which basically means that if the page in the background has a form, then it shouldn’t be active &amp; things like that. So moving on: I have taken an old template I was working on to show the Lightbox overlay effect on it. It is shown below; you can take anything you like instead.<br />
<img class="alignnone size-full wp-image-53" title="Background Template Preview" src="http://webmuch.com/wp-content/uploads/2009/04/back-preview.png" alt="Background Template Preview" width="585" height="655" /><br />
We obviously wouldn’t be making this template here.</p>
<h3>What We Need:</h3>
<ul>
<li>Make a 1px * 1px image in Photoshop and fill a new layer with black and reduce it&#8217;s opacity by 50% then hide the background layer and save the transparent image as a 24bit PNG in the images directory name it overlay.png</li>
<li>Make another image around 400px wide and make something you want to display on a page under maintenance and save it in the images directory name it maintain.png</li>
</ul>
<p>Moving on: Once you have the page to be in the background open it in a text editor of your choice; As the body tag opens, place this code(even before the container).</p>
<pre class="code">&lt;img src="./images/maintain.png" id="maintain" alt=”Under Maintenance” /&gt;
&lt;div id="overlay"&gt;&amp;nbsp;&lt;/div&gt;</pre>
<p>It is the hierarchy we need to understand here. We want to display a dark transparent overlay on the whole page therefore we place the division with an id of overlay on the top and then we want to display a maintenance image on top of it and so we place the img tag with that image even on top of the overlay division.</p>
<p>Now make a new stylesheet in your CSS directory, call it technique.css, include it on the page and then place this code in it. (You can place this code in your master stylesheet as well).</p>
<pre class="code">#overlay{
width:100%;
height:1100px; /*about the height of the background page*/
background:url('../images/overlay.png') repeat; /*to include &amp; repeat the image on the whole page*/
position:absolute; /*to place it anywhere on the page*/
top:0;/*start from  the top*/
left:0;/*and start from  the left*/
z-index:90; /*tells the browser that it should be displayed above the items with a “z-index” value less than 90*/
}
#maintain{
position:absolute;
left:50%; /*so the image starts after half of the page from the left */
top:50%; /*so the image starts after half of the page from the top */
margin: -140px 0 0 -200px; /*we bring up the image by half it’s height and bring it left by half it’s width*/
/*now the image should be in the center of the page.*/
z-index:100; /*tells the browser that it should be displayed above the items with a “z-index” value less than 100*/
}</pre>
<h3>IE6:</h3>
<p>To make the transparent background image render transparent in IE6, download the <a href="http://www.dillerdesign.com/experiment/DD_belatedPNG/#usage">DD_belatedPNG</a> JavaScript. Place the .js file in the js directory of the page and if the IE browser version is less than 7 then include it in our page right before ending the body tag, then open another script tag and run the fix method, pass in the ID of the overlay division in it. To know more about the DD_belatedPNG read it’s <a href="http://www.dillerdesign.com/experiment/DD_belatedPNG">documentation</a>.</p>
<pre class="code">
&lt;!--[if IE 6]>
&lt;script src="./js/DD_belatedPNG_0.0.7a-min.js">&lt;/script>
&lt;script>
  DD_belatedPNG.fix('#overlay');
&lt;/script>
&lt;![endif]-->
</pre>
<p>I’ll be continuing with the Build-Up Series in the next post.</p>
<p>Thanks for reading!</p>
<p><a href="http://webmuch.com/source_files/overlay.zip"><strong>Download the Source Code!</strong></a></p>
]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/lightbox-effect-maintenance-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Website Build-Up Series &#8211; Sidebar</title>
		<link>http://webmuch.com/website-build-up-series-sidebar/</link>
		<comments>http://webmuch.com/website-build-up-series-sidebar/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 21:33:14 +0000</pubDate>
		<dc:creator>Aayush</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[JavaScript & AJAX]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=40</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/04/post-intro-image1.png" alt="Website Build-Up Series - Sidebar Picture" title="Website Build-Up Series - Sidebar Picture" width="150" height="150" class="alignnone size-full wp-image-41" />This is second part of the website build-up series. In this part we'll continue where we left of, we'll make the sidebar with a jQuery accordion and a news box with curved corners and we'll make the main content container ready to work with for the next part.]]></description>
			<content:encoded><![CDATA[<h3>Preview:</h3>
<p><img src="http://webmuch.com/wp-content/uploads/2009/04/preview.png" alt="Website Build-Up Series - Sidebar Preview" title="Website Build-Up Series - Sidebar Preview" width="585" height="452" class="alignnone size-full wp-image-42" /><br />
So as per the preview picture above we will be creating the sidebar of the website and make the main content container ready to work with, for the next part of this tutorial series.</p>
<h3>Preparing:</h3>
<ul>
<li>First we will go to the <a href="http://www.jqueryui.com/">jQueryUI</a> website and click on <a href="http://www.jqueryui.com/download">build custom download</a>.</li>
<li>Now we deselect all the options and then reselect only the ones we need.</li>
</ul>
<p><img src="http://webmuch.com/wp-content/uploads/2009/04/jq_custom.png" alt="Website Build-Up Series - Sidebar Picture" title="Website Build-Up Series - Sidebar Picture" width="550" height="361" class="alignnone size-full wp-image-43" /></p>
<h3>What we need:</h3>
<ul>
<li>We need the UI Core.</li>
<li>We need only one widget: Accordion.</li>
<li>We need only Effects Core.</li>
<li>Make sure to make the download 1.5.3 (Legacy release, for <a href="http://www.jquery.com/">jQuery</a> 1.2.6).</li>
</ul>
<p>Now, open the zip file downloaded and go into the js folder and copy the file &#8220;jquery-ui-1.5.3.custom.min.js&#8221; into a new folder in your website directory, call the folder js. We will not be needing the <a href="http://www.jquery.com/">jQuery</a> JavaScript because we will be using google&#8217;s CDN to jQuery as it saves us bandwidth and it is cached on a lot of computers already, therefore, makes the site faster.</p>
<p>Now, for our curved corners go to: <a href="http://blue-anvil.com/archives/anti-aliased-rounded-corners-with-jquery">blue-anvil</a> and download the Anti-Aliased rounded corners with <a href="http://www.jquery.com/">jQuery</a> zip file. Open the zip file and copy &#8220;jquery.curvycorners.packed.js&#8221; into the js folder of our website directory.</p>
<p>We then include all the JavaScript files in our web page right before ending the body tag:</p>
<pre class="code">&lt;!-- From here --&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;&lt;!-- This is google's free link to the jQuery library --&gt;
&lt;script src="./js/jquery-ui-1.5.3.custom.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="./js/jquery.curvycorners.packed.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
    //jQuery code here...
&lt;/script&gt;
&lt;!-- Till here --&gt;
&lt;/body&gt;</pre>
<p>So from here we finally start coding. Open our index.html in a text editor and start right where we left off i.e. after closing the header division and we will finish our code right before the end of the main container tag which we made in the last tutorial.</p>
<pre class="code">&lt;/div&gt;&lt;!-- end header --&gt;
&lt;!-- Start here --&gt;
&lt;div id="content-container"&gt;

	&lt;div id="sidebar"&gt;

		&lt;h3&gt;Products:&lt;/h3&gt;
		&lt;div id="accordion-container"&gt;
			&lt;ul id="accordion"&gt;
				&lt;li&gt;
					&lt;a href="#recent" class="heading"&gt;Recent Entries&lt;/a&gt;
					&lt;ul id="recent"&gt;
						&lt;li&gt;&lt;a href="#"&gt;Recent Entry Title&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;Recent Entry Title&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;Recent Entry Title&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;Recent Entry Title&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;Recent Entry Title&lt;/a&gt;&lt;/li&gt;
					&lt;/ul&gt;
				&lt;/li&gt;
				&lt;li&gt;
					&lt;a href="#popular" class="heading"&gt;Popular Entries&lt;/a&gt;
					&lt;ul id="popular"&gt;
						&lt;li&gt;&lt;a href="#"&gt;Recent Entry Title&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;Recent Entry Title&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;Recent Entry Title&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;Recent Entry Title&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;Recent Entry Title&lt;/a&gt;&lt;/li&gt;
					&lt;/ul&gt;
				&lt;/li&gt;
				&lt;li&gt;
					&lt;a href="#categories" class="heading"&gt;Categories&lt;/a&gt;
					&lt;ul id="categories"&gt;
						&lt;li&gt;&lt;a href="#"&gt;Category Name&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;Category Name&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;Category Name&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;Category Name&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;Category Name&lt;/a&gt;&lt;/li&gt;
					&lt;/ul&gt;
				&lt;/li&gt;
				&lt;li&gt;
					&lt;a href="#archive" class="heading"&gt;Archive&lt;/a&gt;
					&lt;ul id="archive"&gt;
						&lt;li&gt;&lt;a href="#"&gt;January 2009&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;January 2009&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;January 2009&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;January 2009&lt;/a&gt;&lt;/li&gt;
						&lt;li&gt;&lt;a href="#"&gt;January 2009&lt;/a&gt;&lt;/li&gt;
					&lt;/ul&gt;
				&lt;/li&gt;
			&lt;/ul&gt;&lt;!-- end accordion ul --&gt;
		&lt;/div&gt;&lt;!-- end accordion-container --&gt;
		&lt;h3&gt;Latest Updates:&lt;/h3&gt;
		&lt;div id="curved-box" class="corner-this"&gt;
			&lt;marquee onMouseOver=this.scrollAmount=0 onMouseOut=this.scrollAmount=2	scrollamount=2 direction="up"&gt;
				&lt;p&gt;This is a curved box where you can post latest news. Put up a slider or something.&lt;/p&gt;
				&lt;p&gt;This is a curved box where you can post latest news. Put up a slider or something.&lt;/p&gt;
				&lt;p&gt;This is a curved box where you can post latest news. Put up a slider or something.&lt;/p&gt;
				&lt;p&gt;This is a curved box where you can post latest news. Put up a slider or something.&lt;/p&gt;
				&lt;p&gt;This is a curved box where you can post latest news. Put up a slider or something.&lt;/p&gt;
				&lt;p&gt;This is a curved box where you can post latest news. Put up a slider or something.&lt;/p&gt;
				&lt;p&gt;This is a curved box where you can post latest news. Put up a slider or something.&lt;/p&gt;
				&lt;p&gt;This is a curved box where you can post latest news. Put up a slider or something.&lt;/p&gt;
				&lt;p&gt;This is a curved box where you can post latest news. Put up a slider or something.&lt;/p&gt;
				&lt;p&gt;This is a curved box where you can post latest news. Put up a slider or something.&lt;/p&gt;
				&lt;p&gt;This is a curved box where you can post latest news. Put up a slider or something.&lt;/p&gt;
			&lt;/marquee&gt;
		&lt;/div&gt;&lt;!-- end curved box --&gt;

	&lt;/div&gt;&lt;!-- end sidebar --&gt;
	&lt;div id="content"&gt;
		This is a content box where you can post latest news. Put up a slider or something.
		This is a content box where you can post latest news. Put up a slider or something.
		This is a content box where you can post latest news. Put up a slider or something.
		This is a content box where you can post latest news. Put up a slider or something.
		This is a content box where you can post latest news. Put up a slider or something.
		This is a content box where you can post latest news. Put up a slider or something.
	&lt;/div&gt;&lt;!-- end content --&gt;
&lt;/div&gt;&lt;!-- end content-container --&gt;
&lt;!-- End here --&gt;
&lt;/div&gt;&lt;!-- end container --&gt;</pre>
<p>In the above code: we opened a new container division in which we floated two divisions: a sidebar division to the left and a content division to the right. I gave the content division just a basic padding and then pasted in some gibberish text which we will remove the next time we start working on it. Then, In the sidebar container there are two main elements the accordion container inside which is an unordered list in which there is another unordered list inside each list item and then there a curved-box division inside which is a marquee tag which I don&#8217;t recommend using but I still have placed it there so the page looks a little more lively. I&#8217;d recommend a great slider you can use instead made with <a href="http://www.jquery.com/">jQuery</a> called <a href="http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding">Easy Slider</a>. Now back to what we are making, below is my CSS code which is quite self explanatory as it is well commented.</p>
<pre class="code">#content-container{
	width:100%;
	height:auto;
	overflow:hidden; /* for clearing the floats inside it */
	float:left;
}
#sidebar{
	width:300px;
	margin-right:5px;
	float:left;
}
#sidebar h3{ /* these are the two headings. Products and Latest Updates */
	font-family:Arial;
	font-size:15px;
	color:#000;
	padding:10px;
}
#content{
	float:left;
	width:634px; /* because of 1px border to this element, else it would be 635px  */
	height:800px; /* temporary */
	padding:10px;
	background:#c4c4c4;
	border-bottom: 1px solid #444; /* temporary */
	border-left: 1px solid #444;
}
/* Accordion */
#accordion-container {
	width: 290px;
	margin:0 0 10px 7px; /* top right bottom left */
}
ul#accordion, ul#accordion ul { background:#f8f7f7; }
ul#accordion { border-bottom: 1px solid #444; }
ul#accordion li {
	border: 1px solid #444;
	border-bottom: none; /* to avoid double borders at bottom */
}
ul#accordion ul li {
	border: none; /* to remove the excess borders from previous properties */
	border-bottom: 1px solid #C2C8D1; /* and then put what we like. */
	padding: 5px 10px;  /* [top | bottom] [left | right] */
}
ul#accordion ul li:last-child { border-bottom: none; } /* to remove the borders from the last list element */
ul#accordion a.heading { /* the big menu names in the accordion */
	background: #d9d4ce;
	color: #46382f;
	display: block;
	font-size: 18px;
	line-height: 18px;
	padding: 10px 5px;
	text-decoration: none;
}
ul#accordion a.heading:hover { /* mouseover the big menu names in the accordion */
	background: #46382f;
	color: #fff;
}
ul#accordion li ul a { /* the inside-menu elements */
	color: #000;
	text-decoration:none;
}
ul#accordion li ul a:hover { border-bottom: 1px dotted #46382f; } /* to give the inside-menu elements mouseover */
/* End Accordion */
#curved-box{
	background:#d9d4ce;
	width:288px;
	height:205px;
	padding:10px;
	border:1px solid #444;
	margin:10px 0 10px 7px;
}
#curved-box p{
	margin-bottom:10px;
	padding-bottom:10px;
	border-bottom: 1px dotted #444;
}</pre>
<p>Even though you have styled all the elements the accordion is not together and the curved box doesn&#8217;t have the curved corners yet. Not to worry we only have to write a few more lines of code to accomplish that. Right before the body tag we inserted our scripts, but if you look carefully we inserted three scripts and a fourth empty script tag with only a comment in it saying jQuery code here. Remove that comment and paste the code below in it&#8217;s place.</p>
<pre class="code">$(function(){
	$('#accordion').accordion();
	$('.corner-this').corner();
});</pre>
<p>Refresh your page and play around with the accordion and admire the anti-aliased curved corners.</p>
<p>Also, I have started my community link feed as you can see in the sidebar (Thanks to Collis Ta&#8217;eed&#8217;s Great <a href="http://nettuts.com/working-with-cmss/hack-together-a-user-contributed-link-feed-with-wordpress-comments/">Tutorial</a>) So please contribute to it. It takes less than a minute to submit a link there. So if you happen to have or know a link to a great tutorial or tip or a great article about web design &amp; development please submit it <a href="http://webmuch.com/community-link-feed/#commentform">here</a></p>
<p>Thank You</p>
<h3>Links:</h3>
<ul>
<li><a href="http://www.jqueryui.com/">jQuery UI</a></li>
<li><a href="http://blue-anvil.com/archives/anti-aliased-rounded-corners-with-jquery">Anti-Aliased Curved Corners &#8211; Blue Anvil</a></li>
<li><a href="http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding">Easy Slider</a></li>
</ul>
<p><strong><a href="http://www.webmuch.com/source_files/website_buildup_series.zip">Download the Source Code</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/website-build-up-series-sidebar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website Build-Up Series &#8211; Header</title>
		<link>http://webmuch.com/website-build-up-series-header/</link>
		<comments>http://webmuch.com/website-build-up-series-header/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 15:09:33 +0000</pubDate>
		<dc:creator>Aayush</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=28</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/04/post-intro-image.png" alt="Website Build-Up Series" title="Website Build-Up Series" width="150" height="150" class="alignnone size-full wp-image-32" />Today I am starting an all new Website Build-Up Series. We'll be creating a complete website containing a Home Page, a Products Display Page and a Contact Page with a contact form. Today we'll be completing the header of the website which will be included in all the pages to come.]]></description>
			<content:encoded><![CDATA[<h3>Preview</h3>
<p><img class="alignnone size-full wp-image-29" title="Preview" src="http://webmuch.com/wp-content/uploads/2009/04/preview.jpg" alt="Preview" width="585" height="300" /></p>
<p>I will be making this assuming that you have a basic knowledge of HTML &amp; CSS. If not so, check out the links at the end of the post for Basic HTML &amp; CSS Tutorials else where on the web.</p>
<h3>Step 1 : Creating a framework</h3>
<p>We will start with the Basic HTML. We will be creating a 960px wide page. It will contain a Container division, which will be the wrapper for the whole page, A Header division which will be our focal point for today, it will contain a logo, a tagline, a seach bar, and a tabbed navigation.</p>
<pre class="code">&lt;html&gt; 

&lt;head&gt;
&lt;title&gt;Website Name | Maybe the tagline&lt;/title&gt;
&lt;!-- stylesheets begin --&gt;
&lt;link rel="stylesheet" type="text/css" href="css/reset.css" /&gt;
&lt;link rel="stylesheet" type="text/css" href="css/master.css" /&gt;
&lt;!-- stylesheets end --&gt;
&lt;/head&gt; 

&lt;body&gt;
&lt;div id="container"&gt;
    &lt;div id="header"&gt;
        &lt;img id="logo" src="./images/logo.png" alt="Company Name" /&gt;
        &lt;p class="tagline"&gt;This is a tagline space...&lt;/p&gt; 

        &lt;form action="#" method="post" id="search-form"&gt;
                &lt;input type="text" size="35" id="search-box" /&gt;
                &lt;input type="image" src="./images/submit-button.png" id="search-button" /&gt;
        &lt;/form&gt; 

        &lt;ul&gt;
                &lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="#"&gt;Products&lt;/a&gt;&lt;/li&gt;
                &lt;li id="active"&gt;&lt;a href="#"&gt;About&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="#"&gt;Contact&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;&lt;!-- end header --&gt;
&lt;/div&gt;&lt;!-- end container --&gt; 

&lt;/body&gt;
&lt;/html&gt;</pre>
<p>In the above code I have attached two stylesheets inside the head tag, a reset CSS file and a master CSS file for the main styling. In-case of complex layouts we also attach a separate stylesheet for IE6 i.e. only if we are intending to support it.</p>
<p>Inside the body tag we add ID attribute to the tags to separately target our styles to them using the stylesheet and give a class to tags that could be repeated more than once on our page so we can target all of them and style only once for them:</p>
<ul>
<li> We start with a container tag</li>
<li>Inside the container we insert a header tag with an ID of header and set 100% width (which we will set inside our master stylesheet).</li>
<li>Inside the header we go according to the hierarchy in the preview above.</li>
<li>So we insert an IMG (Image) tag inside the header and link it with the logo image in our images directory.</li>
<li>Next we insert a P (Paragraph) tag and give it a class of &#8220;tagline&#8221;.</li>
<li>Next we insert a Form tag which is required for a form to work and will also help us style better. Therefore, we will give it an ID of &#8220;search-form&#8221;.</li>
<li>Inside the Form tags we insert two input tags one for the search text box and one for the search button only instead of a button we&#8217;ll use an image.</li>
<li>To the first input tag we give a type attribute with a value of text which renders it into a text box.</li>
<li>To the second input tag we give a type attribute with a value of image and add a src attribute just like an IMG tag and link it with the search button image in our images directory and render our submit button as an image.</li>
<li>We can give both the input tags a separate ID for advanced styling of the search box, which in our case we will have to.</li>
<li>Next we will insert an UL (unordered list). A separate ID is not required as it is the only list inside the header.</li>
<li>We will give an ID of active to one of the list items in the unordered list to make it the active tab.</li>
</ul>
<h3>Step 2 : Reset the styles</h3>
<p><img class="alignnone size-full wp-image-30" title="Reset" src="http://webmuch.com/wp-content/uploads/2009/04/reset-pic.jpg" alt="Reset" width="590" height="317" /></p>
<p>Resetting a document is a very basic technique, some designers like it some don&#8217;t, therefore this part is really up to you. As such for me, I&#8217;m a big fan of reset files. I use Eric Meyer&#8217;s super famous CSS Reset with some properties added and some removed and made it work for me pretty fine.</p>
<pre class="code">/*
Reset CSS File
Author: Aayush Shastri
Author URI : http://www.webmuch.com
*/
html { overflow-y:scroll; } /*for browser that don't have default y-axis scrollbar*/
html, body, div, span, object,
h1, h2, h3, h4, h5, h6, p,
a, img, small, strong,
ol, ul, li,
fieldset, form, label, legend,
table, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {
line-height: 1;
}
img { vertical-align:middle; }
ol, ul {
list-style: none;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: collapse;
border-spacing: 0;
}
.clearfix { clear:both; } /*we probably wont be needing this, but good to have a utility incase we need it.*/</pre>
<p>You can make your very own Reset file as well, for inspiration check out Eric Meyer&#8217;s Reset , YUI Reset. I will provide all the links below at the end of the post. Reset can be as small as padding:0; margin:0;</p>
<h3>Step3 : Styling Our Layout</h3>
<pre class="code">body{
font-family:Arial;
font-size:13px;
background:#ccc url('../images/header-bg.png') repeat-x top left; /* to make the navigation list look &amp; behave like tabs. for the tabs check out A List Apart tutorial. link at the bottom of the post */
}
#container{
width:960px;
margin:0 auto; /* for centering the container. Means 0 margin from top and the bottom and Automatic margins for left and right. */
overflow:hidden; /* for clearing floats inside it */

border-right:1px solid #000; /* only to know the edges. to be removed at the end */
border-left:1px solid #000; /* only to know the edges. to be removed at the end */

}
#header{
position:relative; /* to absolutely position the ul at the bottom right side of this */
float:left;
width:100%;
height:150px;
overflow:hidden; /* for clearing floats inside it */
}
img#logo{
float:left; /* for getting the tagline inline with it. instead of below it. */
margin:60px 15px 0 5px; /* margin: top right bottom left; */
}
.tagline{
float:left; /* for getting the search form inline with it. instead of below it. */
margin:70px 0;
height:20px; /* for IE6 */
}
#search-form{
display:inline; /* for IE6 */
float:right;
margin:55px 10px 0 0;
}
#search-form input{
float:left; /* for getting the search box and submit button inline with each other. */
}
#search-box{
background: url('../images/search-bg.png') repeat-x top left; /* the background gradient repeated on the X-Axis */
border:1px solid #c9c9c9;
border-right:none; /* to make the illusion of the search box and button being joint */
color:#ebebeb; /* text color */
padding:8px;
}
#header ul{
position:absolute; /* to absolutely position this at the bottom right side of the header */
bottom:0; /* 0px away from the bottom */
right:10px; /* 10px away from the right */
margin:0;
padding:0;
overflow:hidden; /* for clearing floats inside it */
}
#header ul li{
display:inline; /* for IE6 */
margin:5px 10px 0 10px;
padding:0 0 0 13px; /* padding: top right bottom left; */
background:url('../images/left.png') no-repeat left top;
float:left;
}
#header ul li a{
display:block;
text-decoration:none;
color:#fff;
background:url('../images/right.png') no-repeat right top;
padding:5px 15px 5px 0px;
}
#header ul li#active{
background:url('../images/left-hover.png') no-repeat left top;
}
#header ul li#active a{
background:url('../images/right-hover.png') no-repeat right top;
padding:5px 15px 6px 0;
color:#000;
}</pre>
<p>The master stylesheet above is highly commented and easily understandable, to better understand the tabs I highly recommend A List Apart&#8217;s <a href="http://www.alistapart.com/articles/slidingdoors/">Sliding Door Tutorial</a></p>
<h3>Extra Information &#8211; Basic Size and Structure</h3>
<p><img class="alignnone size-full wp-image-31" title="Size and Structure" src="http://webmuch.com/wp-content/uploads/2009/04/sizes-and-structure.jpg" alt="Size and Structure" width="590" height="382" /></p>
<p>To understand the master.css better. This image should help. This image shows the height and width of elements inside the header. It also shows their margins and paddings as-well. The purple highlighted areas are the margins and the red highlighted area inside the search textbox is it&#8217;s padding.</p>
<h3>Links:</h3>
<ul>
<li>A List Apart&#8217;s <a href="http://www.alistapart.com/articles/slidingdoors/">Sliding Door Tutorial</a></li>
<li><a href="http://css-tricks.com/video-screencasts/58-html-css-the-very-basics/">HTML &amp; CSS &#8211; The VERY Basics</a></li>
<li><a href="http://www.htmldog.com/guides/htmlbeginner/">HTML Beginner Course</a></li>
<li><a href="http://www.htmldog.com/guides/cssbeginner/">CSS Beginner Course</a></li>
<li><a href="http://meyerweb.com/eric/tools/css/reset/index.html">Eric Meyer&#8217;s CSS Reset</a></li>
<li><a href="http://developer.yahoo.com/yui/reset/">YUI Reset</a></li>
</ul>
<p><strong><a href="http://www.webmuch.com/source_files/website_buildup_series.zip">Download the Source Code</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/website-build-up-series-header/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
