<?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; Aayush</title>
	<atom:link href="http://webmuch.com/author/admin/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>Top 10 Must Follow Web Blogs + 6 Web News Repositories</title>
		<link>http://webmuch.com/top-10-must-follow-web-blogs-6-web-news-repositories/</link>
		<comments>http://webmuch.com/top-10-must-follow-web-blogs-6-web-news-repositories/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 17:33:23 +0000</pubDate>
		<dc:creator>Aayush</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Round-ups]]></category>
		<category><![CDATA[Blogs]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=198</guid>
		<description><![CDATA[<img class="alignnone size-full wp-image-199" title="Must Follow Blogs Image" src="http://webmuch.com/wp-content/uploads/2009/07/intro.png" alt="Must Follow Blogs Image" width="150" height="150" />A list of Top 10 Web Design &#038; Development Blogs I follow on a daily basis. Plus 6 top community news websites where most web bloggers publish their article links.]]></description>
			<content:encoded><![CDATA[<p>Well I thought it was about time I published my comeback article. Exams are over and a percentage of performance down-fall of WebMuch is something I don’t want Google Analytics to show me anymore. So I thought why not do WebMuch’s first round-up article, with a list of top 10 Web Design &amp; Development Blogs that I follow on a daily basis, plus 6 top web community news websites where most web bloggers publish their article links. I guess this will be enough for your daily appetite for web knowledge &amp; inspiration. Go Gobble.</p>
<h2>Web Design &amp; Development Blogs</h2>
<p><strong>1. </strong><a href="http://net.tutsplus.com/"><strong>Nettuts</strong></a></p>
<p><a href="http://net.tutsplus.com/"><img class="alignnone size-full wp-image-200" title="Nettuts Image" src="http://webmuch.com/wp-content/uploads/2009/07/nettuts.jpg" alt="Nettuts Image" width="585" height="266" /></a></p>
<p><strong>2. </strong><a href="http://www.smashingmagazine.com/"><strong>Smashing Magazine</strong></a></p>
<p><a href="http://www.smashingmagazine.com/"><img class="alignnone size-full wp-image-201" title="Smashing Magazine Image" src="http://webmuch.com/wp-content/uploads/2009/07/smashing-magazine.jpg" alt="Smashing Magazine Image" width="585" height="312" /></a></p>
<p><strong>3. </strong><a href="http://www.instantshift.com/"><strong>Instant Shift</strong></a></p>
<p><a href="http://www.instantshift.com/"><img class="alignnone size-full wp-image-202" title="Instant Shift Image" src="http://webmuch.com/wp-content/uploads/2009/07/instantshift.jpg" alt="Instant Shift Image" width="585" height="308" /></a></p>
<p><strong>4. </strong><a href="http://css-tricks.com/"><strong>CSS-Tricks</strong></a></p>
<p><a href="http://css-tricks.com/"><img class="alignnone size-full wp-image-203" title="CSS-Tricks Image" src="http://webmuch.com/wp-content/uploads/2009/07/css-tricks.jpg" alt="CSS-Tricks Image" width="585" height="268" /></a></p>
<p><strong>5. </strong><a href="http://www.noupe.com/"><strong>Noupe</strong></a></p>
<p><a href="http://www.noupe.com/"><img class="alignnone size-full wp-image-204" title="Noupe Image" src="http://webmuch.com/wp-content/uploads/2009/07/noupe.jpg" alt="Noupe Image" width="585" height="258" /></a></p>
<p><strong>6. </strong><a href="http://www.smashingapps.com/"><strong>Smashing Apps</strong></a></p>
<p><a href="http://www.smashingapps.com/"><img class="alignnone size-full wp-image-209" title="Smashing Apps Image" src="http://webmuch.com/wp-content/uploads/2009/07/smashing-apps.jpg" alt="Smashing Apps Image" width="585" height="311" /></a></p>
<p><strong>7. </strong><a href="http://davidwalsh.name/"><strong>David Walsh Blog</strong></a></p>
<p><a href="http://davidwalsh.name/"><img class="alignnone size-full wp-image-205" title="David Walsh Blog Image" src="http://webmuch.com/wp-content/uploads/2009/07/davidwalshblog.jpg" alt="David Walsh Blog Image" width="585" height="293" /></a></p>
<p><strong>8. </strong><a href="http://speckyboy.com/"><strong>Speckyboy</strong></a></p>
<p><a href="http://speckyboy.com/"><img class="alignnone size-full wp-image-206" title="Speckyboy Image" src="http://webmuch.com/wp-content/uploads/2009/07/speckyboy.jpg" alt="Speckyboy Image" width="585" height="246" /></a></p>
<p><strong>9. </strong><a href="http://sixrevisions.com/"><strong>Six Revisions</strong></a></p>
<p><a href="http://sixrevisions.com/"><img class="alignnone size-full wp-image-207" title="Six Revisions Image" src="http://webmuch.com/wp-content/uploads/2009/07/sixrevisions.jpg" alt="Six Revisions Image" width="585" height="243" /></a></p>
<p><strong>10. </strong><a href="http://www.webdesignerdepot.com/"><strong>Web Designer Depot</strong></a></p>
<p><a href="http://www.webdesignerdepot.com/"><img class="alignnone size-full wp-image-208" title="Web Designer Depot" src="http://webmuch.com/wp-content/uploads/2009/07/webdesignerdepot.jpg" alt="Web Designer Depot" width="585" height="311" /></a></p>
<h2>Web News Repositories</h2>
<p><strong>1. <a href="http://cssglobe.com/news.asp">CSS Globe Community News</a></strong></p>
<p><a href="http://cssglobe.com/news.asp"><img class="alignnone size-full wp-image-216" title="CSS Globe Community News Image" src="http://webmuch.com/wp-content/uploads/2009/07/cssglobe.jpg" alt="CSS Globe Community News Image" width="585" height="327" /></a></p>
<p><strong>2. <a href="http://scriptandstyle.com/">Script &#038; Style</a></strong></p>
<p><a href="http://scriptandstyle.com/"><img src="http://webmuch.com/wp-content/uploads/2009/07/scriptstyle.jpg" alt="Script &amp; Style Image" title="Script &amp; Style Image" width="585" height="299" class="alignnone size-full wp-image-217" /></a></p>
<p><strong>3. <a href="http://www.webdesign-ne.ws/">Webdesign-Ne.ws</a></strong></p>
<p><a href="http://www.webdesign-ne.ws/"><img src="http://webmuch.com/wp-content/uploads/2009/07/webdesign-news.jpg" alt="Webdesign-ne.ws Image" title="Webdesign-ne.ws Image" width="585" height="255" class="alignnone size-full wp-image-218" /></a></p>
<p><strong>4. <a href="http://devmarks.com/">Devmarks</a></strong></p>
<p><a href="http://devmarks.com/"><img src="http://webmuch.com/wp-content/uploads/2009/07/devmarks.jpg" alt="Devmarks Image" title="Devmarks Image" width="585" height="214" class="alignnone size-full wp-image-219" /></a></p>
<p><strong>5. <a href="http://design-newz.com/">Design-Newz</a></strong></p>
<p><a href="http://design-newz.com/"><img src="http://webmuch.com/wp-content/uploads/2009/07/designnews.jpg" alt="Design Newz Image" title="Design Newz Image" width="585" height="309" class="alignnone size-full wp-image-220" /></a></p>
<p><strong>6. <a href="http://designbump.com/">Design Bump</a></strong></p>
<p><a href="http://designbump.com/"><img src="http://webmuch.com/wp-content/uploads/2009/07/designbump.jpg" alt="Design Bump Image" title="Design Bump Image" width="585" height="272" class="alignnone size-full wp-image-221" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/top-10-must-follow-web-blogs-6-web-news-repositories/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Image Flip Using jQuery</title>
		<link>http://webmuch.com/image-flip-using-jquery/</link>
		<comments>http://webmuch.com/image-flip-using-jquery/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 00:11:42 +0000</pubDate>
		<dc:creator>Aayush</dc:creator>
				<category><![CDATA[JavaScript & AJAX]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=175</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/06/intro.jpg" alt="Image Flip Using jQuery Introduction Image" title="Image Flip Using jQuery Introduction Image" width="150" height="150" class="alignnone size-full wp-image-189" />In this week's post we will be creating an illusion effect of an image flip using jQuery of course. This thing can be used as a cool gallery kind of a thing. So, hopefully you guys will like it, let's get to it.]]></description>
			<content:encoded><![CDATA[<p>Alright, first of all this is not a real image flip but sort of an illusion, the image does not flip itself in 3D since jQuery does not provide us with an image rotation or a distort feature for HTML elements. I know their are some image rotation plug-ins out their but they don&#8217;t work out very well with animate method of jQuery.</p>
<h3>Preview:</h3>
<p><img src="http://webmuch.com/wp-content/uploads/2009/06/preview.jpg" alt="Image Flip Using jQuery Preview Image" title="Image Flip Using jQuery Preview Image" width="585" height="400" class="alignnone size-full wp-image-188" /><br />
<strong>Note: Image flip with reflection is for demo purposes only, it&#8217;s done using the PHP GD Library and it&#8217;s source files are also included in the source code, so meddle with them if you like.</strong></p>
<p><strong><a href="http://webmuch.com/demos/image_flip_demo/flip.html" alt="First Demo">DEMO-1</a> | <a href="http://webmuch.com/demos/image_flip_demo/vertical_flip.html" alt="Second Demo">DEMO-2</a></strong></p>
<h3>HTML Code:</h3>
<pre class="code">
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html xmlns="http://www.w3.org/1999/xhtml">
&lt;head>
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
&lt;title>Image Flip Illusion Using jQuery&lt;/title>
&lt;link rel="stylesheet" type="text/css" href="default.css" />
&lt;/head>

&lt;body>
&lt;div id="container">
	&lt;h1>Image Flip Illusion Using jQuery&lt;/h1>
    &lt;img id="image1" src="images/image1.jpg" />
    &lt;img id="image2" src="images/image2.jpg" />
&lt;/div>
&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js">&lt;/script>
&lt;script type="text/javascript" src="hflip.js">&lt;/script>
&lt;/body>
&lt;/html>
</pre>
<h3>CSS Code:</h3>
<pre class="code">
body{
	background-color:#000;
}
h1{
	color:#FFFFFF;
	font-family:Arial;
	font-size:24px;
	font-weight:bold;
}
#container{
	width:400px;
	margin:0px auto;
	height:380px;
	margin-top:50px}
#image1{
	position:absolute;
	cursor:pointer;
	width:300px;
	height:190px;
}
#image2{
	display:none;
	position:absolute;
	cursor:pointer;
}
</pre>
<p>As you can see in the above code, I&#8217;ve placed the two images in a division and given them absolute positioning to assign their positions in the division. </p>
<p>To achieve the Horizontal flip we are basically reducing the width of the first image to 0 pixels, increasing the left side margin from zero to half it&#8217;s width and as soon as we finish that, Increase the width of the second image from zero to it&#8217;s actual width and do the opposite for left side margin what we did for the first image i.e reduce it from half the width of the image to zero.</p>
<p>This process takes place when you click on the first image (#image1) and the same process also takes place when you click on second image (#image2) except for the obvious shuffle in their ids.</p>
<p>Just look at the jQuery code below and you will have a better idea of what&#8217;s happening:</p>
<h3>jQuery:</h3>
<pre class="code">
$(document).ready(function(){
var margin =$("#image1").width()/2;
var width=$("#image1").width();
var height=$("#image1").height();

$("#image2").stop().css({width:'0px',height:''+height+'px',marginLeft:''+margin+'px',opacity:'0.5'});
$("#reflection2").stop().css({width:'0px',height:''+height+'px',marginLeft:''+margin+'px'});

	$("#image1").click(function(){
		$(this).stop().animate({width:'0px',height:''+height+'px',marginLeft:''+margin+'px',opacity:'0.5'},{duration:500});
		window.setTimeout(function() {
		$("#image2").stop().animate({width:''+width+'px',height:''+height+'px',marginLeft:'0px',opacity:'1'},{duration:500});
		},500);
	});

	$("#image2").click(function(){
		$(this).stop().animate({width:'0px',height:''+height+'px',marginLeft:''+margin+'px',opacity:'0.5'},{duration:500});
		window.setTimeout(function() {
		$("#image1").stop().animate({width:''+width+'px',height:''+height+'px',marginLeft:'0px',opacity:'1'},{duration:500});
		},500);
	});

});
</pre>
<p><strong>If you want to perform a Vertical flip the jQuery code for that too is included in the source code.</strong></p>
<p>Feel free to leave comments if you appreciate the tutorial or if you have any queries. You can also criticize the work but don&#8217;t be rude.</p>
<p>You can always find some good tutorials and articles on the <a href="http://webmuch.com/resources/" alt="Resources Page">Resources</a> page. You can always reach it using the menu up-top.</p>
<p>Thanks for Reading!</p>
<p><strong><a href="http://webmuch.com/source_files/image_flip_source.zip">Download the Source Code</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/image-flip-using-jquery/feed/</wfw:commentRss>
		<slash:comments>52</slash:comments>
		</item>
		<item>
		<title>New Author + Resources Category on WebMuch!</title>
		<link>http://webmuch.com/new-author-resources-category-webmuch/</link>
		<comments>http://webmuch.com/new-author-resources-category-webmuch/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 20:31:38 +0000</pubDate>
		<dc:creator>Aayush</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=166</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/06/intro1.png" alt="New Author &#38; Resources at WebMuch Image" title="New Author &#38; Resources at WebMuch Image" width="150" height="150" class="alignnone size-full wp-image-168" />An update about what's going on at WebMuch, What's new, What previous stuff is not gonna be there (me), plus some general information about the blog and links to the new stuff on it.]]></description>
			<content:encoded><![CDATA[<p>Hello Everybody,</p>
<p><img src="http://webmuch.com/wp-content/uploads/2009/06/studying.jpg" alt="Studying for Exams Image" title="Studying for Exams Image" width="585" height="389" class="alignnone size-full wp-image-167" /></p>
<p>This is Aayush the website administrator at WebMuch. I am being succumbed by a force I call college examination and will not be able to publish on WebMuch for a while. I have been overwhelmed by the amount of readers we’ve been getting, which is good enough for a start. I do not want to lose any readers at all, on a thought of which I am bringing in a fabulous web developer and a long time friend Atul, to replace me for a while. He has agreed to write for WebMuch for a very luscious deal, a deal that I will write for him when he is through with his <a href="http://www.gameranx.com/">project</a> (currently under development). He will be posting at the same pace with at-least an article/week. He published his first article day before, and it is already the most viewed article on WebMuch. Check it out <a href="http://webmuch.com/animated-navigation-bar-using-jquery/">here</a></p>
<p>In other updates, I have included a <a href="http://webmuch.com/resources/">resources link</a> in the navigation bar. It will gather articles related to Web Design &#038; Development from across the web and display them. Please check that out. I will keep including more feeds into it once I’m through with my exams.</p>
<p>Also, please subscribe to our <a href="http://feeds2.feedburner.com/webmuch">RSS feeds</a>; it helps us a great deal in reaching you better &#038; faster.</p>
<p>Thank You.</p>
]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/new-author-resources-category-webmuch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Animated Navigation Bar Using jQuery</title>
		<link>http://webmuch.com/animated-navigation-bar-using-jquery/</link>
		<comments>http://webmuch.com/animated-navigation-bar-using-jquery/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 00:07:58 +0000</pubDate>
		<dc:creator>Aayush</dc:creator>
				<category><![CDATA[JavaScript & AJAX]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=150</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/06/intro.png" alt="Animated Navigation Bar Using jQuery Introduction Image" title="Animated Navigation Bar Using jQuery Introduction Image" width="150" height="150" class="alignnone size-full wp-image-161" />For my first Article I will be writing on creating an Animated Navigation Bar Using jQuery. Hopefully you guys will like it.]]></description>
			<content:encoded><![CDATA[<p>This is my first guest tutorial at WebMuch so please bear with me if I miss out on anything.</p>
<h3>Preview:</h3>
<p><img class="alignnone size-full wp-image-155" title="Animated Navigation Bar Using jQuery Preview" src="http://webmuch.com/wp-content/uploads/2009/06/preview.png" alt="Animated Navigation Bar Using jQuery Preview" width="585" height="47" /></p>
<h3><a href="http://webmuch.com/demos/jQ_animated_navbar/navbar.html">DEMO!</a></h3>
<p>I am assuming that the readers are well versed with CSS and HTML.</p>
<h3>HTML Code:</h3>
<pre class="code">&lt;div class="container"&gt;
    &lt;div id="navbar1"&gt;
       	&lt;ul id="sprite"&gt;
       		&lt;li id="b0" class="a0"&gt;Home&lt;/li&gt;
                &lt;li id="b1"&gt;News&lt;/li&gt;
                &lt;li id="b2"&gt;Blog&lt;/li&gt;
                &lt;li id="b3"&gt;Pictures&lt;/li&gt;
                &lt;li id="b4"&gt;Videos&lt;/li&gt;
                &lt;li id="b5"&gt;Gallery&lt;/li&gt;
                &lt;li id="b6"&gt;About&lt;/li&gt;
                &lt;li id="b7" style="border-right:1px solid #1f1f1f;"&gt;Contact&lt;/li&gt;
        	&lt;/ul&gt;
        &lt;/div&gt;
&lt;/div&gt;</pre>
<p><strong>*NOTE:</strong> I do not encourage inline styling, I did it because It&#8217;s a sin I was willing to commit.</p>
<h3>CSS Code:</h3>
<pre class="code">html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, code,
del, dfn, em, img, q, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	font-weight: inherit;
	font-style: inherit;
	font-size: 100%;
	font-family: inherit;
	vertical-align: baseline;
}
body{
background-color:#1f1f1f;
}
.container{
	width:960px;
	margin:0px auto;
	color:#FFFFFF;
	font-family:Arial,sans-serif;
	font-size:20px;
	font-weight:bold;
}
#navbar1{
	float:left;
	width:960px;
	height:36px;
	font-size:14px;
	margin:20px 0 0 0;
	background:url(images/navbar_bg.png);
}
#navbar1 ul{
	float:left;
	width:585px;
	height:36px;
	margin-left:188px;
	color:#000000;
}
#navbar1 ul{
	background: url(images/anim_3.png) no-repeat;
	background-position:1px 4px;
}
#navbar1 ul li{
	float:left;
	width:72px;
	margin:3px 0 0 0;
	height:22px;
	display: inline;
	text-align:center;
	padding:7px 0 0 0;
	border-left:1px solid #1f1f1f;
	cursor:pointer;
}</pre>
<p><strong>*NOTE: </strong>This tutorial is only effective when using a predefined width for each button or list item as shown in the above image, this can also be implemented on navigation bars using dynamic widths, but you might have to change the jQuery and the image sprite quite a bit to achieve any kind of consistency in your design. Well to give you a basic explanation as to how we will animate the navigation bar from here on in, we will take a background image equal to the size of the list item, which, on mouse-over positions itself to the left of each respective list item. So, as you can see in my HTML code I have named(id) my unordered list as &#8216;sprite&#8217; with a backround image. I have also named(id) my list items b0,b1,b2,b3&#8230;.b7, depending on the number of list items you wish to have in your navigation bar. I&#8217;ll explain why we are doing this in a bit, after you read through the jQuery code.</p>
<h3>jQuery Code:</h3>
<pre class="code">$(document).ready(function(){
	var selected=0; // Default background position
	var position=0;

	$("#sprite").css({backgroundPosition:''+selected+'px 4px'});

	$("#b0,#b1,#b2,#b3,#b4,#b5,#b6,#b7").css({backgroundPosition:'0px 0px'}).mouseover(function(){
	position=$(this).attr("id").slice(1,2)*($(this).outerWidth());
	/*width of your list item*/
	$("#sprite").stop().animate({backgroundPosition:''+position+'px 4px'},{duration:200});
	});

	$("#b0,#b1,#b2,#b3,#b4,#b5,#b6,#b7").css({backgroundPosition:'0px 0px'}).mouseout(function(){
	$("#sprite").stop().animate({backgroundPosition:''+selected+'px 4px'},{duration:200});
	});
});</pre>
<h3>Step By Step Read Through:</h3>
<ul>
<li>In the first line, we define the default background position of the background image of #sprite (even though, we&#8217;ve already mentioned the default background position in the CSS file, we still have to declare the default background position in jQuery, because for some reason, Internet Explorer shows an error after repeated mouse-over states).</li>
<li>Now, on mouse-over of any of the list items, we simply calculate the background position of the image in the background of #sprite and using the animate method of jQuery we move it to its destined location. For example: On mouse-over of b0, in my case I moved it 0 * 73(width of my button) i.e. 0 pixels from the left of #sprite. On mouse-over of b1, I moved it 1 * 73 i.e. 73 pixels from the left of #sprite. On mouse-over of b2, I moved it 2 * 73 i.e. 146 pixels from the left of #sprite, so on and so forth. That is the very reason I named (id) my list items b0, b1, b2…, so that I can slice out the numerical values from it using slice(1,2).</li>
<li>Using the sliced numerical values we calculate the position of the background image, finally animate it and avoid a list of if else statements for each list item.</li>
<li>On mouse-out of any of the list items the background image comes back to its original position i.e. 0px (var selected;) from the left and 4px from the top.</li>
<li>Now, if you got any of the stuff I&#8217;ve explained there is one question popping in your head that do I have to manually give value to the variable &#8220;selected&#8221; for every page , well to avoid this you just have to edit the jQuery from the top to the one below.</li>
</ul>
<pre class="code">&lt;script type="text/javascript"&gt;
$(document).ready(function(){
	var check;
	var i;
	for(i=0;i&lt;20;i++){
		if($(".a"+i+"").attr("id")){
		check=$(".a"+i+"").attr("id").slice(1,2);
		}
	}

	var selected=check*($("#b0").outerWidth());
	var position;

	$("#sprite").css({backgroundPosition:''+selected+'px 4px'});

	$("#b0,#b1,#b2,#b3,#b4,#b5,#b6,#b7").css({backgroundPosition:'0px 0px'}).mouseover(function(){
	position=$(this).attr("id").slice(1,2)*($("#b0").outerWidth());/*width of your list item*/
	$("#sprite").stop().animate({backgroundPosition:''+position+'px 4px'},{duration:300});
	});

	$("#b0,#b1,#b2,#b3,#b4,#b5,#b6,#b7").css({backgroundPosition:'0px 0px'}).mouseout(function(){
	$("#sprite").stop().animate({backgroundPosition:''+selected+'px 4px'},{duration:300});
	});
});

&lt;/script&gt;</pre>
<p>Now we can easily name the class a0 or a1 or a2 or a4 of our list item (active list item) in our HTML to set the default background position of our background in #sprite and the script basically looks for the class with prefix &#8220;a&#8221; then slices out the next element i.e. 0 or 1 or 2 or 3, etc and multiplies it to the width of the element and gives it a default position from the left.</p>
<p>Feel free to leave comments if you appreciate the tutorial or if you have any problems implementing it.</p>
<p>Thanks for reading.</p>
<p><strong><a href="http://webmuch.com/source_files/Anim_navbar_webmuch.zip">Download the Source Code</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/animated-navigation-bar-using-jquery/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>How &amp; why you should use Google CDN</title>
		<link>http://webmuch.com/how-why-you-should-use-google-cdn/</link>
		<comments>http://webmuch.com/how-why-you-should-use-google-cdn/#comments</comments>
		<pubDate>Sat, 30 May 2009 14:47:37 +0000</pubDate>
		<dc:creator>Aayush</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[JavaScript & AJAX]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=133</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/05/intro2.jpg" alt="jQuery Google CDN Image" title="jQuery Google CDN Image" width="150" height="150" class="alignnone size-full wp-image-136" />In this article I will share the importance of using a Google CDN link of our favorite JavaScript library and how to implement it with two different methods.]]></description>
			<content:encoded><![CDATA[<h3>What is Google’s CDN?</h3>
<p>Google CDN stands for Google Content Distribution Network. It provides a loading architecture for the most popular, open source JavaScript libraries.</p>
<p><img class="alignnone size-full wp-image-134" title="Available JavaScript Libraries Image" src="http://webmuch.com/wp-content/uploads/2009/05/preview2.jpg" alt="Available JavaScript Libraries Image" width="585" height="548" /></p>
<h3>Why should I use Google’s CDN links?</h3>
<p>Most of the websites I see, still host their JavaScript Library on their own server (Most, not all). Actually never have I ever seen any Web Development Blog hosting the library on their own server. They always use Google CDN, which is great because it has a number of advantages:</p>
<ol>
<li>Google’s Content Distribution Network has libraries on their various servers across the world and if you use their CDN link, when a user’s browser resolves the URL, their browser will automatically download the file from the closest available server, which will be a much faster download than if you force a user to download the file from your host server in whichever country your website is hosted.</li>
<li>Google’s Content Distribution Network will save you a great deal of bandwidth if you have large traffic on your website and a limited bandwidth with your host.</li>
<li>There is a good chance that the Google hosted version of that library is already cached on the user’s browser cache, as lot of big websites and portals use Google’s CDN links including Google itself and Google’s servers instruct browsers to cache the file for one year if there are quite a few requests for the same hosted file.</li>
</ol>
<h3>How to use Google CDN?</h3>
<p>Google’s CDN provides most of the popular, open source JavaScript Libraries with two ways of using each of them via the direct path in the &lt;script/&gt; tags and via The Google AJAX Libraries API.</p>
<p>To use the Google AJAX Libraries API we need to include the Google &#8220;jsapi&#8221; script:</p>
<pre class="code">&lt;script src="http://www.google.com/jsapi"&gt;&lt;/script&gt;</pre>
<p>The Google AJAX Libraries API provides a simple and powerful google.load() method which accepts two arguments, the first argument to google.load is the name of a library. The second argument is the version of the library:</p>
<pre class="code">&lt;script&gt;
google.load("jquery", "1.3.2");
google.load("jqueryui", "1.7.1");
    google.setOnLoadCallback(function(){
        // use this instead of:
        /*
            $(document).ready(function(){  });
        */
    });
&lt;/script&gt;</pre>
<p>But to use this API, there is a different approach for the ready functions of all the libraries. For example, in the above code, we use google.setOnLoadCallback(function(){  });  instead of jQuery’s ready function. In-fact we use google.setOnLoadCallback(function(){  });  instead of all different library’s ready functions. This can be seen as a drawback or a good feature; I see it as a good feature as it gives me a single ready function for all libraries.</p>
<p>The second method to use Google’s CDN links is by the direct paths of the libraries in the &lt;script/&gt; tags</p>
<p>Below is a list of all the JavaScript Libraries Google CDN provides with the direct paths and google.load implementation:</p>
<h3>jQuery</h3>
<pre class="code">
name: jquery
versions: 1.2.3, 1.2.6, 1.3.0, 1.3.1, 1.3.2
load request: google.load("jquery", "1.3.2");
extras: uncompressed:true, e.g., google.load("jquery", "1.3.2", {uncompressed:true});
path: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
path(u): http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js
</pre>
<h3>jQuery UI</h3>
<pre class="code">
name: jqueryui
versions: 1.5.2, 1.5.3, 1.6, 1.7.0, 1.7.1
load request: google.load("jqueryui", "1.7.1");
extras: uncompressed:true, e.g., google.load("jqueryui", "1.7.1", {uncompressed:true});
path: http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js
path(u): http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.js
note: This library depends on jquery. Before loading this module, you must load jquery. e.g.:
        google.load("jquery", "1.3.2");
        google.load("jqueryui", "1.7.1");
</pre>
<h3>Prototype</h3>
<pre class="code">
name: prototype
versions: 1.6.0.2, 1.6.0.3
load request: google.load("prototype", "1.6.0.3");
path: http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js
</pre>
<h3>script.aculo.us</h3>
<pre class="code">
name: scriptaculous
versions: 1.8.1, 1.8.2
load request: google.load("scriptaculous", "1.8.2");
path: http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2/scriptaculous.js
note: This library depends on Prototype. Before loading this module, you must load Prototype. e.g.:
        google.load("prototype", "1.6");
        google.load("scriptaculous", "1.8.2");
</pre>
<h3>MooTools</h3>
<pre class="code">
name: mootools
versions: 1.11, 1.2.1, 1.2.2
load request: google.load("mootools", "1.2.2");
extras: uncompressed:true, e.g., google.load("mootools", "1.2.2", {uncompressed:true});
path: http://ajax.googleapis.com/ajax/libs/mootools/1.2.2/mootools-yui-compressed.js
path(u): http://ajax.googleapis.com/ajax/libs/mootools/1.2.2/mootools.js
</pre>
<h3>Dojo</h3>
<pre class="code">
name: dojo
versions: 1.1.1, 1.2.0, 1.2.3, 1.3.0, 1.3.1
load request: google.load("dojo", "1.3.1");
extras: uncompressed:true, e.g., google.load("dojo", "1.3.1", {uncompressed:true});
path: http://ajax.googleapis.com/ajax/libs/dojo/1.3.1/dojo/dojo.xd.js
path(u): http://ajax.googleapis.com/ajax/libs/dojo/1.3.1/dojo/dojo.xd.js.uncompressed.js
</pre>
<h3>SWFObject</h3>
<pre class="code">
name: swfobject
versions: 2.1
load request: google.load("swfobject", "2.1");
extras: uncompressed:true, e.g., google.load("swfobject", "2.1", {uncompressed:true});
path: http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js
path(u): http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject_src.js
</pre>
<h3>Yahoo! User Interface Library (YUI)</h3>
<pre class="code">
name: yui
versions: 2.6.0, 2.7.0
load request: load request: google.load("yui", "2.7.0");
extras: uncompressed:true, e.g., google.load("yui", "2.7.0", {uncompressed:true});
path: http://ajax.googleapis.com/ajax/libs/yui/2.7.0/build/yuiloader/yuiloader-min.js
path(u): http://ajax.googleapis.com/ajax/libs/yui/2.7.0/build/yuiloader/yuiloader.js
</pre>
<p>Source: <a href="http://code.google.com/apis/ajaxlibs/documentation/#AjaxLibraries">Google</a></p>
<p>Thanks for reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/how-why-you-should-use-google-cdn/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Bing: Microsoft’s New Search Engine</title>
		<link>http://webmuch.com/bing-microsoft-new-search-engine/</link>
		<comments>http://webmuch.com/bing-microsoft-new-search-engine/#comments</comments>
		<pubDate>Fri, 29 May 2009 01:29:11 +0000</pubDate>
		<dc:creator>Aayush</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Search]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=117</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/05/intro1.jpg" alt="Microsoft Bing Image" title="Microsoft Bing Image" width="150" height="150" class="alignnone size-full wp-image-118" />Today I came across a big news, Microsoft is releasing an all new search engine or what they call a decision engine called <a href="http://www.bing.com/">Bing</a>. It is supposed to be a search engine that will help us make decisions easily, these things get me really interested. So I thought I'd write about it.]]></description>
			<content:encoded><![CDATA[<h3>Preview:</h3>
<p><img class="alignnone size-full wp-image-119" title="Bing Search Engine Screenshot" src="http://webmuch.com/wp-content/uploads/2009/05/bing-0.jpg" alt="Bing Search Engine Screenshot" width="585" height="368" /><br />
Even though I love Google, it somehow excites me when someone comes up with an all new product in search and says this is going to be the next big thing. Today, Microsoft unveiled its soon-to-launch search engine <a href="http://www.bing.com/">Bing</a> which they say is more of a decision engine. It will become available over the next few days, and be fully launched by June 3rd. The internal codename for <a href="http://www.bing.com/">Bing</a> is Kumo.</p>
<p>Personally, I am pretty bored with Google even though it’s a great search engine; I would love for someone to come out with a great looking search engine, which searches well too. <a href="http://www.bing.com/">Bing</a> has at least made me happy with the amazing design and different background pictures feature and from what I saw and read <a href="http://www.bing.com/">Bing</a> seems much more interactive than Google or any other search engine for that matter.</p>
<p>The last time something like this happened was when Ex-Google Employees and more came out with <a href="http://www.cuil.com/">Cuil</a>, A search engine which claimed to be three times as big as Google with over 120 billion pages indexed in its database. But with the overload on their server within a few hours after they went live and an average search <a href="http://www.cuil.com/">Cuil</a> didn&#8217;t turn out as expected.</p>
<p>This time it is Microsoft, It’s a biggie with an all new search engine with a lot of <a href="http://www.decisionengine.com/Default.html">features</a>. Even though <a href="http://www.cuil.com/">Cuil</a> has led me to not expect too much, I still can’t wait for <a href="http://www.bing.com/">Bing</a> to go live, I’m still extremely psyched about it.</p>
<h3>Following are the features of Bing: (Source: Microsoft)</h3>
<p><img class="alignnone size-full wp-image-121" title="Bing Search Screenshot" src="http://webmuch.com/wp-content/uploads/2009/05/bing-1.jpg" alt="Bing Search Screenshot" width="585" height="473" /></p>
<ul>
<li><strong>Home Page:</strong> Because you may not always know about the range of content a search engine can find for you, the Bing home page includes a beautiful new image daily, information hotspots embedded in that image, and clear links for starting your searches for video, news, shopping, travel, images or maps.</li>
<li><strong>Autosuggest:</strong> Bing examines what you are typing in the search box and will automatically suggest similar terms or common refinements related to the term you are typing. For example, when searching for &#8220;California,&#8221; you will see common related searches, including &#8220;California DMV,&#8221; &#8220;California lottery&#8221; and &#8220;California ski report.&#8221;</li>
<li><strong>Best Match:</strong> The Bing Best Match feature is designed to make finding relevant information easier by cutting down the number of clicks and getting you to your final destination faster. Best Match results include customer service numbers for retail sites, the ability to track a package right from the search page, deep links to common pages within the site and much more.</li>
<li><strong>Document Preview:</strong> Nearly one-quarter of searches result in rapid click back, when you realize that the search result was not what you were looking for. Document Preview lets you hover over a search result to see a preview of the site’s content, which helps you determine whether the site is likely to contain the information you’re looking for — before you click.</li>
<li><strong>Instant Answers:</strong> Bing provides Instant Answers that immediately return highly relevant direct answers in response to a specific search. For example, entering a flight number will return the most recent flight information and display it prominently in the results, saving the hassle of going to a separate page. Other Instant Answers on Bing include stock prices, local weather, sports scores and more.</li>
</ul>
<p><img class="alignnone size-full wp-image-122" title="Bing Search xRank Screenshot" src="http://webmuch.com/wp-content/uploads/2009/05/bing-2.jpg" alt="Bing Search xRank Screenshot" width="585" height="564" /></p>
<ul>
<li><strong>Explore Pane:</strong> Located on the left side of the screen, the Explore Pane lets you easily filter search results. Features in the Explore Pane include categorized search results called Quick Tabs, links to related searches and past searches in Session History. The Explore Pane also can be used in the local, travel and shopping experience for powerful refinement of your search results.</li>
<li><strong>Quick Tabs:</strong> Half of all searches are eventually refined to find more specific results. Quick Tabs anticipate your intent when searching and offers easy access to some of the most common refinements for a given search. For example, when searching for a favorite musician, Quick Tabs let you filter results by albums, biography, videos and images. These tabs change dynamically based on the search term. Searches for a certain city name yield Quick Tabs for tours, travel and images; searches for a car model generate categories on reviews, accessories and videos.</li>
<li><strong>Related Searches:</strong> When searching for a specific result, our research has shown that people also like to expand their search to explore related topics. After making an initial search, Related Searches provides a list of related search terms, helping you easily expand a search to find more great results.</li>
<li><strong>Session History:</strong> Nearly half of all searches are a repeat of a previous search. Session History provides easy access to searches from your current search session so that you don’t need to initiate a new query to get back to an earlier result.</li>
<li><strong>Video Search:</strong> Bing video search helps make finding, previewing and watching videos easier. Bing indexes content from video sites across the Web and our own index of full-length television shows. It also includes filtering tools to narrow a search to make it easier for you to find the exact video you’re looking for.</li>
<li><strong>Image Search:</strong> Bing image search includes infinite scroll, which lets you easily browse image results without clicking to a new page. Bing also has powerful filtering tools for images to make it easier to find just the right image.</li>
</ul>
<p><img class="alignnone size-full wp-image-123" title="Bing Flight Search Screenshot" src="http://webmuch.com/wp-content/uploads/2009/05/bing-3.jpg" alt="Bing Flight Search Screenshot" width="585" height="488" /></p>
<ul>
<li><strong>News Search:</strong> Bing news search lets you search the latest news from across the Web and receive news alerts.</li>
<li><strong>Bing Maps:</strong> Bing Maps lets you easily find, discover, plan and share location information, including maps and directions and engaging bird’s-eye, 3-D and aerial imagery.</li>
<li><strong>Shopping:</strong> Bing combines many of the shopping features available across the Web into one intuitive and easy-to-use experience. In addition to providing many product search refinement tools, Bing also scans the Web for user and expert reviews, organizes them by product attribute, and then ranks the sentiment in the reviews as either positive or negative. This enables you to filter quickly through lots of information to inform a purchase decision.</li>
<li><strong>Travel:</strong> Bing Travel analyzes billions of pieces of airfare and hotel data to offer you flight Price Predictors and hotel Rate Indicators. Based on science, not marketing, Bing Travel enables you to make smart, well-informed decisions when planning a trip, every time.</li>
<li><strong>Local:</strong> Today’s search engines don’t always help people make informed decisions about the quality of a restaurant or the best way to contact a local mechanic. Bing presents relevant content including user reviews aggregated from local content sites, hours of operation for local businesses, one-click directions, maps and traffic reports.</li>
<li><strong>Health:</strong> Bing helps people find health information online. While there is no substitute for the expertise of a trained physician, Bing provides you with easy access to medical information from nine trusted resources to help you make more informed decisions about personal care.</li>
</ul>
<p><img class="alignnone size-full wp-image-124" title="Bing Hotel Search Screenshot" src="http://webmuch.com/wp-content/uploads/2009/05/bing-4.jpg" alt="Bing Hotel Search Screenshot" width="585" height="487" /></p>
<h3>Availability</h3>
<p>Bing will be available worldwide. However, specific feature availability will differ according to markets.</p>
<p>Thanks for reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/bing-microsoft-new-search-engine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Simple jQuery Slideshow with PHP Image Stripe</title>
		<link>http://webmuch.com/simple-jquery-slideshow-with-php-image-stripe/</link>
		<comments>http://webmuch.com/simple-jquery-slideshow-with-php-image-stripe/#comments</comments>
		<pubDate>Wed, 27 May 2009 09:16:40 +0000</pubDate>
		<dc:creator>Aayush</dc:creator>
				<category><![CDATA[JavaScript & AJAX]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=97</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/05/intro.jpg" alt="Simple jQuery Slideshow with PHP Image Stripe Image" title="Simple jQuery Slideshow with PHP Image Stripe Image" width="150" height="150" class="alignnone size-full wp-image-102" />In this tutorial we will be making a simple jQuery Slideshow with the output image stripe from the last tutorial on <a href="http://webmuch.com/image-stripe-using-php-gd-library/">PHP GD Library Image Stripe</a>, Thereby making use of it in a real world application.]]></description>
			<content:encoded><![CDATA[<h3>Preview:</h3>
<p><img class="alignnone size-full wp-image-103" title="Simple jQuery Slideshow with PHP Image Stripe Preview Image" src="http://webmuch.com/wp-content/uploads/2009/05/preview1.jpg" alt="Simple jQuery Slideshow with PHP Image Stripe Preview Image" width="585" height="246" /><br />
<a href="http://webmuch.com/demos/jQslideshow/"></p>
<h3>DEMO!</h3>
<p></a><br />
I created the last post on creating an image stripe using PHP GD Library because a friend of mine needed to join some images for his web project and used that technique which I found very interesting, but apart from his use of it, I couldn’t find many real world situations where that technique could be used, but it’s not that I didn’t find any. Therefore this post is dedicated to use that technique in a real world application. So today I will create a slideshow using the output of my last post (Image Stripe using PHP GD Library).</p>
<p>Download the <a href="http://www.webmuch.com/source_files/php_gdImageStripe.zip">source code</a> of my previous post. In the source code, we only need to change the index.php file and the master.css file as we have nothing to do with the image creation using PHP but only the way we present it to the users.</p>
<h3>Index.php:</h3>
<pre class="code">
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

&lt;html xmlns="http://www.w3.org/1999/xhtml">
&lt;head>
&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
&lt;title>PHP &#038; jQuery Slideshow&lt;/title>
&lt;!-- stylesheets begin -->

&lt;link rel="stylesheet" type="text/css" href="css/reset.css" />
&lt;link rel="stylesheet" type="text/css" href="css/master.css" />

&lt;!-- stylesheets end -->
&lt;/head>

&lt;body>
&lt;div id="wrap">
	&lt;div id="slideshow">
		&lt;a href="#" class="next">
			Next
		&lt;/a>
	&lt;/div>
&lt;/div>&lt;!-- end container -->

&lt;!--
There is no link to the image file in the markup
as the link to the image is in the css file as a
background-image of the div#slideshow element.
-->

&lt;/body>
&lt;/html>
</pre>
<h3>Explanation:</h3>
<p>In the above code, the markup is fairly simple to understand. We link to the stylesheets and create a wrapper element (div#wrap) inside which we create a slideshow division which contains an anchor tag, simple enough. Please read the CSS code below for the master stylesheet.</p>
<h3>Master.css:</h3>
<pre class="code">
#wrap{
/* a simple enough wrapper */
	width:958px;
	border:1px solid #3b5998;
	border-top:none;
	margin:0 auto;
	background:#b7c4df;
	padding:20px 0;
	overflow:hidden;
}
#slideshow{
	width:600px;
	/* width is the size of at least two visible images in the merged image */
	height:225px;
	background:#ffffff url('../createImage.php') repeat-x;
	/* We link to the createImage.php file itself as the file itself returns the merged image */
	border:1px solid #000;
	margin:30px auto;
	overflow:hidden;
}
a.next{
	float:left;
	width:300px;
	/* To cover the first image out of the two visible */
	height:225px;
	line-height:225px; /*For vertical middle alignment*/
	text-align:center;
	text-decoration:none;
	background:#ffffff;
	font-family:Garamond, Hoefler Text, Palatino, Palatino Linotype, serif;
	font-size:30px;
	font-weight:bold;

	/* Cross Browser Transparency */
	filter:alpha(opacity=50);
	-moz-opacity:0.5;
	-khtml-opacity: 0.5;
	opacity: 0.5;
	/* Cross Browser Transparency */
}
#slideshow a{ color:#000; }
</pre>
<p>Now, Getting back into the making of the slideshow, let’s analyze a little. According to the last tutorial we joined six images with a width of 300 pixels each and a height of 225 pixels each, here according to the CSS above, we are showing the joined image as a repeating background image of an element having a width of 600 pixels hence, showing two of the six images in our stripe. Then we have an anchor tag over the first image of the six with 50% transparency, so it is translucently visible below the anchor.</p>
<p>Moving on, what we want to do here is that we want to animate the background-image to slide leftwards by 300 pixels each time a user clicks on the anchor (which has a class &#8220;next&#8221; assigned to it) and as the image is repeated on the x-axis there is no end to reach for.</p>
<h3>jQuery code for explanation:</h3>
<p>Place the following JavaScript code right after closing the body tag in the index.php file.</p>
<pre class="code">
&lt;script type="text/javascript" language="JavaScript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js">&lt;/script>
&lt;script type="text/javascript" language="JavaScript">
var count = 1;
$(function(){
	$('#slideshow').css({backgroundPosition: '0px 0px'});
	$('a.next').click(function(){
		var x_position = count*-300;
		//console.log(x_position);
		$('#slideshow').animate({backgroundPosition: ''+x_position+'px 0px'});
		count++;
	});
});
&lt;/script>
&lt;!-- scripts end -->
</pre>
<p>In the above code, we started a count from 1 as we will need to increase the value of background position with each click. But first we set the background position of the division with the id of “slideshow” to zeros. This is a good thing to do as we live in a world where Internet Explorer still survives. Then when the anchor (a.next) is clicked we initiate a function where we catch the count multiplied by 300 in a variable (x_position) and a minus sign for animating leftwards and then we animate the background-position with that value. Finally we increase the count by 1 for the next click, therefore, the first time we click the value of x_position is -300, the second time we click, it is -600 and so on.</p>
<p><strong>Note: make sure to comment out or remove the console.log statement as it creates problems in all the browsers except Firefox.</strong></p>
<p>Thanks for reading.</p>
<p><strong><a href="http://www.webmuch.com/source_files/jQslideshow.zip">Download the Source Code</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/simple-jquery-slideshow-with-php-image-stripe/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Image Stripe Using PHP GD Library</title>
		<link>http://webmuch.com/image-stripe-using-php-gd-library/</link>
		<comments>http://webmuch.com/image-stripe-using-php-gd-library/#comments</comments>
		<pubDate>Sat, 09 May 2009 17:01:50 +0000</pubDate>
		<dc:creator>Aayush</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[GD Library]]></category>

		<guid isPermaLink="false">http://webmuch.com/?p=73</guid>
		<description><![CDATA[<img src="http://webmuch.com/wp-content/uploads/2009/05/post-intro-image.png" alt="Image Stripe Using PHP GD Library Picture" title="Image Stripe Using PHP GD Library Picture" width="150" height="150" class="alignnone size-full wp-image-74" />In this tutorial we will create an image stripe using PHP's file handling capabilities and GD Library. It will read any number of images from a specified folder and join them all to create a single server side generated image stripe. This will provide the basics of File Handling and GD Graphics Library.]]></description>
			<content:encoded><![CDATA[<h3>Preview:</h3>
<p><img class="alignnone size-full wp-image-78" title="Image Stripe Using PHP GD Library" src="http://webmuch.com/wp-content/uploads/2009/05/preview.jpg" alt="Image Stripe Using PHP GD Library" width="585" height="264" /><br />
What we are going to do today is quite simple. We will read a specific directory for all available images in it and merge them into a single image. Sounds simple, well it is.</p>
<h3>What We Need:</h3>
<ul>
<li>Create a project main folder and create two more folders in it, name them: &#8220;css&#8221; and &#8220;slides&#8221; respectively.</li>
<li>In the project main folder create two files, name them: &#8220;index.php&#8221; and &#8220;createImage.php&#8221; respectively.</li>
<li>In the slides folder put in some jpeg images with same width and height. In my case I used 300px width and 225px height.</li>
</ul>
<h3>index.php:</h3>
<pre class="code">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;

&lt;head&gt;
&lt;meta content="text/html; charset=utf-8" http-equiv="Content-Type" /&gt;
&lt;title&gt;PHP GD Library Image Stripe&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="wrap"&gt;
	&lt;h2&gt;PHP Image Stripe&lt;/h2&gt;
	&lt;div id="slideshow"&gt;
		&lt;img src="createImage.php" title="Image Stripe" alt="Image Stripe" /&gt;
	&lt;/div&gt;
&lt;/div&gt;&lt;!-- end wrap --&gt;

&lt;/body&gt;
&lt;/html&gt;</pre>
<p>In the above code the only new thing to you should be the source(src attribute) of the image tag, which is the link of our &#8220;createImage.php&#8221; file, this is because the file itself when executed outputs an image file. Hope that makes sense, it sure will after you read the excessively documented code of &#8220;createImage.php&#8221; below.</p>
<h3>createImage.php:</h3>
<pre class="code">&lt;?php
$dirPath = 'slides/'; // The path of the directory
$count = 0; // For counting the number of images in the directory

// To check if this is a valid directory
if (is_dir($dirPath)) {
	// Open the directory and make a directory handler called $db
	if ($dh = opendir($dirPath)) {

		// Report all errors except E_WARNING (warnings)
		error_reporting(E_ALL ^ E_WARNING);

		/*
		 *	We have closed the warnings here as there should be no text
		 *	on a page which should be returning as an image otherwise the
		 *	image will not be produced, instead the name of the file will
		 *	be printed.
		 *
		 *	As we are going to use the getimagesize() method to determine
		 *	whether the passed file is an image or not, the method returns
		 *	false when a non image file is passed as a parameter but also
		 *	produces a warning about the same concern, which is why we have
		 *	to disable the warnings in runtime.
		 */

		/*	We start a while loop which runs until the readdir method returns false
		 *	as there are no more files in the directory.
		 *
		 *	each time the loop runs, it enters the next files name in the
		 *	$src variable.
		 */

	while (($filename = readdir($dh)) !== false) {

		/*	getimagesize() method returns false if the file is not an image file.
		 *	Therefore, we check for it to be true as we have passed the file source
		 *	in it, which we created simply by concatinating the $dirPath before
		 *	the $filename.
		 */

		if(getimagesize($dirPath.$filename))
		{

		/*
		 *	We are taking all the "only-image" file names in an array called $imgSrc.
		 *
		 *	$count keeps increasing by 1 if the file is an image and therefore,
		 *	gives us the number of images in the folder. We can get the number
		 *	of images by getting the length of the array as-well and there maybe
		 *	many more methods. But I like it done this way. It is purely a matter
		 *	of choice.
		 */
			$imgSrc[$count] = $dirPath.$filename;
			$count++;
		}
	}

	/*
	 *	As we are creating a horizontal stripe of images we are only
	 *	concerned with the width. First we need to create an Image
	 *	with the dimentions of our final image, therefore we found the
	 *	only the width of our final image because in our case we have
	 *	a static height of our final image.
	 *
	 *	In my case each image in my slides directory has a width of 300px
	 *	and a height of 225px. Therefore, width for a horizontal stripe of
	 *	all images merged will be the number of images multiplied by 300.
	 *
	 *	Which is exactly what I've taken in a variable called $width.
	 *
	 *	Now, for creating an image we have used the imagecreatetruecolor
	 *	method and the resource handler is stored in the variable
	 *	$outputImage.
	 *
	 *	Note: Remember, the height and width of the JPEG's in the slide folder
	 *	must be the same.
	 */

	$width = 300 * $count;
	$outputImage = imagecreatetruecolor($width, 225);

	/*
	 *	We run a loop with the number of images as the limit,
	 *	in which we  create a resource handler for each image
	 *	in the slides folder and then merge it into the Main
	 *	Image i.e. $outputImage.
	 *
	 *	If the loop runs for the first time the "x-coordinate of destination point"
	 *	is static and hard coded as 300 and then for each increament we multiply 300
	 *	by the loop count, this merges the images one after another horizontally
	 *
	 */

		for($i=0; $i&lt;$count; $i++)
		{
			$temp = imagecreatefromjpeg($imgSrc[$i]);
			if($i==0)
				imagecopymerge($outputImage, $temp, 0, 0, 0, 0, 300, 225, 100);
			else
				imagecopymerge($outputImage, $temp, $i*300, 0, 0, 0, 300, 225, 100);

			/*
			 *	Syntax Explaination
			 *
				imagecopymerge(
						Destination image link resource,
						Source image link resource,
						x-coordinate of destination point,
						y-coordinate of destination point,
						x-coordinate of source point,
						y-coordinate of source point,
						Source width,
						Source height,
						alpha transparency
				)
			*/

		}
	}
}

// For displaying the image as the output.

header('Content-type: image/jpeg');
imagejpeg($outputImage);

// Destroying the resourse handler.
imagedestroy($outputImage);

/*
 *	Reporting all errors. Switching it back on,
 *	as the image has already been produced and displayed.
 */
error_reporting(E_ALL);
?&gt;</pre>
<p><strong>Note: Remember, the height and width of the JPEG&#8217;s in the slides folder must be the same.</strong><br />
<strong>Note: imagecreatetruecolor() method does not support GIF images.</strong></p>
<h3>Links:</h3>
<ul>
<li><a href="http://in.php.net/imagecopymerge">imagecopymerge()</a></li>
<li><a href="http://in.php.net/manual/en/function.error-reporting.php">error_reporting()</a></li>
<li><a href="http://in.php.net/imagecreatefromjpeg">imagecreatefromjpeg()</a></li>
<li><a href="http://in.php.net/imagecreatetruecolor">imagecreatetruecolor()</a></li>
</ul>
<p>Thanks for reading!</p>
<p><strong><a href="http://www.webmuch.com/source_files/php_gdImageStripe.zip">Download the Source Code</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://webmuch.com/image-stripe-using-php-gd-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
	</channel>
</rss>
