<?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>PriteshGupta.com &#187; Tips</title>
	<atom:link href="http://www.priteshgupta.com/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.priteshgupta.com</link>
	<description>Web and Technology blog</description>
	<lastBuildDate>Sun, 15 Jan 2012 12:11:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Disable textarea Resizing</title>
		<link>http://www.priteshgupta.com/2012/01/disable-textarea-resizing/</link>
		<comments>http://www.priteshgupta.com/2012/01/disable-textarea-resizing/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 12:11:59 +0000</pubDate>
		<dc:creator>Pritesh Gupta</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.priteshgupta.com/?p=2034</guid>
		<description><![CDATA[Normally whenever we use textarea in pages, the browser allows the user to resize it, but at times this is not wanted(as it might screw the other aspects of the design). Here is how we can disable textarea resizing using basic CSS. Old Method In the old method, we needed to to specify the value [...]]]></description>
			<content:encoded><![CDATA[<p>Normally whenever we use <strong>textarea</strong> in pages, the browser allows the user to <strong>resize</strong> it, but at times this is not wanted(as it might screw the other aspects of the design). Here is how we can <strong>disable textarea resizing</strong> using basic <strong>CSS</strong>.</p>
<h2>Old Method</h2>
<p>In the old method, we needed to to specify the value of the CSS property of the <code><strong>max-height</strong></code>/<code><strong>max-width</strong></code> same as <code><strong>height</strong></code>/<code><strong>width</strong></code>.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
</pre>
<pre><span class="css">textarea{
        <span class="css-property">height<span class="css-selector">:</span><span class="css-value">300px</span></span>;
        <span class="css-property">width<span class="css-selector">:</span><span class="css-value">400px</span></span>;
        <span class="css-property">max-height<span class="css-selector">:</span><span class="css-value">300px</span></span>;
        <span class="css-property">max-width<span class="css-selector">:</span><span class="css-value">400px</span></span>;
    }</span></pre>
</div>
<p>Though this method will work out well, but we still see that &#8220;resize&#8221; icon in corner. </p>
<h2>New CSS3 Method</h2>
<p>Hence, there is a better way to do this in CSS3. Instead of specifying the <code><strong>max-height</strong></code>/<code><strong>max-width</strong></code>, we can simply mention <code><strong>resize: none</strong></code>.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
</pre>
<pre><span class="css">textarea{
        <span class="css-property">height<span class="css-selector">:</span><span class="css-value">300px</span></span>;
        <span class="css-property">width<span class="css-selector">:</span><span class="css-value">400px</span></span>;
        <span class="css-property">resize<span class="css-selector">:</span><span class="css-value">none</span></span>;
    }</span></pre>
</div>
<p>It works the same way, and this time without the &#8220;resize&#8221; icon in corner. </p>
<h2>Optional/Conditional Resizing</h2>
<p>For enabling only the <strong>horizontal</strong> resizing, we can replace the <code><strong>none</strong></code> with <code><strong>horizontal</strong></code>. </p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
</pre>
<pre><span class="css">textarea{
        <span class="css-property">height<span class="css-selector">:</span><span class="css-value">300px</span></span>;
        <span class="css-property">width<span class="css-selector">:</span><span class="css-value">400px</span></span>;
        <span class="css-property">resize<span class="css-selector">:</span><span class="css-value">horizontal</span></span>;
    }</span></pre>
</div>
<p>Similarly for enabling only the <strong>vertical</strong> resizing, we can replace the <code><strong>none</strong></code> with <code><strong>vertical</strong></code>. </p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
</pre>
<pre><span class="css">textarea{
        <span class="css-property">height<span class="css-selector">:</span><span class="css-value">300px</span></span>;
        <span class="css-property">width<span class="css-selector">:</span><span class="css-value">400px</span></span>;
        <span class="css-property">resize<span class="css-selector">:</span><span class="css-value">vertical</span></span>;
    }</span></pre>
</div>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Disable+textarea+Resizing&amp;link=http://www.priteshgupta.com/2012/01/disable-textarea-resizing/&amp;notes=Normally%20whenever%20we%20use%20textarea%20in%20pages%2C%20the%20browser%20allows%20the%20user%20to%20resize%20it%2C%20but%20at%20times%20this%20is%20not%20wanted%28as%20it%20might%20screw%20the%20other%20aspects%20of%20the%20design%29.%20Here%20is%20how%20we%20can%20disable%20textarea%20resizing%20using%20basic%20CSS.%0D%0A%0D%0AOld%20Method%0D%0AIn%20the%20old%20method%2C%20we%20needed%20to%20to%20specify%20the%20value%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Disable+textarea+Resizing&amp;link=http://www.priteshgupta.com/2012/01/disable-textarea-resizing/&amp;notes=Normally%20whenever%20we%20use%20textarea%20in%20pages%2C%20the%20browser%20allows%20the%20user%20to%20resize%20it%2C%20but%20at%20times%20this%20is%20not%20wanted%28as%20it%20might%20screw%20the%20other%20aspects%20of%20the%20design%29.%20Here%20is%20how%20we%20can%20disable%20textarea%20resizing%20using%20basic%20CSS.%0D%0A%0D%0AOld%20Method%0D%0AIn%20the%20old%20method%2C%20we%20needed%20to%20to%20specify%20the%20value%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Disable+textarea+Resizing&amp;link=http://www.priteshgupta.com/2012/01/disable-textarea-resizing/&amp;notes=Normally%20whenever%20we%20use%20textarea%20in%20pages%2C%20the%20browser%20allows%20the%20user%20to%20resize%20it%2C%20but%20at%20times%20this%20is%20not%20wanted%28as%20it%20might%20screw%20the%20other%20aspects%20of%20the%20design%29.%20Here%20is%20how%20we%20can%20disable%20textarea%20resizing%20using%20basic%20CSS.%0D%0A%0D%0AOld%20Method%0D%0AIn%20the%20old%20method%2C%20we%20needed%20to%20to%20specify%20the%20value%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Disable+textarea+Resizing&amp;link=http://www.priteshgupta.com/2012/01/disable-textarea-resizing/&amp;notes=Normally%20whenever%20we%20use%20textarea%20in%20pages%2C%20the%20browser%20allows%20the%20user%20to%20resize%20it%2C%20but%20at%20times%20this%20is%20not%20wanted%28as%20it%20might%20screw%20the%20other%20aspects%20of%20the%20design%29.%20Here%20is%20how%20we%20can%20disable%20textarea%20resizing%20using%20basic%20CSS.%0D%0A%0D%0AOld%20Method%0D%0AIn%20the%20old%20method%2C%20we%20needed%20to%20to%20specify%20the%20value%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Disable+textarea+Resizing&amp;link=http://www.priteshgupta.com/2012/01/disable-textarea-resizing/&amp;notes=Normally%20whenever%20we%20use%20textarea%20in%20pages%2C%20the%20browser%20allows%20the%20user%20to%20resize%20it%2C%20but%20at%20times%20this%20is%20not%20wanted%28as%20it%20might%20screw%20the%20other%20aspects%20of%20the%20design%29.%20Here%20is%20how%20we%20can%20disable%20textarea%20resizing%20using%20basic%20CSS.%0D%0A%0D%0AOld%20Method%0D%0AIn%20the%20old%20method%2C%20we%20needed%20to%20to%20specify%20the%20value%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.priteshgupta.com/2012/01/disable-textarea-resizing/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Disable+textarea+Resizing&amp;link=http://www.priteshgupta.com/2012/01/disable-textarea-resizing/&amp;notes=Normally%20whenever%20we%20use%20textarea%20in%20pages%2C%20the%20browser%20allows%20the%20user%20to%20resize%20it%2C%20but%20at%20times%20this%20is%20not%20wanted%28as%20it%20might%20screw%20the%20other%20aspects%20of%20the%20design%29.%20Here%20is%20how%20we%20can%20disable%20textarea%20resizing%20using%20basic%20CSS.%0D%0A%0D%0AOld%20Method%0D%0AIn%20the%20old%20method%2C%20we%20needed%20to%20to%20specify%20the%20value%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Disable+textarea+Resizing&amp;link=http://www.priteshgupta.com/2012/01/disable-textarea-resizing/&amp;notes=Normally%20whenever%20we%20use%20textarea%20in%20pages%2C%20the%20browser%20allows%20the%20user%20to%20resize%20it%2C%20but%20at%20times%20this%20is%20not%20wanted%28as%20it%20might%20screw%20the%20other%20aspects%20of%20the%20design%29.%20Here%20is%20how%20we%20can%20disable%20textarea%20resizing%20using%20basic%20CSS.%0D%0A%0D%0AOld%20Method%0D%0AIn%20the%20old%20method%2C%20we%20needed%20to%20to%20specify%20the%20value%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.shareaholic.com/api/share/?title=Disable+textarea+Resizing&amp;link=http://www.priteshgupta.com/2012/01/disable-textarea-resizing/&amp;notes=Normally%20whenever%20we%20use%20textarea%20in%20pages%2C%20the%20browser%20allows%20the%20user%20to%20resize%20it%2C%20but%20at%20times%20this%20is%20not%20wanted%28as%20it%20might%20screw%20the%20other%20aspects%20of%20the%20design%29.%20Here%20is%20how%20we%20can%20disable%20textarea%20resizing%20using%20basic%20CSS.%0D%0A%0D%0AOld%20Method%0D%0AIn%20the%20old%20method%2C%20we%20needed%20to%20to%20specify%20the%20value%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=43&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.priteshgupta.com/2012/01/disable-textarea-resizing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flip or Reverse Text Using CSS</title>
		<link>http://www.priteshgupta.com/2011/09/flip-or-reverse-text-using-css/</link>
		<comments>http://www.priteshgupta.com/2011/09/flip-or-reverse-text-using-css/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 06:18:24 +0000</pubDate>
		<dc:creator>Pritesh Gupta</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.priteshgupta.com/?p=1797</guid>
		<description><![CDATA[As title says, we can Flip Text Upside Down or Reverse Text using CSS only(Rather than some jQuery Plugin or JavaScript). The CSS is completely Cross-browser compatible(Yeah, even older IEs), check out the CSS below. Flipping Text Upside Down 1 2 3 4 5 6 7 8 9 10 11 -webkit-transform:rotate(-180deg); -moz-transform:rotate(-180deg); -o-transform:rotate(-180deg); transform:rotate(-180deg); ms-filter:&#34;progid:DXImageTransform.Microsoft.BasicImage(rotation=2)&#34;; [...]]]></description>
			<content:encoded><![CDATA[<p>As title says, we can <strong>Flip Text Upside Down</strong> or <strong>Reverse Text</strong> using <strong>CSS</strong> only(Rather than some jQuery Plugin or JavaScript). The CSS is completely <strong>Cross-browser</strong> compatible(Yeah, even older IEs), check out the CSS below.</p>
<h2>Flipping Text Upside Down</h2>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
</pre>
<pre><span class="css"><span class="css-property">-webkit-transform<span class="css-selector">:</span><span class="css-value">rotate(-180deg)</span></span>;
<span class="css-property">-moz-transform<span class="css-selector">:</span><span class="css-value">rotate(-180deg)</span></span>;
<span class="css-property">-o-transform<span class="css-selector">:</span><span class="css-value">rotate(-180deg)</span></span>;
transform:rotate(-180deg);
ms-filter:<span class="css-string">&quot;progid:DXImageTransform.Microsoft.BasicImage(rotation=2)&quot;</span>;
filter:progid:DXImageTransform.Microsoft.BasicImage(<span class="css-property">rotation=2)</span>;</span></pre>
</div>
<h2>Reversing Text</h2>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
</pre>
<pre><span class="css"><span class="css-property">direction<span class="css-selector">:</span><span class="css-value"> rtl</span></span>;
unicode-bidi: bidi-override;</span></pre>
</div>
<h2>Live Demo</h2>
<p>Here is a live demo of implementation of above snippets:</p>
<h2>Flipping Text</h2>
<p><iframe src="http://www.priteshgupta.com/demos/text/text-flip.html" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:550px; height: 50px; margin-left: 15px;" allowTransparency="true"></iframe></p>
<h2>Reversing Text</h2>
<p><iframe src="http://www.priteshgupta.com/demos/text/text-reverse.html" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:550px; height: 50px; margin-left: 15px;" allowTransparency="true"></iframe></p>
<p>Alternatively, you can see them <a href="http://www.priteshgupta.com/demos/text/text.html" target="_blank">here</a>.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Flip+or+Reverse+Text+Using+CSS&amp;link=http://www.priteshgupta.com/2011/09/flip-or-reverse-text-using-css/&amp;notes=As%20title%20says%2C%20we%20can%20Flip%20Text%20Upside%20Down%20or%20Reverse%20Text%20using%20CSS%20only%28Rather%20than%20some%20jQuery%20Plugin%20or%20JavaScript%29.%20The%20CSS%20is%20completely%20Cross-browser%20compatible%28Yeah%2C%20even%20older%20IEs%29%2C%20check%20out%20the%20CSS%20below.%0D%0AFlipping%20Text%20Upside%20Down%0D%0A%7Bcode%20type%3Dcss%7D%0D%0A-webkit-transform%3Arotate%28-180deg%29%3B%0D%0A-m&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Flip+or+Reverse+Text+Using+CSS&amp;link=http://www.priteshgupta.com/2011/09/flip-or-reverse-text-using-css/&amp;notes=As%20title%20says%2C%20we%20can%20Flip%20Text%20Upside%20Down%20or%20Reverse%20Text%20using%20CSS%20only%28Rather%20than%20some%20jQuery%20Plugin%20or%20JavaScript%29.%20The%20CSS%20is%20completely%20Cross-browser%20compatible%28Yeah%2C%20even%20older%20IEs%29%2C%20check%20out%20the%20CSS%20below.%0D%0AFlipping%20Text%20Upside%20Down%0D%0A%7Bcode%20type%3Dcss%7D%0D%0A-webkit-transform%3Arotate%28-180deg%29%3B%0D%0A-m&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Flip+or+Reverse+Text+Using+CSS&amp;link=http://www.priteshgupta.com/2011/09/flip-or-reverse-text-using-css/&amp;notes=As%20title%20says%2C%20we%20can%20Flip%20Text%20Upside%20Down%20or%20Reverse%20Text%20using%20CSS%20only%28Rather%20than%20some%20jQuery%20Plugin%20or%20JavaScript%29.%20The%20CSS%20is%20completely%20Cross-browser%20compatible%28Yeah%2C%20even%20older%20IEs%29%2C%20check%20out%20the%20CSS%20below.%0D%0AFlipping%20Text%20Upside%20Down%0D%0A%7Bcode%20type%3Dcss%7D%0D%0A-webkit-transform%3Arotate%28-180deg%29%3B%0D%0A-m&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Flip+or+Reverse+Text+Using+CSS&amp;link=http://www.priteshgupta.com/2011/09/flip-or-reverse-text-using-css/&amp;notes=As%20title%20says%2C%20we%20can%20Flip%20Text%20Upside%20Down%20or%20Reverse%20Text%20using%20CSS%20only%28Rather%20than%20some%20jQuery%20Plugin%20or%20JavaScript%29.%20The%20CSS%20is%20completely%20Cross-browser%20compatible%28Yeah%2C%20even%20older%20IEs%29%2C%20check%20out%20the%20CSS%20below.%0D%0AFlipping%20Text%20Upside%20Down%0D%0A%7Bcode%20type%3Dcss%7D%0D%0A-webkit-transform%3Arotate%28-180deg%29%3B%0D%0A-m&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Flip+or+Reverse+Text+Using+CSS&amp;link=http://www.priteshgupta.com/2011/09/flip-or-reverse-text-using-css/&amp;notes=As%20title%20says%2C%20we%20can%20Flip%20Text%20Upside%20Down%20or%20Reverse%20Text%20using%20CSS%20only%28Rather%20than%20some%20jQuery%20Plugin%20or%20JavaScript%29.%20The%20CSS%20is%20completely%20Cross-browser%20compatible%28Yeah%2C%20even%20older%20IEs%29%2C%20check%20out%20the%20CSS%20below.%0D%0AFlipping%20Text%20Upside%20Down%0D%0A%7Bcode%20type%3Dcss%7D%0D%0A-webkit-transform%3Arotate%28-180deg%29%3B%0D%0A-m&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.priteshgupta.com/2011/09/flip-or-reverse-text-using-css/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Flip+or+Reverse+Text+Using+CSS&amp;link=http://www.priteshgupta.com/2011/09/flip-or-reverse-text-using-css/&amp;notes=As%20title%20says%2C%20we%20can%20Flip%20Text%20Upside%20Down%20or%20Reverse%20Text%20using%20CSS%20only%28Rather%20than%20some%20jQuery%20Plugin%20or%20JavaScript%29.%20The%20CSS%20is%20completely%20Cross-browser%20compatible%28Yeah%2C%20even%20older%20IEs%29%2C%20check%20out%20the%20CSS%20below.%0D%0AFlipping%20Text%20Upside%20Down%0D%0A%7Bcode%20type%3Dcss%7D%0D%0A-webkit-transform%3Arotate%28-180deg%29%3B%0D%0A-m&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Flip+or+Reverse+Text+Using+CSS&amp;link=http://www.priteshgupta.com/2011/09/flip-or-reverse-text-using-css/&amp;notes=As%20title%20says%2C%20we%20can%20Flip%20Text%20Upside%20Down%20or%20Reverse%20Text%20using%20CSS%20only%28Rather%20than%20some%20jQuery%20Plugin%20or%20JavaScript%29.%20The%20CSS%20is%20completely%20Cross-browser%20compatible%28Yeah%2C%20even%20older%20IEs%29%2C%20check%20out%20the%20CSS%20below.%0D%0AFlipping%20Text%20Upside%20Down%0D%0A%7Bcode%20type%3Dcss%7D%0D%0A-webkit-transform%3Arotate%28-180deg%29%3B%0D%0A-m&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.shareaholic.com/api/share/?title=Flip+or+Reverse+Text+Using+CSS&amp;link=http://www.priteshgupta.com/2011/09/flip-or-reverse-text-using-css/&amp;notes=As%20title%20says%2C%20we%20can%20Flip%20Text%20Upside%20Down%20or%20Reverse%20Text%20using%20CSS%20only%28Rather%20than%20some%20jQuery%20Plugin%20or%20JavaScript%29.%20The%20CSS%20is%20completely%20Cross-browser%20compatible%28Yeah%2C%20even%20older%20IEs%29%2C%20check%20out%20the%20CSS%20below.%0D%0AFlipping%20Text%20Upside%20Down%0D%0A%7Bcode%20type%3Dcss%7D%0D%0A-webkit-transform%3Arotate%28-180deg%29%3B%0D%0A-m&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=43&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.priteshgupta.com/2011/09/flip-or-reverse-text-using-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Advanced Image Functions using PHP</title>
		<link>http://www.priteshgupta.com/2011/09/advanced-image-functions-using-php/</link>
		<comments>http://www.priteshgupta.com/2011/09/advanced-image-functions-using-php/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 20:45:37 +0000</pubDate>
		<dc:creator>Pritesh Gupta</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.priteshgupta.com/?p=1735</guid>
		<description><![CDATA[Here are some PHP Functions for Images which I came across recently, these come under GD and Image Functions and require GD library. I have taken most of these from PHP Manual and they are quite helpful. Sharpening All Images 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some <a href="/category/php-2/" title="PHP" target="_blank">PHP</a> Functions for Images which I came across recently, these come under <strong>GD and Image Functions</strong> and require <strong>GD library</strong>. I have taken most of these from PHP Manual and they are quite helpful.</p>
<h2>Sharpening All Images</h2>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre>
<pre><span class="php"><span class="php-function">function</span> imagesharpen<span class="php-brackets">(</span> <span class="php-var">$image</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>

        <span class="php-var">$matrix</span> <span class="php-operator">=</span> <span class="php-keyword">array</span><span class="php-brackets">(</span>
            <span class="php-keyword">array</span><span class="php-brackets">(</span><span class="php-operator">-</span><span class="php-number">1</span>, <span class="php-operator">-</span><span class="php-number">1</span>, <span class="php-operator">-</span><span class="php-number">1</span><span class="php-brackets">)</span>,
            <span class="php-keyword">array</span><span class="php-brackets">(</span><span class="php-operator">-</span><span class="php-number">1</span>, <span class="php-number">1</span><span class="php-number">6</span>, <span class="php-operator">-</span><span class="php-number">1</span><span class="php-brackets">)</span>,
            <span class="php-keyword">array</span><span class="php-brackets">(</span><span class="php-operator">-</span><span class="php-number">1</span>, <span class="php-operator">-</span><span class="php-number">1</span>, <span class="php-operator">-</span><span class="php-number">1</span><span class="php-brackets">)</span>,
        <span class="php-brackets">)</span>;

        <span class="php-var">$divisor</span> <span class="php-operator">=</span> <span class="php-function">array_sum</span><span class="php-brackets">(</span><span class="php-function">array_map</span><span class="php-brackets">(</span><span class="php-string">'array_sum'</span>, <span class="php-var">$matrix</span><span class="php-brackets">)</span><span class="php-brackets">)</span>;
        <span class="php-var">$offset</span> <span class="php-operator">=</span> <span class="php-number">0</span>;
        <span class="php-function">imageconvolution</span><span class="php-brackets">(</span><span class="php-var">$image</span>, <span class="php-var">$matrix</span>, <span class="php-var">$divisor</span>, <span class="php-var">$offset</span><span class="php-brackets">)</span>;

        <span class="php-keyword">return</span> <span class="php-var">$image</span>;
    <span class="php-brackets">}</span></span></pre>
</div>
<h2>Sharpening Images via Function</h2>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
</pre>
<pre><span class="php"><span class="php-script-tag">&lt;?php</span>  

    <span class="php-function">function</span> GDThrowError<span class="php-brackets">(</span><span class="php-var">$message</span><span class="php-brackets">)</span>
    <span class="php-brackets">{</span>
        <span class="php-comment">// don't throw plain text errors in a function that's supposed to return an image
</span>
        <span class="php-comment">// as per &quot;the principle of least astonishment&quot;: the user is expecting
</span>
        <span class="php-comment">// a jpeg, and they'll be less astonished to get a JPEG error message
</span>
        <span class="php-comment">// than they would be if they got plain text.  Imagine this was called
</span>
        <span class="php-comment">// from an image tag, which makes sense, that's how you use images:
</span>
        <span class="php-comment">// plain text errors won't even reach most users, they'd have to copy
</span>
        <span class="php-comment">// the img src into the address bar.  It probably wont' even occur to
</span>
        <span class="php-comment">// them, as it's not typically helpful to view the source of an image
</span>
        <span class="php-comment">// resource.
</span>
        <span class="php-var">$font</span> <span class="php-operator">=</span> <span class="php-number">2</span>;
        <span class="php-comment">// create a canvas with a bit of padding
</span>
        <span class="php-var">$errimg</span> <span class="php-operator">=</span> <span class="php-function">imagecreate</span><span class="php-brackets">(</span><span class="php-brackets">(</span><span class="php-function">imagefontwidth</span><span class="php-brackets">(</span><span class="php-var">$font</span><span class="php-brackets">)</span> <span class="php-operator">*</span> <span class="php-function">strlen</span><span class="php-brackets">(</span><span class="php-var">$message</span><span class="php-brackets">)</span><span class="php-brackets">)</span> <span class="php-operator">+</span> <span class="php-number">2</span><span class="php-number">0</span>, <span class="php-function">imagefontheight</span><span class="php-brackets">(</span><span class="php-var">$font</span><span class="php-brackets">)</span> <span class="php-operator">+</span> <span class="php-number">1</span><span class="php-number">0</span><span class="php-brackets">)</span>;
        <span class="php-var">$bg</span> <span class="php-operator">=</span> <span class="php-function">imagecolorallocate</span><span class="php-brackets">(</span><span class="php-var">$errimg</span>, <span class="php-number">2</span><span class="php-number">5</span><span class="php-number">5</span>, <span class="php-number">2</span><span class="php-number">5</span><span class="php-number">5</span>, <span class="php-number">2</span><span class="php-number">5</span><span class="php-number">5</span><span class="php-brackets">)</span>;
        <span class="php-var">$textcol</span> <span class="php-operator">=</span> <span class="php-function">imagecolorallocate</span><span class="php-brackets">(</span><span class="php-var">$errimg</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-number">0</span><span class="php-brackets">)</span>;
        <span class="php-function">imagestring</span><span class="php-brackets">(</span><span class="php-var">$errimg</span>, <span class="php-number">2</span>, <span class="php-number">1</span><span class="php-number">0</span>, <span class="php-number">5</span>, <span class="php-var">$message</span>, <span class="php-var">$textcol</span><span class="php-brackets">)</span>;
        <span class="php-function">header</span><span class="php-brackets">(</span><span class="php-string">'Content-type: image/jpeg'</span><span class="php-brackets">)</span>;
        <span class="php-function">imagejpeg</span><span class="php-brackets">(</span><span class="php-var">$errimg</span><span class="php-brackets">)</span>;
        <span class="php-function">imagedestroy</span><span class="php-brackets">(</span><span class="php-var">$errimg</span><span class="php-brackets">)</span>;
    <span class="php-brackets">}</span> 

    <span class="php-function">function</span> GDMakeJpegLookLikeCrap<span class="php-brackets">(</span><span class="php-var">$target</span><span class="php-brackets">)</span>
    <span class="php-brackets">{</span>
        <span class="php-comment">// image dimensions are no longer needed (see below), but getimagesize can do some simple validation
</span>
        <span class="php-keyword">if</span> <span class="php-brackets">(</span><span class="php-brackets">(</span><span class="php-var">$dims</span> <span class="php-operator">=</span> @<span class="php-function">getimagesize</span><span class="php-brackets">(</span><span class="php-var">$target</span><span class="php-brackets">)</span><span class="php-brackets">)</span> <span class="php-operator">=</span><span class="php-operator">=</span><span class="php-operator">=</span> <span class="php-keyword">false</span> <span class="php-operator">|</span><span class="php-operator">|</span> <span class="php-var">$dims</span><span class="php-brackets">[</span><span class="php-string">'mime'</span><span class="php-brackets">]</span> <span class="php-operator">!</span><span class="php-operator">=</span> <span class="php-string">'image/jpeg'</span><span class="php-brackets">)</span>
        <span class="php-brackets">{</span>
            GDThrowError<span class="php-brackets">(</span><span class="php-string">'The file you specified couldn\'t be found or is not a valid jpeg image.  Make sure you spelled it correctly and provided the correct path.'</span><span class="php-brackets">)</span>;
           <span class="php-keyword">return</span><span class="php-brackets">(</span><span class="php-keyword">false</span><span class="php-brackets">)</span>;
        <span class="php-brackets">}</span>
        <span class="php-comment">// the original function creates a new image and resamples the source to it using the same height and width here.
</span>
        <span class="php-comment">// I imagine this was to add future resizing functionality but as it is it does nothing but waste resources
</span>
        <span class="php-var">$image</span> <span class="php-operator">=</span> <span class="php-function">imagecreatefromjpeg</span><span class="php-brackets">(</span><span class="php-var">$target</span><span class="php-brackets">)</span>;
        <span class="php-comment">// don't really know/care what this is.  If you're interested see http://us2.php.net/imageconvolution
</span>
        <span class="php-comment">// try tweaking these three vars for different effects, but there is a sharpening function in the php docs (above links) and it's not a trivial operation
</span>
        <span class="php-var">$spnMatrix</span> <span class="php-operator">=</span> <span class="php-keyword">array</span><span class="php-brackets">(</span> <span class="php-keyword">array</span><span class="php-brackets">(</span><span class="php-operator">-</span><span class="php-number">1</span>,<span class="php-operator">-</span><span class="php-number">1</span>,<span class="php-operator">-</span><span class="php-number">1</span>,<span class="php-brackets">)</span>,
                            <span class="php-keyword">array</span><span class="php-brackets">(</span><span class="php-operator">-</span><span class="php-number">1</span>,<span class="php-number">1</span><span class="php-number">6</span>,<span class="php-operator">-</span><span class="php-number">1</span>,<span class="php-brackets">)</span>,
                            <span class="php-keyword">array</span><span class="php-brackets">(</span><span class="php-operator">-</span><span class="php-number">1</span>,<span class="php-operator">-</span><span class="php-number">1</span>,<span class="php-operator">-</span><span class="php-number">1</span><span class="php-brackets">)</span><span class="php-brackets">)</span>;
        <span class="php-var">$divisor</span> <span class="php-operator">=</span> <span class="php-number">8</span>;
        <span class="php-var">$offset</span> <span class="php-operator">=</span> <span class="php-number">0</span>;
        <span class="php-function">imageconvolution</span><span class="php-brackets">(</span><span class="php-var">$image</span>, <span class="php-var">$spnMatrix</span>, <span class="php-var">$divisor</span>, <span class="php-var">$offset</span><span class="php-brackets">)</span>;
        <span class="php-comment">// I like to send headers as late as possible to avoid already sent errors and duplicate header content
</span>
        <span class="php-function">header</span><span class="php-brackets">(</span><span class="php-string">'Content-type: image/jpeg'</span><span class="php-brackets">)</span>;
        <span class="php-function">imagejpeg</span><span class="php-brackets">(</span><span class="php-var">$image</span>, null, <span class="php-number">1</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-brackets">)</span>;
        <span class="php-function">imagedestroy</span><span class="php-brackets">(</span><span class="php-var">$image</span><span class="php-brackets">)</span>;
<span class="php-brackets">}</span> 

<span class="php-comment">// example call
</span>
<span class="php-var">$s_image</span> <span class="php-operator">=</span> <span class="php-brackets">(</span><span class="php-keyword">isset</span><span class="php-brackets">(</span><span class="php-var">$_GET</span><span class="php-brackets">[</span><span class="php-string">'image'</span><span class="php-brackets">]</span><span class="php-brackets">)</span><span class="php-brackets">)</span> <span class="php-operator">?</span> <span class="php-var">$_GET</span><span class="php-brackets">[</span><span class="php-string">'image'</span><span class="php-brackets">]</span> <span class="php-operator">:</span> null; 

<span class="php-keyword">if</span> <span class="php-brackets">(</span><span class="php-function">preg_match</span><span class="php-brackets">(</span><span class="php-string">'/\.(jpg|jpeg)$/i'</span>, <span class="php-var">$s_image</span><span class="php-brackets">)</span><span class="php-brackets">)</span>
<span class="php-brackets">{</span>
    GDMakeJpegLookLikeCrap<span class="php-brackets">(</span><span class="php-var">$s_image</span><span class="php-brackets">)</span>;
<span class="php-brackets">}</span>
<span class="php-keyword">else</span>
<span class="php-brackets">{</span>
    GDThrowError<span class="php-brackets">(</span><span class="php-string">'Please specify a jpeg file to sharpen in the form: '</span> <span class="php-operator">.</span> <span class="php-var">$_SERVER</span><span class="php-brackets">[</span><span class="php-string">'PHP_SELF'</span><span class="php-brackets">]</span> <span class="php-operator">.</span> <span class="php-string">'?image=filename.jpg'</span><span class="php-brackets">)</span>;
<span class="php-brackets">}</span>
<span class="php-script-tag">?&gt;<span class="html"></span></span></span></pre>
</div>
<h2>Convert Image To PGM/Grayscale</h2>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
</pre>
<pre><span class="php"><span class="php-script-tag">&lt;?php</span>
    <span class="php-function">function</span> imagepgm<span class="php-brackets">(</span><span class="php-var">$image</span>, <span class="php-var">$filename</span> <span class="php-operator">=</span> null<span class="php-brackets">)</span>
    <span class="php-brackets">{</span>
        <span class="php-var">$pgm</span> <span class="php-operator">=</span> <span class="php-string">&quot;P5 &quot;</span><span class="php-operator">.</span><span class="php-function">imagesx</span><span class="php-brackets">(</span><span class="php-var">$image</span><span class="php-brackets">)</span><span class="php-operator">.</span><span class="php-string">&quot; &quot;</span><span class="php-operator">.</span><span class="php-function">imagesy</span><span class="php-brackets">(</span><span class="php-var">$image</span><span class="php-brackets">)</span><span class="php-operator">.</span><span class="php-string">&quot; 255\n&quot;</span>;
        <span class="php-keyword">for</span><span class="php-brackets">(</span><span class="php-var">$y</span> <span class="php-operator">=</span> <span class="php-number">0</span>; <span class="php-var">$y</span> <span class="php-operator">&lt;</span> <span class="php-function">imagesy</span><span class="php-brackets">(</span><span class="php-var">$image</span><span class="php-brackets">)</span>; <span class="php-var">$y</span><span class="php-operator">+</span><span class="php-operator">+</span><span class="php-brackets">)</span>
        <span class="php-brackets">{</span>
            <span class="php-keyword">for</span><span class="php-brackets">(</span><span class="php-var">$x</span> <span class="php-operator">=</span> <span class="php-number">0</span>; <span class="php-var">$x</span> <span class="php-operator">&lt;</span> <span class="php-function">imagesx</span><span class="php-brackets">(</span><span class="php-var">$image</span><span class="php-brackets">)</span>; <span class="php-var">$x</span><span class="php-operator">+</span><span class="php-operator">+</span><span class="php-brackets">)</span>
            <span class="php-brackets">{</span>
                <span class="php-var">$colors</span> <span class="php-operator">=</span> <span class="php-function">imagecolorsforindex</span><span class="php-brackets">(</span><span class="php-var">$image</span>, <span class="php-function">imagecolorat</span><span class="php-brackets">(</span><span class="php-var">$image</span>, <span class="php-var">$x</span>, <span class="php-var">$y</span><span class="php-brackets">)</span><span class="php-brackets">)</span>;
                <span class="php-var">$pgm</span> <span class="php-operator">.</span><span class="php-operator">=</span> <span class="php-function">chr</span><span class="php-brackets">(</span><span class="php-number">0</span><span class="php-operator">.</span><span class="php-number">3</span> <span class="php-operator">*</span> <span class="php-var">$colors</span><span class="php-brackets">[</span><span class="php-string">&quot;red&quot;</span><span class="php-brackets">]</span> <span class="php-operator">+</span> <span class="php-number">0</span><span class="php-operator">.</span><span class="php-number">5</span><span class="php-number">9</span> <span class="php-operator">*</span> <span class="php-var">$colors</span><span class="php-brackets">[</span><span class="php-string">&quot;green&quot;</span><span class="php-brackets">]</span> <span class="php-operator">+</span> <span class="php-number">0</span><span class="php-operator">.</span><span class="php-number">1</span><span class="php-number">1</span> <span class="php-operator">*</span> <span class="php-var">$colors</span><span class="php-brackets">[</span><span class="php-string">&quot;blue&quot;</span><span class="php-brackets">]</span><span class="php-brackets">)</span>;
            <span class="php-brackets">}</span>
        <span class="php-brackets">}</span>
        <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$filename</span> <span class="php-operator">!</span><span class="php-operator">=</span> null<span class="php-brackets">)</span>
        <span class="php-brackets">{</span>
            <span class="php-var">$fp</span> <span class="php-operator">=</span> <span class="php-function">fopen</span><span class="php-brackets">(</span><span class="php-var">$filename</span>, <span class="php-string">&quot;w&quot;</span><span class="php-brackets">)</span>;
            <span class="php-function">fwrite</span><span class="php-brackets">(</span><span class="php-var">$fp</span>, <span class="php-var">$pgm</span><span class="php-brackets">)</span>;
            <span class="php-function">fclose</span><span class="php-brackets">(</span><span class="php-var">$fp</span><span class="php-brackets">)</span>;
        <span class="php-brackets">}</span>
        <span class="php-keyword">else</span>
        <span class="php-brackets">{</span>
            <span class="php-keyword">return</span> <span class="php-var">$pgm</span>;
        <span class="php-brackets">}</span>
    <span class="php-brackets">}</span>
<span class="php-script-tag">?&gt;<span class="html"></span></span></span></pre>
</div>
<h2>Giving Image Sepia Effect</h2>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
</pre>
<pre><span class="php"><span class="php-script-tag">&lt;?php</span>
   <span class="php-comment">// replace with your files
</span>
    <span class="php-var">$originalFileName</span>    <span class="php-operator">=</span> <span class="php-var">$filename</span>;
    <span class="php-var">$destinationFileName</span> <span class="php-operator">=</span> <span class="php-string">&quot;2&quot;</span><span class="php-operator">.</span><span class="php-var">$filename</span>;

    <span class="php-comment">// create a copy of the original image
</span>
    <span class="php-comment">// works with jpg images
</span>
    <span class="php-comment">// fell free to adapt to other formats <img src='http://www.priteshgupta.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
</span>
    <span class="php-var">$fullPath</span> <span class="php-operator">=</span> <span class="php-function">explode</span><span class="php-brackets">(</span><span class="php-string">&quot;.&quot;</span>,<span class="php-var">$originalFileName</span><span class="php-brackets">)</span>;
    <span class="php-var">$lastIndex</span> <span class="php-operator">=</span> <span class="php-function">sizeof</span><span class="php-brackets">(</span><span class="php-var">$fullPath</span><span class="php-brackets">)</span> <span class="php-operator">-</span> <span class="php-number">1</span>;
    <span class="php-var">$extension</span> <span class="php-operator">=</span> <span class="php-var">$fullPath</span><span class="php-brackets">[</span><span class="php-var">$lastIndex</span><span class="php-brackets">]</span>;
    <span class="php-keyword">if</span> <span class="php-brackets">(</span><span class="php-function">preg_match</span><span class="php-brackets">(</span><span class="php-string">&quot;/jpg|jpeg|JPG|JPEG/&quot;</span>, <span class="php-var">$extension</span><span class="php-brackets">)</span><span class="php-brackets">)</span>
    <span class="php-brackets">{</span>
        <span class="php-var">$sourceImage</span> <span class="php-operator">=</span> <span class="php-function">imagecreatefromjpeg</span><span class="php-brackets">(</span><span class="php-var">$originalFileName</span><span class="php-brackets">)</span>;
    <span class="php-brackets">}</span>

    <span class="php-comment">// get image dimensions
</span>
    <span class="php-var">$img_width</span>  <span class="php-operator">=</span> imageSX<span class="php-brackets">(</span><span class="php-var">$sourceImage</span><span class="php-brackets">)</span>;
    <span class="php-var">$img_height</span> <span class="php-operator">=</span> imageSY<span class="php-brackets">(</span><span class="php-var">$sourceImage</span><span class="php-brackets">)</span>;

    <span class="php-comment">// convert to grayscale
</span>
    <span class="php-comment">// note: this will NOT affect your original image, unless
</span>
    <span class="php-comment">// originalFileName and destinationFileName are the same
</span>
    <span class="php-keyword">for</span> <span class="php-brackets">(</span><span class="php-var">$y</span> <span class="php-operator">=</span> <span class="php-number">0</span>; <span class="php-var">$y</span> <span class="php-operator">&lt;</span><span class="php-var">$img_height</span>; <span class="php-var">$y</span><span class="php-operator">+</span><span class="php-operator">+</span><span class="php-brackets">)</span>
    <span class="php-brackets">{</span>
        <span class="php-keyword">for</span> <span class="php-brackets">(</span><span class="php-var">$x</span> <span class="php-operator">=</span> <span class="php-number">0</span>; <span class="php-var">$x</span> <span class="php-operator">&lt;</span><span class="php-var">$img_width</span>; <span class="php-var">$x</span><span class="php-operator">+</span><span class="php-operator">+</span><span class="php-brackets">)</span>
        <span class="php-brackets">{</span>
            <span class="php-var">$rgb</span> <span class="php-operator">=</span> <span class="php-function">imagecolorat</span><span class="php-brackets">(</span><span class="php-var">$sourceImage</span>, <span class="php-var">$x</span>, <span class="php-var">$y</span><span class="php-brackets">)</span>;
            <span class="php-var">$red</span>   <span class="php-operator">=</span> <span class="php-brackets">(</span><span class="php-var">$rgb</span> <span class="php-operator">&gt;</span><span class="php-operator">&gt;</span> <span class="php-number">1</span><span class="php-number">6</span><span class="php-brackets">)</span> <span class="php-operator">&amp;</span> <span class="php-number">0</span>xFF;
            <span class="php-var">$green</span> <span class="php-operator">=</span> <span class="php-brackets">(</span><span class="php-var">$rgb</span> <span class="php-operator">&gt;</span><span class="php-operator">&gt;</span> <span class="php-number">8</span><span class="php-brackets">)</span>  <span class="php-operator">&amp;</span> <span class="php-number">0</span>xFF;
            <span class="php-var">$blue</span>  <span class="php-operator">=</span> <span class="php-var">$rgb</span> <span class="php-operator">&amp;</span> <span class="php-number">0</span>xFF;

          <span class="php-comment">//sepia
</span>
            <span class="php-var">$red2</span> <span class="php-operator">=</span> <span class="php-function">min</span><span class="php-brackets">(</span><span class="php-var">$red</span><span class="php-operator">*</span><span class="php-operator">.</span><span class="php-number">3</span><span class="php-number">9</span><span class="php-number">3</span> <span class="php-operator">+</span> <span class="php-var">$green</span><span class="php-operator">*</span><span class="php-operator">.</span><span class="php-number">7</span><span class="php-number">6</span><span class="php-number">9</span> <span class="php-operator">+</span> <span class="php-var">$blue</span><span class="php-operator">*</span><span class="php-operator">.</span><span class="php-number">1</span><span class="php-number">8</span><span class="php-number">9</span>,<span class="php-number">2</span><span class="php-number">5</span><span class="php-number">5</span><span class="php-brackets">)</span>;
            <span class="php-var">$green2</span> <span class="php-operator">=</span> <span class="php-function">min</span><span class="php-brackets">(</span><span class="php-var">$red</span><span class="php-operator">*</span><span class="php-operator">.</span><span class="php-number">3</span><span class="php-number">4</span><span class="php-number">9</span> <span class="php-operator">+</span> <span class="php-var">$green</span><span class="php-operator">*</span><span class="php-operator">.</span><span class="php-number">6</span><span class="php-number">8</span><span class="php-number">6</span> <span class="php-operator">+</span> <span class="php-var">$blue</span><span class="php-operator">*</span><span class="php-operator">.</span><span class="php-number">1</span><span class="php-number">6</span><span class="php-number">8</span>,<span class="php-number">2</span><span class="php-number">5</span><span class="php-number">5</span><span class="php-brackets">)</span>;
            <span class="php-var">$blue2</span>  <span class="php-operator">=</span> <span class="php-function">min</span><span class="php-brackets">(</span><span class="php-var">$red</span><span class="php-operator">*</span><span class="php-operator">.</span><span class="php-number">2</span><span class="php-number">7</span><span class="php-number">2</span> <span class="php-operator">+</span> <span class="php-var">$green</span><span class="php-operator">*</span><span class="php-operator">.</span><span class="php-number">5</span><span class="php-number">3</span><span class="php-number">4</span> <span class="php-operator">+</span> <span class="php-var">$blue</span><span class="php-operator">*</span><span class="php-operator">.</span><span class="php-number">1</span><span class="php-number">3</span><span class="php-number">1</span>,<span class="php-number">2</span><span class="php-number">5</span><span class="php-number">5</span><span class="php-brackets">)</span>;
            <span class="php-comment">// shift gray level to the left
</span>

            <span class="php-var">$grayR</span> <span class="php-operator">=</span> <span class="php-var">$red2</span> <span class="php-operator">&lt;</span><span class="php-operator">&lt;</span> <span class="php-number">1</span><span class="php-number">6</span>;   <span class="php-comment">// R: red
</span>
            <span class="php-var">$grayG</span> <span class="php-operator">=</span> <span class="php-var">$green2</span> <span class="php-operator">&lt;</span><span class="php-operator">&lt;</span> <span class="php-number">8</span> ;    <span class="php-comment">// G: green
</span>
            <span class="php-var">$grayB</span> <span class="php-operator">=</span> <span class="php-var">$blue2</span>;         <span class="php-comment">// B: blue
</span>

            <span class="php-comment">// OR operation to compute gray value
</span>
            <span class="php-var">$grayColor</span> <span class="php-operator">=</span> <span class="php-var">$grayR</span> <span class="php-operator">|</span> <span class="php-var">$grayG</span> <span class="php-operator">|</span> <span class="php-var">$grayB</span>;

            <span class="php-comment">// set the pixel color
</span>
            <span class="php-function">imagesetpixel</span> <span class="php-brackets">(</span><span class="php-var">$sourceImage</span>, <span class="php-var">$x</span>, <span class="php-var">$y</span>, <span class="php-var">$grayColor</span><span class="php-brackets">)</span>;
            <span class="php-function">imagecolorallocate</span> <span class="php-brackets">(</span><span class="php-var">$sourceImage</span>, <span class="php-var">$gray</span>, <span class="php-var">$gray</span>, <span class="php-var">$gray</span><span class="php-brackets">)</span>;
        <span class="php-brackets">}</span>
    <span class="php-brackets">}</span>

    <span class="php-comment">// copy pixel values to new file buffer
</span>
    <span class="php-var">$destinationImage</span> <span class="php-operator">=</span> ImageCreateTrueColor<span class="php-brackets">(</span><span class="php-var">$img_width</span>, <span class="php-var">$img_height</span><span class="php-brackets">)</span>;
    <span class="php-function">imagecopy</span><span class="php-brackets">(</span><span class="php-var">$destinationImage</span>, <span class="php-var">$sourceImage</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-var">$img_width</span>, <span class="php-var">$img_height</span><span class="php-brackets">)</span>;

    <span class="php-comment">// create file on disk
</span>
    <span class="php-function">imagejpeg</span><span class="php-brackets">(</span><span class="php-var">$destinationImage</span>, <span class="php-var">$destinationFileName</span><span class="php-brackets">)</span>;

    <span class="php-comment">// destroy temp image buffers
</span>
    <span class="php-function">imagedestroy</span><span class="php-brackets">(</span><span class="php-var">$destinationImage</span><span class="php-brackets">)</span>;
    <span class="php-function">imagedestroy</span><span class="php-brackets">(</span><span class="php-var">$sourceImage</span><span class="php-brackets">)</span>;
<span class="php-script-tag">?&gt;<span class="html"></span></span></span></pre>
</div>
<h2>Image Reflection</h2>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
</pre>
<pre><span class="php"><span class="php-script-tag">&lt;?php</span>
<span class="php-function">function</span> imagereflection<span class="php-brackets">(</span><span class="php-var">$src_img</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
  <span class="php-var">$src_height</span> <span class="php-operator">=</span> <span class="php-function">imagesy</span><span class="php-brackets">(</span><span class="php-var">$src_img</span><span class="php-brackets">)</span>;
  <span class="php-var">$src_width</span> <span class="php-operator">=</span> <span class="php-function">imagesx</span><span class="php-brackets">(</span><span class="php-var">$src_img</span><span class="php-brackets">)</span>;
  <span class="php-var">$dest_height</span> <span class="php-operator">=</span> <span class="php-var">$src_height</span> <span class="php-operator">+</span> <span class="php-brackets">(</span><span class="php-var">$src_height</span> <span class="php-operator">/</span> <span class="php-number">2</span><span class="php-brackets">)</span>;
  <span class="php-var">$dest_width</span> <span class="php-operator">=</span> <span class="php-var">$src_width</span>;

  <span class="php-var">$reflected</span> <span class="php-operator">=</span> <span class="php-function">imagecreatetruecolor</span><span class="php-brackets">(</span><span class="php-var">$dest_width</span>, <span class="php-var">$dest_height</span><span class="php-brackets">)</span>;
  <span class="php-function">imagealphablending</span><span class="php-brackets">(</span><span class="php-var">$reflected</span>, <span class="php-keyword">false</span><span class="php-brackets">)</span>;
  <span class="php-function">imagesavealpha</span><span class="php-brackets">(</span><span class="php-var">$reflected</span>, <span class="php-keyword">true</span><span class="php-brackets">)</span>;

  <span class="php-function">imagecopy</span><span class="php-brackets">(</span><span class="php-var">$reflected</span>, <span class="php-var">$src_img</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-var">$src_width</span>, <span class="php-var">$src_height</span><span class="php-brackets">)</span>;
  <span class="php-var">$reflection_height</span> <span class="php-operator">=</span> <span class="php-var">$src_height</span> <span class="php-operator">/</span> <span class="php-number">2</span>;
  <span class="php-var">$alpha_step</span> <span class="php-operator">=</span> <span class="php-number">8</span><span class="php-number">0</span> <span class="php-operator">/</span> <span class="php-var">$reflection_height</span>;
  <span class="php-keyword">for</span> <span class="php-brackets">(</span><span class="php-var">$y</span> <span class="php-operator">=</span> <span class="php-number">1</span>; <span class="php-var">$y</span> <span class="php-operator">&lt;</span><span class="php-operator">=</span> <span class="php-var">$reflection_height</span>; <span class="php-var">$y</span><span class="php-operator">+</span><span class="php-operator">+</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
    <span class="php-keyword">for</span> <span class="php-brackets">(</span><span class="php-var">$x</span> <span class="php-operator">=</span> <span class="php-number">0</span>; <span class="php-var">$x</span> <span class="php-operator">&lt;</span> <span class="php-var">$dest_width</span>; <span class="php-var">$x</span><span class="php-operator">+</span><span class="php-operator">+</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
      <span class="php-comment">// copy pixel from x / $src_height - y to x / $src_height + y
</span>
      <span class="php-var">$rgba</span> <span class="php-operator">=</span> <span class="php-function">imagecolorat</span><span class="php-brackets">(</span><span class="php-var">$src_img</span>, <span class="php-var">$x</span>, <span class="php-var">$src_height</span> <span class="php-operator">-</span> <span class="php-var">$y</span><span class="php-brackets">)</span>;
      <span class="php-var">$alpha</span> <span class="php-operator">=</span> <span class="php-brackets">(</span><span class="php-var">$rgba</span> <span class="php-operator">&amp;</span> <span class="php-number">0</span>x<span class="php-number">7</span>F<span class="php-number">0</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-number">0</span><span class="php-brackets">)</span> <span class="php-operator">&gt;</span><span class="php-operator">&gt;</span> <span class="php-number">2</span><span class="php-number">4</span>;
      <span class="php-var">$alpha</span> <span class="php-operator">=</span>  <span class="php-function">max</span><span class="php-brackets">(</span><span class="php-var">$alpha</span>, <span class="php-number">4</span><span class="php-number">7</span> <span class="php-operator">+</span> <span class="php-brackets">(</span><span class="php-var">$y</span> <span class="php-operator">*</span> <span class="php-var">$alpha_step</span><span class="php-brackets">)</span><span class="php-brackets">)</span>;
      <span class="php-var">$rgba</span> <span class="php-operator">=</span> <span class="php-function">imagecolorsforindex</span><span class="php-brackets">(</span><span class="php-var">$src_img</span>, <span class="php-var">$rgba</span><span class="php-brackets">)</span>;
      <span class="php-var">$rgba</span> <span class="php-operator">=</span> <span class="php-function">imagecolorallocatealpha</span><span class="php-brackets">(</span><span class="php-var">$reflected</span>, <span class="php-var">$rgba</span><span class="php-brackets">[</span><span class="php-string">'red'</span><span class="php-brackets">]</span>, <span class="php-var">$rgba</span><span class="php-brackets">[</span><span class="php-string">'green'</span><span class="php-brackets">]</span>, <span class="php-var">$rgba</span><span class="php-brackets">[</span><span class="php-string">'blue'</span><span class="php-brackets">]</span>, <span class="php-var">$alpha</span><span class="php-brackets">)</span>;
      <span class="php-function">imagesetpixel</span><span class="php-brackets">(</span><span class="php-var">$reflected</span>, <span class="php-var">$x</span>, <span class="php-var">$src_height</span> <span class="php-operator">+</span> <span class="php-var">$y</span> <span class="php-operator">-</span> <span class="php-number">1</span>, <span class="php-var">$rgba</span><span class="php-brackets">)</span>;
    <span class="php-brackets">}</span>
  <span class="php-brackets">}</span>

  <span class="php-keyword">return</span> <span class="php-var">$reflected</span>;
<span class="php-brackets">}</span>
<span class="php-script-tag">?&gt;<span class="html"></span></span></span></pre>
</div>
<h2>Putting Text Vertically On Images</h2>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
</pre>
<pre><span class="php"><span class="php-script-tag">&lt;?php</span>
<span class="php-var">$string</span> <span class="php-operator">=</span> <span class="php-string">'Your Text'</span>;
<span class="php-var">$font_size</span> <span class="php-operator">=</span> <span class="php-number">2</span>;
<span class="php-var">$img</span> <span class="php-operator">=</span> <span class="php-function">imagecreate</span><span class="php-brackets">(</span><span class="php-number">2</span><span class="php-number">0</span>,<span class="php-number">9</span><span class="php-number">0</span><span class="php-brackets">)</span>;
<span class="php-var">$bg</span> <span class="php-operator">=</span> <span class="php-function">imagecolorallocate</span><span class="php-brackets">(</span><span class="php-var">$img</span>,<span class="php-number">2</span><span class="php-number">2</span><span class="php-number">5</span>,<span class="php-number">2</span><span class="php-number">2</span><span class="php-number">5</span>,<span class="php-number">2</span><span class="php-number">2</span><span class="php-number">5</span><span class="php-brackets">)</span>;
<span class="php-var">$black</span> <span class="php-operator">=</span> <span class="php-function">imagecolorallocate</span><span class="php-brackets">(</span><span class="php-var">$img</span>,<span class="php-number">0</span>,<span class="php-number">0</span>,<span class="php-number">0</span><span class="php-brackets">)</span>;

<span class="php-var">$len</span> <span class="php-operator">=</span> <span class="php-function">strlen</span><span class="php-brackets">(</span><span class="php-var">$string</span><span class="php-brackets">)</span>;
<span class="php-keyword">for</span> <span class="php-brackets">(</span><span class="php-var">$i</span><span class="php-operator">=</span><span class="php-number">1</span>; <span class="php-var">$i</span><span class="php-operator">&lt;</span><span class="php-operator">=</span><span class="php-var">$len</span>; <span class="php-var">$i</span><span class="php-operator">+</span><span class="php-operator">+</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
    <span class="php-function">imagecharup</span><span class="php-brackets">(</span><span class="php-var">$img</span>, <span class="php-var">$font_size</span>, <span class="php-number">5</span>, <span class="php-function">imagesy</span><span class="php-brackets">(</span><span class="php-var">$img</span><span class="php-brackets">)</span><span class="php-operator">-</span><span class="php-brackets">(</span><span class="php-var">$i</span><span class="php-operator">*</span><span class="php-function">imagefontwidth</span><span class="php-brackets">(</span><span class="php-var">$font_size</span><span class="php-brackets">)</span><span class="php-brackets">)</span>, <span class="php-var">$string</span>, <span class="php-var">$black</span><span class="php-brackets">)</span>;
    <span class="php-var">$string</span> <span class="php-operator">=</span> <span class="php-function">substr</span><span class="php-brackets">(</span><span class="php-var">$string</span>,<span class="php-number">1</span><span class="php-brackets">)</span>;
<span class="php-brackets">}</span>
<span class="php-function">header</span><span class="php-brackets">(</span><span class="php-string">'Content-type: image/png'</span><span class="php-brackets">)</span>;
<span class="php-function">imagepng</span><span class="php-brackets">(</span><span class="php-var">$img</span><span class="php-brackets">)</span>;
<span class="php-function">imagedestroy</span><span class="php-brackets">(</span><span class="php-var">$img</span><span class="php-brackets">)</span>;
<span class="php-script-tag">?&gt;<span class="html"></span></span></span></pre>
</div>
<h2>Putting Watermark On Images</h2>
<p>Watermark can be a png(with transparency) and can be placed anywhere on the image. </p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
</pre>
<pre><span class="php"><span class="php-script-tag">&lt;?php</span>
<span class="php-function">function</span> imagelogo <span class="php-brackets">(</span><span class="php-operator">&amp;</span><span class="php-var">$dst_image</span>, <span class="php-var">$src_image</span>, <span class="php-var">$dst_w</span>, <span class="php-var">$dst_h</span>, <span class="php-var">$src_w</span>, <span class="php-var">$src_h</span>, <span class="php-var">$position</span><span class="php-operator">=</span><span class="php-string">'bottom-left'</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
    <span class="php-function">imagealphablending</span><span class="php-brackets">(</span><span class="php-var">$dst_image</span>,<span class="php-keyword">true</span><span class="php-brackets">)</span>;
    <span class="php-function">imagealphablending</span><span class="php-brackets">(</span><span class="php-var">$src_image</span>,<span class="php-keyword">true</span><span class="php-brackets">)</span>;
    <span class="php-keyword">if</span> <span class="php-brackets">(</span><span class="php-var">$position</span> <span class="php-operator">=</span><span class="php-operator">=</span> <span class="php-string">'random'</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
        <span class="php-var">$position</span> <span class="php-operator">=</span> <span class="php-function">rand</span><span class="php-brackets">(</span><span class="php-number">1</span>,<span class="php-number">8</span><span class="php-brackets">)</span>;
    <span class="php-brackets">}</span>
    <span class="php-keyword">switch</span> <span class="php-brackets">(</span><span class="php-var">$position</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
        <span class="php-keyword">case</span> <span class="php-string">'top-right'</span><span class="php-operator">:</span>
        <span class="php-keyword">case</span> <span class="php-string">'right-top'</span><span class="php-operator">:</span>
        <span class="php-keyword">case</span> <span class="php-number">1</span><span class="php-operator">:</span>
            <span class="php-function">imagecopy</span><span class="php-brackets">(</span><span class="php-var">$dst_image</span>, <span class="php-var">$src_image</span>, <span class="php-brackets">(</span><span class="php-var">$dst_w</span><span class="php-operator">-</span><span class="php-var">$src_w</span><span class="php-brackets">)</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-var">$src_w</span>, <span class="php-var">$src_h</span><span class="php-brackets">)</span>;
        <span class="php-keyword">break</span>;
        <span class="php-keyword">case</span> <span class="php-string">'top-left'</span><span class="php-operator">:</span>
        <span class="php-keyword">case</span> <span class="php-string">'left-top'</span><span class="php-operator">:</span>
        <span class="php-keyword">case</span> <span class="php-number">2</span><span class="php-operator">:</span>
            <span class="php-function">imagecopy</span><span class="php-brackets">(</span><span class="php-var">$dst_image</span>, <span class="php-var">$src_image</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-var">$src_w</span>, <span class="php-var">$src_h</span><span class="php-brackets">)</span>;
        <span class="php-keyword">break</span>;
        <span class="php-keyword">case</span> <span class="php-string">'bottom-right'</span><span class="php-operator">:</span>
        <span class="php-keyword">case</span> <span class="php-string">'right-bottom'</span><span class="php-operator">:</span>
        <span class="php-keyword">case</span> <span class="php-number">3</span><span class="php-operator">:</span>
            <span class="php-function">imagecopy</span><span class="php-brackets">(</span><span class="php-var">$dst_image</span>, <span class="php-var">$src_image</span>, <span class="php-brackets">(</span><span class="php-var">$dst_w</span><span class="php-operator">-</span><span class="php-var">$src_w</span><span class="php-brackets">)</span>, <span class="php-brackets">(</span><span class="php-var">$dst_h</span><span class="php-operator">-</span><span class="php-var">$src_h</span><span class="php-brackets">)</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-var">$src_w</span>, <span class="php-var">$src_h</span><span class="php-brackets">)</span>;
        <span class="php-keyword">break</span>;
        <span class="php-keyword">case</span> <span class="php-string">'bottom-left'</span><span class="php-operator">:</span>
        <span class="php-keyword">case</span> <span class="php-string">'left-bottom'</span><span class="php-operator">:</span>
        <span class="php-keyword">case</span> <span class="php-number">4</span><span class="php-operator">:</span>
            <span class="php-function">imagecopy</span><span class="php-brackets">(</span><span class="php-var">$dst_image</span>, <span class="php-var">$src_image</span>, <span class="php-number">0</span> , <span class="php-brackets">(</span><span class="php-var">$dst_h</span><span class="php-operator">-</span><span class="php-var">$src_h</span><span class="php-brackets">)</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-var">$src_w</span>, <span class="php-var">$src_h</span><span class="php-brackets">)</span>;
        <span class="php-keyword">break</span>;
        <span class="php-keyword">case</span> <span class="php-string">'center'</span><span class="php-operator">:</span>
        <span class="php-keyword">case</span> <span class="php-number">5</span><span class="php-operator">:</span>
            <span class="php-function">imagecopy</span><span class="php-brackets">(</span><span class="php-var">$dst_image</span>, <span class="php-var">$src_image</span>, <span class="php-brackets">(</span><span class="php-brackets">(</span><span class="php-var">$dst_w</span><span class="php-operator">/</span><span class="php-number">2</span><span class="php-brackets">)</span><span class="php-operator">-</span><span class="php-brackets">(</span><span class="php-var">$src_w</span><span class="php-operator">/</span><span class="php-number">2</span><span class="php-brackets">)</span><span class="php-brackets">)</span>, <span class="php-brackets">(</span><span class="php-brackets">(</span><span class="php-var">$dst_h</span><span class="php-operator">/</span><span class="php-number">2</span><span class="php-brackets">)</span><span class="php-operator">-</span><span class="php-brackets">(</span><span class="php-var">$src_h</span><span class="php-operator">/</span><span class="php-number">2</span><span class="php-brackets">)</span><span class="php-brackets">)</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-var">$src_w</span>, <span class="php-var">$src_h</span><span class="php-brackets">)</span>;
        <span class="php-keyword">break</span>;
        <span class="php-keyword">case</span> <span class="php-string">'top'</span><span class="php-operator">:</span>
        <span class="php-keyword">case</span> <span class="php-number">6</span><span class="php-operator">:</span>
            <span class="php-function">imagecopy</span><span class="php-brackets">(</span><span class="php-var">$dst_image</span>, <span class="php-var">$src_image</span>, <span class="php-brackets">(</span><span class="php-brackets">(</span><span class="php-var">$dst_w</span><span class="php-operator">/</span><span class="php-number">2</span><span class="php-brackets">)</span><span class="php-operator">-</span><span class="php-brackets">(</span><span class="php-var">$src_w</span><span class="php-operator">/</span><span class="php-number">2</span><span class="php-brackets">)</span><span class="php-brackets">)</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-var">$src_w</span>, <span class="php-var">$src_h</span><span class="php-brackets">)</span>;
        <span class="php-keyword">break</span>;
        <span class="php-keyword">case</span> <span class="php-string">'bottom'</span><span class="php-operator">:</span>
        <span class="php-keyword">case</span> <span class="php-number">7</span><span class="php-operator">:</span>
            <span class="php-function">imagecopy</span><span class="php-brackets">(</span><span class="php-var">$dst_image</span>, <span class="php-var">$src_image</span>, <span class="php-brackets">(</span><span class="php-brackets">(</span><span class="php-var">$dst_w</span><span class="php-operator">/</span><span class="php-number">2</span><span class="php-brackets">)</span><span class="php-operator">-</span><span class="php-brackets">(</span><span class="php-var">$src_w</span><span class="php-operator">/</span><span class="php-number">2</span><span class="php-brackets">)</span><span class="php-brackets">)</span>, <span class="php-brackets">(</span><span class="php-var">$dst_h</span><span class="php-operator">-</span><span class="php-var">$src_h</span><span class="php-brackets">)</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-var">$src_w</span>, <span class="php-var">$src_h</span><span class="php-brackets">)</span>;
        <span class="php-keyword">break</span>;
        <span class="php-keyword">case</span> <span class="php-string">'left'</span><span class="php-operator">:</span>
        <span class="php-keyword">case</span> <span class="php-number">8</span><span class="php-operator">:</span>
            <span class="php-function">imagecopy</span><span class="php-brackets">(</span><span class="php-var">$dst_image</span>, <span class="php-var">$src_image</span>, <span class="php-number">0</span>, <span class="php-brackets">(</span><span class="php-brackets">(</span><span class="php-var">$dst_h</span><span class="php-operator">/</span><span class="php-number">2</span><span class="php-brackets">)</span><span class="php-operator">-</span><span class="php-brackets">(</span><span class="php-var">$src_h</span><span class="php-operator">/</span><span class="php-number">2</span><span class="php-brackets">)</span><span class="php-brackets">)</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-var">$src_w</span>, <span class="php-var">$src_h</span><span class="php-brackets">)</span>;
        <span class="php-keyword">break</span>;
        <span class="php-keyword">case</span> <span class="php-string">'right'</span><span class="php-operator">:</span>
        <span class="php-keyword">case</span> <span class="php-number">9</span><span class="php-operator">:</span>
            <span class="php-function">imagecopy</span><span class="php-brackets">(</span><span class="php-var">$dst_image</span>, <span class="php-var">$src_image</span>, <span class="php-brackets">(</span><span class="php-var">$dst_w</span><span class="php-operator">-</span><span class="php-var">$src_w</span><span class="php-brackets">)</span>, <span class="php-brackets">(</span><span class="php-brackets">(</span><span class="php-var">$dst_h</span><span class="php-operator">/</span><span class="php-number">2</span><span class="php-brackets">)</span><span class="php-operator">-</span><span class="php-brackets">(</span><span class="php-var">$src_h</span><span class="php-operator">/</span><span class="php-number">2</span><span class="php-brackets">)</span><span class="php-brackets">)</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-var">$src_w</span>, <span class="php-var">$src_h</span><span class="php-brackets">)</span>;
        <span class="php-keyword">break</span>;
    <span class="php-brackets">}</span>
<span class="php-brackets">}</span> 

<span class="php-comment">// example:
</span>

imagelogo<span class="php-brackets">(</span><span class="php-var">$image</span>, <span class="php-var">$watermark</span>, <span class="php-function">imagesx</span><span class="php-brackets">(</span><span class="php-var">$image</span><span class="php-brackets">)</span>, <span class="php-function">imagesy</span><span class="php-brackets">(</span><span class="php-var">$image</span><span class="php-brackets">)</span>, <span class="php-function">imagesx</span><span class="php-brackets">(</span><span class="php-var">$watermark</span><span class="php-brackets">)</span>, <span class="php-function">imagesy</span><span class="php-brackets">(</span><span class="php-var">$watermark</span><span class="php-brackets">)</span>, <span class="php-string">'random'</span><span class="php-brackets">)</span>;
<span class="php-script-tag">?&gt;<span class="html"></span></span></span></pre>
</div>
<h2>Make White Background Transparent</h2>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
</pre>
<pre><span class="php"><span class="php-script-tag">&lt;?php</span>

<span class="php-function">function</span> transparentImage<span class="php-brackets">(</span><span class="php-var">$src</span><span class="php-brackets">)</span><span class="php-brackets">{</span>  <span class="php-comment">//making images with white bg transparent
</span>
<span class="php-var">$r1</span><span class="php-operator">=</span><span class="php-number">8</span><span class="php-number">0</span>;
<span class="php-var">$g1</span><span class="php-operator">=</span><span class="php-number">8</span><span class="php-number">0</span>;
<span class="php-var">$b1</span><span class="php-operator">=</span><span class="php-number">8</span><span class="php-number">0</span>;
<span class="php-keyword">for</span><span class="php-brackets">(</span><span class="php-var">$x</span> <span class="php-operator">=</span> <span class="php-number">0</span>; <span class="php-var">$x</span> <span class="php-operator">&lt;</span> <span class="php-function">imagesx</span><span class="php-brackets">(</span><span class="php-var">$src</span><span class="php-brackets">)</span>; <span class="php-operator">+</span><span class="php-operator">+</span><span class="php-var">$x</span><span class="php-brackets">)</span>
        <span class="php-brackets">{</span>
            <span class="php-keyword">for</span><span class="php-brackets">(</span><span class="php-var">$y</span> <span class="php-operator">=</span> <span class="php-number">0</span>; <span class="php-var">$y</span> <span class="php-operator">&lt;</span> <span class="php-function">imagesy</span><span class="php-brackets">(</span><span class="php-var">$src</span><span class="php-brackets">)</span>; <span class="php-operator">+</span><span class="php-operator">+</span><span class="php-var">$y</span><span class="php-brackets">)</span>
            <span class="php-brackets">{</span>
                <span class="php-var">$color</span><span class="php-operator">=</span><span class="php-function">imagecolorat</span><span class="php-brackets">(</span><span class="php-var">$src</span>, <span class="php-var">$x</span>, <span class="php-var">$y</span><span class="php-brackets">)</span>;
                <span class="php-var">$r</span> <span class="php-operator">=</span> <span class="php-brackets">(</span><span class="php-var">$color</span> <span class="php-operator">&gt;</span><span class="php-operator">&gt;</span> <span class="php-number">1</span><span class="php-number">6</span><span class="php-brackets">)</span> <span class="php-operator">&amp;</span> <span class="php-number">0</span>xFF;
                <span class="php-var">$g</span> <span class="php-operator">=</span> <span class="php-brackets">(</span><span class="php-var">$color</span> <span class="php-operator">&gt;</span><span class="php-operator">&gt;</span> <span class="php-number">8</span><span class="php-brackets">)</span> <span class="php-operator">&amp;</span> <span class="php-number">0</span>xFF;
                <span class="php-var">$b</span> <span class="php-operator">=</span> <span class="php-var">$color</span> <span class="php-operator">&amp;</span> <span class="php-number">0</span>xFF;
                <span class="php-keyword">for</span><span class="php-brackets">(</span><span class="php-var">$i</span><span class="php-operator">=</span><span class="php-number">0</span>;<span class="php-var">$i</span><span class="php-operator">&lt;</span><span class="php-number">2</span><span class="php-number">7</span><span class="php-number">0</span>;<span class="php-var">$i</span><span class="php-operator">+</span><span class="php-operator">+</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
                    <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$r</span><span class="php-operator">.</span><span class="php-var">$g</span><span class="php-operator">.</span><span class="php-var">$b</span><span class="php-operator">=</span><span class="php-operator">=</span><span class="php-brackets">(</span><span class="php-var">$r1</span><span class="php-operator">+</span><span class="php-var">$i</span><span class="php-brackets">)</span><span class="php-operator">.</span><span class="php-brackets">(</span><span class="php-var">$g1</span><span class="php-operator">+</span><span class="php-var">$i</span><span class="php-brackets">)</span><span class="php-operator">.</span><span class="php-brackets">(</span><span class="php-var">$b1</span><span class="php-operator">+</span><span class="php-var">$i</span><span class="php-brackets">)</span><span class="php-brackets">)</span><span class="php-brackets">{</span>
                        <span class="php-var">$trans_colour</span> <span class="php-operator">=</span> <span class="php-function">imagecolorallocatealpha</span><span class="php-brackets">(</span><span class="php-var">$src</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-number">1</span><span class="php-number">2</span><span class="php-number">7</span><span class="php-brackets">)</span>;
                        <span class="php-function">imagefill</span><span class="php-brackets">(</span><span class="php-var">$src</span>, <span class="php-var">$x</span>, <span class="php-var">$y</span>, <span class="php-var">$trans_colour</span><span class="php-brackets">)</span>;
                    <span class="php-brackets">}</span>
                <span class="php-brackets">}</span>
            <span class="php-brackets">}</span>
        <span class="php-brackets">}</span>

        <span class="php-keyword">return</span> <span class="php-var">$src</span>;
<span class="php-brackets">}</span>

<span class="php-var">$image</span><span class="php-operator">=</span><span class="php-string">'abc/abc.jpg'</span>;
<span class="php-var">$src</span> <span class="php-operator">=</span> <span class="php-function">imagecreatefromjpeg</span><span class="php-brackets">(</span><span class="php-var">$image</span><span class="php-brackets">)</span>;
<span class="php-var">$src</span><span class="php-operator">=</span>transparentImage<span class="php-brackets">(</span><span class="php-var">$src</span><span class="php-brackets">)</span>; <span class="php-comment">//Lets make the jpegs transparent
</span>

<span class="php-script-tag">?&gt;<span class="html"></span></span></span></pre>
</div>
<h2>Crop Blank Edges From Image</h2>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
</pre>
<pre><span class="php"><span class="php-script-tag">&lt;?php</span>
<span class="php-comment">/**
* $image image cursor (from imagecreatetruecolor)
* $backgound image curosr (from imagecolorallocate)
* $paddng int
*/</span>
<span class="php-function">function</span> imageCrop<span class="php-brackets">(</span><span class="php-var">$image</span>, <span class="php-var">$background</span> <span class="php-operator">=</span> <span class="php-keyword">false</span>, <span class="php-var">$padding</span> <span class="php-operator">=</span> <span class="php-number">0</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
    <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$background</span><span class="php-brackets">)</span>
      <span class="php-var">$background</span> <span class="php-operator">=</span> <span class="php-function">imagecolorallocate</span><span class="php-brackets">(</span><span class="php-var">$image</span>, <span class="php-number">2</span><span class="php-number">5</span><span class="php-number">5</span>, <span class="php-number">2</span><span class="php-number">5</span><span class="php-number">5</span>, <span class="php-number">2</span><span class="php-number">5</span><span class="php-number">5</span><span class="php-brackets">)</span>; 

    <span class="php-var">$top</span> <span class="php-operator">=</span> imageSY<span class="php-brackets">(</span><span class="php-var">$image</span><span class="php-brackets">)</span>;
    <span class="php-var">$left</span> <span class="php-operator">=</span> imageSX<span class="php-brackets">(</span><span class="php-var">$image</span><span class="php-brackets">)</span>;
    <span class="php-var">$bottom</span> <span class="php-operator">=</span> <span class="php-number">0</span>;
    <span class="php-var">$right</span> <span class="php-operator">=</span> <span class="php-number">0</span>; 

    <span class="php-keyword">for</span> <span class="php-brackets">(</span><span class="php-var">$x</span> <span class="php-operator">=</span> <span class="php-number">0</span> ; <span class="php-var">$x</span> <span class="php-operator">&lt;</span> <span class="php-function">imagesx</span><span class="php-brackets">(</span><span class="php-var">$image</span><span class="php-brackets">)</span> ; <span class="php-var">$x</span><span class="php-operator">+</span><span class="php-operator">+</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
        <span class="php-keyword">for</span> <span class="php-brackets">(</span><span class="php-var">$y</span> <span class="php-operator">=</span> <span class="php-number">0</span> ; <span class="php-var">$y</span> <span class="php-operator">&lt;</span> <span class="php-function">imagesy</span><span class="php-brackets">(</span><span class="php-var">$image</span><span class="php-brackets">)</span> ; <span class="php-var">$y</span><span class="php-operator">+</span><span class="php-operator">+</span><span class="php-brackets">)</span> <span class="php-brackets">{</span> 

          <span class="php-comment">// if there match
</span>
            <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-function">imagecolorat</span><span class="php-brackets">(</span><span class="php-var">$image</span>, <span class="php-var">$x</span>, <span class="php-var">$y</span><span class="php-brackets">)</span> <span class="php-operator">!</span><span class="php-operator">=</span> <span class="php-var">$background</span><span class="php-brackets">)</span> <span class="php-brackets">{</span> 

              <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$x</span> <span class="php-operator">&lt;</span> <span class="php-var">$left</span><span class="php-brackets">)</span>
                <span class="php-var">$left</span> <span class="php-operator">=</span> <span class="php-var">$x</span>;
              <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$x</span> <span class="php-operator">&gt;</span> <span class="php-var">$right</span><span class="php-brackets">)</span>
                <span class="php-var">$right</span> <span class="php-operator">=</span> <span class="php-var">$x</span>;
              <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$y</span> <span class="php-operator">&gt;</span> <span class="php-var">$bottom</span><span class="php-brackets">)</span>
                <span class="php-var">$bottom</span> <span class="php-operator">=</span> <span class="php-var">$y</span>;
              <span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-var">$y</span> <span class="php-operator">&lt;</span> <span class="php-var">$top</span><span class="php-brackets">)</span>
                <span class="php-var">$top</span> <span class="php-operator">=</span> <span class="php-var">$y</span>;
        <span class="php-brackets">}</span>
        <span class="php-brackets">}</span>
    <span class="php-brackets">}</span> 

    <span class="php-var">$right</span><span class="php-operator">+</span><span class="php-operator">+</span>;
    <span class="php-var">$bottom</span><span class="php-operator">+</span><span class="php-operator">+</span>; 

    <span class="php-comment">// create new image with padding
</span>
    <span class="php-var">$img</span> <span class="php-operator">=</span> <span class="php-function">imagecreatetruecolor</span><span class="php-brackets">(</span><span class="php-var">$right</span><span class="php-operator">-</span><span class="php-var">$left</span><span class="php-operator">+</span><span class="php-var">$padding</span><span class="php-operator">*</span><span class="php-number">2</span>,<span class="php-var">$bottom</span><span class="php-operator">-</span><span class="php-var">$top</span><span class="php-operator">+</span><span class="php-var">$padding</span><span class="php-operator">*</span><span class="php-number">2</span><span class="php-brackets">)</span>;
    <span class="php-comment">// fill the background
</span>
    <span class="php-function">imagefill</span><span class="php-brackets">(</span><span class="php-var">$img</span>, <span class="php-number">0</span>, <span class="php-number">0</span>, <span class="php-var">$background</span><span class="php-brackets">)</span>;
    <span class="php-comment">// copy
</span>
    <span class="php-function">imagecopy</span><span class="php-brackets">(</span><span class="php-var">$img</span>, <span class="php-var">$image</span>, <span class="php-var">$padding</span>, <span class="php-var">$padding</span>, <span class="php-var">$left</span>, <span class="php-var">$top</span>, <span class="php-var">$right</span><span class="php-operator">-</span><span class="php-var">$left</span>, <span class="php-var">$bottom</span><span class="php-operator">-</span><span class="php-var">$top</span><span class="php-brackets">)</span>; 

    <span class="php-comment">// destroy old image cursor
</span>
    <span class="php-function">imagedestroy</span><span class="php-brackets">(</span><span class="php-var">$image</span><span class="php-brackets">)</span>;
    <span class="php-keyword">return</span> <span class="php-var">$img</span>;
<span class="php-brackets">}</span>
<span class="php-script-tag">?&gt;<span class="html"></span></span></span></pre>
</div>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Advanced+Image+Functions+using+PHP&amp;link=http://www.priteshgupta.com/2011/09/advanced-image-functions-using-php/&amp;notes=Here%20are%20some%20PHP%20Functions%20for%20Images%20which%20I%20came%20across%20recently%2C%20these%20come%20under%20GD%20and%20Image%20Functions%20and%20require%20GD%20library.%20I%20have%20taken%20most%20of%20these%20from%20PHP%20Manual%20and%20they%20are%20quite%20helpful.%0D%0ASharpening%20All%20Images%0D%0A%7Bcode%20type%3Dphp%7D%0D%0A%20%20%20%20function%20imagesharpen%28%20%24image%29%20%7B%0D%0A%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%24ma&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Advanced+Image+Functions+using+PHP&amp;link=http://www.priteshgupta.com/2011/09/advanced-image-functions-using-php/&amp;notes=Here%20are%20some%20PHP%20Functions%20for%20Images%20which%20I%20came%20across%20recently%2C%20these%20come%20under%20GD%20and%20Image%20Functions%20and%20require%20GD%20library.%20I%20have%20taken%20most%20of%20these%20from%20PHP%20Manual%20and%20they%20are%20quite%20helpful.%0D%0ASharpening%20All%20Images%0D%0A%7Bcode%20type%3Dphp%7D%0D%0A%20%20%20%20function%20imagesharpen%28%20%24image%29%20%7B%0D%0A%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%24ma&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Advanced+Image+Functions+using+PHP&amp;link=http://www.priteshgupta.com/2011/09/advanced-image-functions-using-php/&amp;notes=Here%20are%20some%20PHP%20Functions%20for%20Images%20which%20I%20came%20across%20recently%2C%20these%20come%20under%20GD%20and%20Image%20Functions%20and%20require%20GD%20library.%20I%20have%20taken%20most%20of%20these%20from%20PHP%20Manual%20and%20they%20are%20quite%20helpful.%0D%0ASharpening%20All%20Images%0D%0A%7Bcode%20type%3Dphp%7D%0D%0A%20%20%20%20function%20imagesharpen%28%20%24image%29%20%7B%0D%0A%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%24ma&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Advanced+Image+Functions+using+PHP&amp;link=http://www.priteshgupta.com/2011/09/advanced-image-functions-using-php/&amp;notes=Here%20are%20some%20PHP%20Functions%20for%20Images%20which%20I%20came%20across%20recently%2C%20these%20come%20under%20GD%20and%20Image%20Functions%20and%20require%20GD%20library.%20I%20have%20taken%20most%20of%20these%20from%20PHP%20Manual%20and%20they%20are%20quite%20helpful.%0D%0ASharpening%20All%20Images%0D%0A%7Bcode%20type%3Dphp%7D%0D%0A%20%20%20%20function%20imagesharpen%28%20%24image%29%20%7B%0D%0A%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%24ma&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Advanced+Image+Functions+using+PHP&amp;link=http://www.priteshgupta.com/2011/09/advanced-image-functions-using-php/&amp;notes=Here%20are%20some%20PHP%20Functions%20for%20Images%20which%20I%20came%20across%20recently%2C%20these%20come%20under%20GD%20and%20Image%20Functions%20and%20require%20GD%20library.%20I%20have%20taken%20most%20of%20these%20from%20PHP%20Manual%20and%20they%20are%20quite%20helpful.%0D%0ASharpening%20All%20Images%0D%0A%7Bcode%20type%3Dphp%7D%0D%0A%20%20%20%20function%20imagesharpen%28%20%24image%29%20%7B%0D%0A%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%24ma&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.priteshgupta.com/2011/09/advanced-image-functions-using-php/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Advanced+Image+Functions+using+PHP&amp;link=http://www.priteshgupta.com/2011/09/advanced-image-functions-using-php/&amp;notes=Here%20are%20some%20PHP%20Functions%20for%20Images%20which%20I%20came%20across%20recently%2C%20these%20come%20under%20GD%20and%20Image%20Functions%20and%20require%20GD%20library.%20I%20have%20taken%20most%20of%20these%20from%20PHP%20Manual%20and%20they%20are%20quite%20helpful.%0D%0ASharpening%20All%20Images%0D%0A%7Bcode%20type%3Dphp%7D%0D%0A%20%20%20%20function%20imagesharpen%28%20%24image%29%20%7B%0D%0A%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%24ma&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Advanced+Image+Functions+using+PHP&amp;link=http://www.priteshgupta.com/2011/09/advanced-image-functions-using-php/&amp;notes=Here%20are%20some%20PHP%20Functions%20for%20Images%20which%20I%20came%20across%20recently%2C%20these%20come%20under%20GD%20and%20Image%20Functions%20and%20require%20GD%20library.%20I%20have%20taken%20most%20of%20these%20from%20PHP%20Manual%20and%20they%20are%20quite%20helpful.%0D%0ASharpening%20All%20Images%0D%0A%7Bcode%20type%3Dphp%7D%0D%0A%20%20%20%20function%20imagesharpen%28%20%24image%29%20%7B%0D%0A%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%24ma&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.shareaholic.com/api/share/?title=Advanced+Image+Functions+using+PHP&amp;link=http://www.priteshgupta.com/2011/09/advanced-image-functions-using-php/&amp;notes=Here%20are%20some%20PHP%20Functions%20for%20Images%20which%20I%20came%20across%20recently%2C%20these%20come%20under%20GD%20and%20Image%20Functions%20and%20require%20GD%20library.%20I%20have%20taken%20most%20of%20these%20from%20PHP%20Manual%20and%20they%20are%20quite%20helpful.%0D%0ASharpening%20All%20Images%0D%0A%7Bcode%20type%3Dphp%7D%0D%0A%20%20%20%20function%20imagesharpen%28%20%24image%29%20%7B%0D%0A%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%24ma&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=43&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.priteshgupta.com/2011/09/advanced-image-functions-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>110 Best CSS3 Tutorials and Examples</title>
		<link>http://www.priteshgupta.com/2011/09/110-best-css3-tutorials-and-examples/</link>
		<comments>http://www.priteshgupta.com/2011/09/110-best-css3-tutorials-and-examples/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 05:55:27 +0000</pubDate>
		<dc:creator>Pritesh Gupta</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design and Development]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Typography]]></category>

		<guid isPermaLink="false">http://www.priteshgupta.com/?p=1522</guid>
		<description><![CDATA[I have been publishing articles about CSS3 for a while now. CSS3 opens the door for a lot of unique techniques for websites, that is why CSS3 has acquired an important place in web design. Earlier web designers were forced to use Photoshop for various things like gradient, shadows, etc, and jQuery/JavaScript for simple animations. [...]]]></description>
			<content:encoded><![CDATA[<p>I have been publishing articles about <strong>CSS3</strong> for a while now. CSS3 opens the door for a lot of unique techniques for websites, that is why CSS3 has acquired an important place in web design. Earlier web designers were forced to use Photoshop for various things like <strong>gradient</strong>, <strong>shadows</strong>, etc, and jQuery/JavaScript for simple animations. There was no method to implement these functionalities using CSS. But then CSS3 came with its fantastic features. In this article, I have collected a huge list of the best CSS3 <strong>examples</strong> and <strong>tutorials</strong> on the Internet. For <strong>CSS Tools</strong>, check out <a href="http://www.priteshgupta.com/2011/08/best-online-css-tools-resources/" title="45 Best Online CSS Tools and Resources" target="_blank">this</a>.</p>
<div class="shortcode-unorderedlist arrow"></p>
<ul>
<li>
<h4><a href="http://24ways.org/2009/css-animations" target="_blank">24 ways: CSS Animations</a></h4>
</li>
<li>
<h4><a href="http://addyosmani.com/blog/wanderwall/" target="_blank">WanderWall – A jQuery, CSS3 &#038; HTML5 Hover-Based Interface</a></h4>
</li>
<li>
<h4><a href="http://ajaxian.com/archives/more-on-3d-css-transforms" target="_blank">More on 3D CSS Transforms</a></h4>
</li>
<li>
<h4><a href="http://bbxdesign.com/2010/03/24/tutoriel-formulaire-css3-sans-image-sans-javascript/" target="_blank">CSS3 Form</a></h4>
</li>
<li>
<h4><a href="http://blog.anomalyinnovations.com/2010/03/creating-a-realistic-looking-button-with-css3/" target="_blank">Creating a Realistic Looking Button with CSS3</a></h4>
</li>
<li>
<h4><a href="http://blog.gesteves.com/post/261593774/im-done-star-wars-opening-crawl-using-only-html" target="_blank">Star Wars opening crawl</a></h4>
</li>
<li>
<h4><a href="http://blog.insicdesigns.com/2010/02/create-a-slick-menu-using-css3/" target="_blank">Create a Slick Menu using CSS3</a></h4>
</li>
<li>
<h4><a href="http://boxtuffs.com/files/Album-Selection/slice-album-selection/" target="_blank">Album Selection &#8211; Boxtuffs</a></h4>
</li>
<li>
<h4><a href="http://boxtuffs.com/files/Download-Me!/slice-download-me/" target="_blank">Pure CSS3 Download Button &#8211; Boxtuffs</a></h4>
</li>
<li>
<h4><a href="http://boxtuffs.com/files/My-Notes/slice-my-notes/" target="_blank">My Notes &#8211; Boxtuffs</a></h4>
</li>
<li>
<h4><a href="http://boxtuffs.com/files/Switch-on-off-boxtuffs.com/Switch-on-off-boxtuffs.com/" target="_blank">CSS3 &#038; jQuery Switcher &#8211; Boxtuffs</a></h4>
</li>
<li>
<h4><a href="http://boxtuffs.com/files/tickets-boxtuffs.com/tickets-boxtuffs.com/" target="_blank">Tickets &#8211; Boxtuffs</a></h4>
</li>
<li>
<h4><a href="http://coding.smashingmagazine.com/2011/05/17/an-introduction-to-css3-keyframe-animations/" target="_blank">An Introduction To CSS3 Keyframe Animations</a></h4>
</li>
<li>
<h4><a href="http://cordobo.com/1630-internet-explorer-pure-css-logo/" target="_blank">Internet Explorer Pure CSS Logo</a></h4>
</li>
<li>
<h4><a href="http://cssglobe.com/post/9641/drawing-calendar-icon-with-css3" target="_blank">Drawing Calendar Icon With CSS3</a></h4>
</li>
<li>
<h4><a href="http://css-plus.com/2010/04/create-a-speech-bubble-tooltip-using-css3-and-jquery/" target="_blank">Create a Speech-Bubble Tooltip using CSS3 and jQuery</a></h4>
</li>
<li>
<h4><a href="http://css-plus.com/2010/04/create-a-yoyo-with-jquery-and-css3/" target="_blank">Create a Yoyo with jQuery and CSS3</a></h4>
</li>
<li>
<h4><a href="http://css-tricks.com/1399-css3-clock/" target="_blank">Old School Clock with CSS3 and jQuery</a></h4>
</li>
<li>
<h4><a href="http://css-tricks.com/7079-slide-to-unlock/" target="_blank">iPhone “slide to unlock” Text in WebKit/CSS3</a></h4>
</li>
<li>
<h4><a href="http://css-tricks.com/8518-css3-progress-bars/" target="_blank">CSS3 Progress Bars</a></h4>
</li>
<li>
<h4><a href="http://css-tricks.com/13815-pop-from-top-notification/" target="_blank">Pop From Top Notification</a></h4>
</li>
<li>
<h4><a href="http://css-tricks.com/13641-sideways-headers/" target="_blank">Sideways Headers</a></h4>
</li>
<li>
<h4><a href="http://css-tricks.com/13758-functional-css-tabs-revisited/" target="_blank">Functional CSS Tabs Revisited</a></h4>
</li>
<li>
<h4><a href="http://designindevelopment.com/css/apple-navigation-with-css3/" target="_blank">Apple Navigation with CSS3</a></h4>
</li>
<li>
<h4><a href="http://designlovr.com/use-css3-to-create-a-dynamic-stack-of-index-cards/" target="_blank">Use CSS3 to Create a Dynamic Stack of Index Cards</a></h4>
</li>
<li>
<h4><a href="http://designshack.co.uk/articles/css/create-a-color-changing-website-using-css3" target="_blank">Create a Color Changing Website Using CSS3</a></h4>
</li>
<li>
<h4><a href="http://designshack.co.uk/articles/css/creating-a-fun-animated-navigation-menu-with-pure-css" target="_blank">Create a Fun Animated Navigation Menu With Pure CSS</a></h4>
</li>
<li>
<h4><a href="http://designshack.co.uk/articles/css/mastering-css-reflections-in-webkit/" target="_blank">Mastering CSS Reflections in Webkit</a></h4>
</li>
<li>
<h4><a href="http://designshack.co.uk/articles/css/creating-an-apple-style-input-field-with-display-labels/" target="_blank">Creating an Apple-Style Input Field With Display Labels</a></h4>
</li>
<li>
<h4><a href="http://designwoop.com/2011/04/create-a-clean-and-stylish-login-form-with-html5-and-css3/" target="_blank">Create a Clean and Stylish Login Form With HTML5 and CSS3</a></h4>
</li>
<li>
<h4><a href="http://dinolatoga.com/2009/09/18/amazing-imag-hover-effects-with-webkit-and-css/" target="_blank">Amazing Image Hover Effects with Webkit and CSS 3</a></h4>
</li>
<li>
<h4><a href="http://dl.dropbox.com/u/921159/Keyboard/page.html" target="_blank">CSS3 Keyboard</a></h4>
</li>
<li>
<h4><a href="http://gazpo.com/2011/02/form/" target="_blank">Clean and Stylish CSS3 Form</a></h4>
</li>
<li>
<h4><a href="http://harvesthq.github.com/chosen/" target="_blank">Chosen</a></h4>
</li>
<li>
<h4><a href="http://kaylarose.github.com/Glowform/" target="_blank">Glowform</a></h4>
</li>
<li>
<h4><a href="http://lab.4muladesign.com/dribbble/" target="_blank">AN HTML5 INTERACTIVE INFOGRAPHIC</a></h4>
</li>
<li>
<h4><a href="http://lab.simurai.com/css/buttons/" target="_blank">Sweet CSS3 Buttons</a></h4>
</li>
<li>
<h4><a href="http://lab.simurai.com/css/toggle/" target="_blank">CSS3 toggle-button</a></h4>
</li>
<li>
<h4><a href="http://lab.simurai.com/ui/zen-player/" target="_blank">ZEN &#8211; HTML5 Audio Player</a></h4>
</li>
<li>
<h4><a href="http://lab.simurai.com/css/metal/" target="_blank">CSS3 Brushed-Metal Buttons</a></h4>
</li>
<li>
<h4><a href="http://legendthemes.com/2010/04/10/designing-modern-web-forms-with-html-5-and-css3/" target="_blank">Designing Modern Web Forms with HTML 5 and CSS3</a></h4>
</li>
<li>
<h4><a href="http://line25.com/tutorials/create-a-stylish-contact-form-with-html5-css3" target="_blank">Create a Stylish Contact Form with HTML5 &#038; CSS3</a></h4>
</li>
<li>
<h4><a href="http://littlerobothead.com/css-sliders/" target="_blank">CSS3 Sliders</a></h4>
</li>
<li>
<h4><a href="http://lukesbeard.com/scratch/flipclocklook/" target="_blank">CSS3 Flip Clock Look</a></h4>
</li>
<li>
<h4><a href="http://madpandaproductions.com/attic/html5/premiumpixels/coming-soon/" target="_blank">Coming Soon</a></h4>
</li>
<li>
<h4><a href="http://ndesign-studio.com/blog/css-dock-menu" target="_blank">CSS Dock Menu</a></h4>
</li>
<li>
<h4><a href="http://net.tutsplus.com/tutorials/html-css-techniques/build-a-kickbutt-css-only-3d-slideshow/" target="_blank">Build a Kickbutt CSS-Only 3D Slideshow</a></h4>
</li>
<li>
<h4><a href="http://net.tutsplus.com/tutorials/html-css-techniques/design-a-prettier-web-form-with-css-3/" target="_blank">Design a Prettier Web Form with CSS 3</a></h4>
</li>
<li>
<h4><a href="http://net.tutsplus.com/tutorials/html-css-techniques/how-to-build-cross-browser-html5-forms/" target="_blank">How to Build Cross-Browser HTML5 Forms</a></h4>
</li>
<li>
<h4><a href="http://nicolasgallagher.com/pure-css-gui-icons/" target="_blank">Pure CSS GUI icons</a></h4>
</li>
<li>
<h4><a href="http://paulbakaus.com/lab/js/coverflow/" target="_blank">Coverflow featuring CSS transformations</a></h4>
</li>
<li>
<h4><a href="http://pushingpixels.at/experiments/dynamic_shadow/" target="_blank">Dynamic PNG shadow position</a></h4>
</li>
<li>
<h4><a href="http://spyrestudios.com/how-to-create-a-sexy-vertical-sliding-panel-using-jquery-and-css3/" target="_blank">How To Create A Sexy Vertical Sliding Panel Using jQuery And CSS3</a></h4>
</li>
<li>
<h4><a href="http://stiern.com/tutorials/create-a-cool-messy-list-with-css3-and-nth-child/" target="_blank">Create a Cool Messy List with CSS3 and nth-child</a></h4>
</li>
<li>
<h4><a href="http://thinkvitamin.com/code/fun-with-html5-forms/" target="_blank">Fun with HTML5 Forms</a></h4>
</li>
<li>
<h4><a href="http://tutorialzine.com/2009/12/colorful-clock-jquery-css/" target="_blank">A Colorful Clock With CSS &#038; jQuery</a></h4>
</li>
<li>
<h4><a href="http://tutorialzine.com/2010/01/halftone-navigation-menu-jquery-css/" target="_blank">Halftone Navigation Menu With jQuery &#038; CSS3</a></h4>
</li>
<li>
<h4><a href="http://tutorialzine.com/2010/03/colorful-sliders-jquery-css3/" target="_blank">Colorful Sliders With jQuery &#038; CSS3</a></h4>
</li>
<li>
<h4><a href="http://tutorialzine.com/2010/04/carbon-signup-form/" target="_blank">Carbon Fiber Signup Form With PHP, jQuery and CSS3</a></h4>
</li>
<li>
<h4><a href="http://tutorialzine.com/2010/04/slideout-context-tips-jquery-css3/" target="_blank">Contextual Slideout Tips With jQuery &#038; CSS3</a></h4>
</li>
<li>
<h4><a href="http://tutorialzine.com/2010/06/css3-minimalistic-navigation-menu/" target="_blank">CSS3 Minimalistic Navigation Menu</a></h4>
</li>
<li>
<h4><a href="http://tutorialzine.com/2010/08/animated-404-not-found-page-css-jquery/" target="_blank">Creating an Animated 404 Page</a></h4>
</li>
<li>
<h4><a href="http://tutorialzine.com/2010/10/css3-animated-bubble-buttons/" target="_blank">CSS3 Animated Bubble Buttons</a></h4>
</li>
<li>
<h4><a href="http://tutorialzine.com/2010/11/better-select-jquery-css3/" target="_blank">Making Better Select Elements with jQuery and CSS3</a></h4>
</li>
<li>
<h4><a href="http://tutorialzine.com/2011/03/better-check-boxes-jquery-css/" target="_blank">Better Check Boxes with jQuery and CSS</a></h4>
</li>
<li>
<h4><a href="http://tutorialzine.com/2011/05/css3-animated-navigation-menu/" target="_blank">Making a CSS3 Animated Menu</a></h4>
</li>
<li>
<h4><a href="http://tutorialzine.com/2011/07/spinning-newspaper-effect-css3/" target="_blank">Having Fun With CSS3: Spinning Newspapers</a></h4>
</li>
<li>
<h4><a href="http://tympanus.net/codrops/2009/11/30/beautiful-slide-out-navigation-a-css-and-jquery-tutorial/" target="_blank">Beautiful Slide Out Navigation: A CSS and jQuery Tutorial</a></h4>
</li>
<li>
<h4><a href="http://tympanus.net/codrops/2009/12/11/fixed-fade-out-menu-a-css-and-jquery-tutorial/" target="_blank">Fixed Fade Out Menu: A CSS and jQuery Tutorial</a></h4>
</li>
<li>
<h4><a href="http://tympanus.net/codrops/2010/01/17/css-and-jquery-tutorial-fancy-apple-style-icon-slide-out-navigation/" target="_blank">CSS and jQuery Tutorial: Fancy Apple-Style Icon Slide Out Navigation</a></h4>
</li>
<li>
<h4><a href="http://tympanus.net/codrops/2010/03/09/a-fresh-bottom-slide-out-menu-with-jquery/" target="_blank">A Fresh Bottom Slide Out Menu with jQuery</a></h4>
</li>
<li>
<h4><a href="http://tympanus.net/codrops/2010/04/28/pretty-simple-content-slider-with-jquery-and-css3/" target="_blank">Pretty Simple Content Slider with jQuery and CSS3</a></h4>
</li>
<li>
<h4><a href="http://tympanus.net/codrops/2010/06/28/awesome-cufonized-fly-out-menu/" target="_blank">Awesome Cufonized Fly-out Menu with jQuery and CSS3</a></h4>
</li>
<li>
<h4><a href="http://tympanus.net/codrops/2010/07/16/slide-down-box-menu/" target="_blank">Slide Down Box Menu with jQuery and CSS3</a></h4>
</li>
<li>
<h4><a href="http://tympanus.net/codrops/2010/07/21/related-posts-slide-out-boxes/" target="_blank">Related Posts Slide Out Boxes with jQuery and CSS3</a></h4>
</li>
<li>
<h4><a href="http://tympanus.net/codrops/2010/09/08/full-page-image-gallery/" target="_blank">Full Page Image Gallery with jQuery</a></h4>
</li>
<li>
<h4><a href="http://webexpedition18.com/articles/how-to-create-a-multi-step-signup-form-with-css3-and-jquery/" target="_blank">How to Create A Multi-Step Signup Form With CSS3 and jQuery</a></h4>
</li>
<li>
<h4><a href="http://www.accidentalhacker.com/sticky-notes-with-css3/" target="_blank">Sticky Notes with CSS3</a></h4>
</li>
<li>
<h4><a href="http://www.addyosmani.com/resources/formbox/release2/" target="_blank">FormBox</a></h4>
</li>
<li>
<h4><a href="http://www.admixweb.com/2010/05/27/experiment-realistic-ipod-with-css3/" target="_blank">Experiment: Realistic Ipod with CSS3</a></h4>
</li>
<li>
<h4><a href="http://www.bradshawenterprises.com/blog/2010/fancy-forms-html5-css3-js/" target="_blank">Fancy Forms: HTML5 + CSS3 – JS</a></h4>
</li>
<li>
<h4><a href="http://www.catswhocode.com/blog/how-to-create-a-kick-ass-css3-progress-bar" target="_blank">How to create a kick-ass CSS3 progress bar</a></h4>
</li>
<li>
<h4><a href="http://www.deluxeblogtips.com/2010/04/accordion-menu-css3-transition.html" target="_blank">Create Accordion Menu Using CSS3 Transition</a></h4>
</li>
<li>
<h4><a href="http://www.deluxeblogtips.com/2010/05/image-slider-pure-css3.html" target="_blank">Howto Create An Image Slider With Pure CSS3</a></h4>
</li>
<li>
<h4><a href="http://www.impressivewebs.com/css3-glow-tabs/" target="_blank">CSS3 Glow Tabs</a></h4>
</li>
<li>
<h4><a href="http://www.jankoatwarpspeed.com/post/2010/04/06/windows-7-start-menu-css3.aspx" target="_blank">Create Windows 7 start menu using CSS3 only</a></h4>
</li>
<li>
<h4><a href="http://www.kriesi.at/archives/apple-menu-improved-with-jquery" target="_blank">Create an apple style menu and improve it via jQuery</a></h4>
</li>
<li>
<h4><a href="http://www.marcofolio.net/css/3d_animation_using_pure_css3.html" target="_blank">3d animation using pure CSS3</a></h4>
</li>
<li>
<h4><a href="http://www.marcofolio.net/css/animated_wicked_css3_3d_bar_chart.html" target="_blank">Animated wicked CSS3 3d bar chart</a></h4>
</li>
<li>
<h4><a href="http://www.marcofolio.net/css/display_social_icons_in_a_beautiful_way_using_css3.html" target="_blank">Display social icons in a beautiful way using CSS3</a></h4>
</li>
<li>
<h4><a href="http://www.marcofolio.net/css/wicked_css3_3d_bar_chart.html" target="_blank">Wicked CSS3 3d bar chart</a></h4>
</li>
<li>
<h4><a href="http://www.marcofolio.net/webdesign/jquery_quickie_colourful_rating_system_with_css3.html" target="_blank">jQuery quickie: Colourful rating system with CSS3</a></h4>
</li>
<li>
<h4><a href="http://www.marcofolio.net/webdesign/pure_css3_bokeh_effect_with_some_jquery_help.html" target="_blank">Pure CSS3 bokeh effect with some jQuery help</a></h4>
</li>
<li>
<h4><a href="http://www.midwinter-dg.com/blog_demos/css-text-shadows/" target="_blank">CSS text-shadow examples</a></h4>
</li>
<li>
<h4><a href="http://www.paulrhayes.com/2009-03/an-analogue-clock-using-only-css/" target="_blank">An analogue clock using only CSS</a></h4>
</li>
<li>
<h4><a href="http://www.paulrhayes.com/2009-07/animated-css3-cube-interface-using-3d-transforms/" target="_blank">Animated CSS3 cube using 3D transforms</a></h4>
</li>
<li>
<h4><a href="http://www.romancortes.com/blog/pure-css3-page-flip-effect/" target="_blank">Pure CSS3 Page Flip Effect</a></h4>
</li>
<li>
<h4><a href="http://www.tangledindesign.com/blog/how-to-create-a-contact-form-using-html5-css3-and-php/" target="_blank">How to Create a Contact Form using HTML5, CSS3 and PHP</a></h4>
</li>
<li>
<h4><a href="http://www.tbakdesigns.com/playground/demo/cssloading2.php" target="_blank">Css3 circular rotate loading effect(No images)</a></h4>
</li>
<li>
<h4><a href="http://www.thecssninja.com/css/accordian-effect-using-css" target="_blank">Create the accordion effect using CSS3</a></h4>
</li>
<li>
<h4><a href="http://www.tobypitman.com/pure-css-sliding-image-gallery/" target="_blank">Pure CSS Sliding Image Gallery</a></h4>
</li>
<li>
<h4><a href="http://www.vooshthemes.com/blog/design-tutorial/create-a-clean-and-stylish-css3-contact-form/" target="_blank">Create A Clean and Stylish CSS3 Contact Form</a></h4>
</li>
<li>
<h4><a href="http://www.w3avenue.com/2010/04/05/cross-browser-pure-css3-horizontal-accordion/" target="_blank">Cross Browser Pure CSS3 Horizontal Accordion</a></h4>
</li>
<li>
<h4><a href="http://www.wearepixel8.com/1263/styling-a-simple-form-using-css3/" target="_blank">Styling a simple Form using CSS3</a></h4>
</li>
<li>
<h4><a href="http://www.webstuffshare.com/2010/06/codesnippet-css3-flying-menu/" target="_blank">[CodeSnippet] CSS3 Flying Menu</a></h4>
</li>
<li>
<h4><a href="http://www.zurb.com/article/305/easily-turn-your-images-into-polaroids-wi" target="_blank">Easily Turn Your Images Into Polaroids with CSS3</a></h4>
</li>
<li>
<h4><a href="http://www.zurb.com/playground/awesome-overlays" target="_blank">Awesome Overlays</a></h4>
</li>
<li>
<h4><a href="http://www.zurb.com/playground/css-boxshadow-experiments" target="_blank">CSS Box Shadow &#038; Text Shadow Experiments</a></h4>
</li>
<li>
<h4><a href="http://www.zurb.com/playground/osx-dock" target="_blank">Recreating the OS X Dock</a></h4>
</li>
<li>
<h4><a href="http://www.zurb.com/playground/sliding-vinyl" target="_blank">Sliding Vinyl with CSS3</a></h4>
</li>
</ul>
<p></div>



<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=110+Best+CSS3+Tutorials+and+Examples&amp;link=http://www.priteshgupta.com/2011/09/110-best-css3-tutorials-and-examples/&amp;notes=I%20have%20been%20publishing%20articles%20about%20CSS3%20for%20a%20while%20now.%20CSS3%20opens%20the%20door%20for%20a%20lot%20of%20unique%20techniques%20for%20websites%2C%20that%20is%20why%20CSS3%20has%20acquired%20an%20important%20place%20in%20web%20design.%20Earlier%20web%20designers%20were%20forced%20to%20use%20Photoshop%20for%20various%20things%20like%20gradient%2C%20shadows%2C%20etc%2C%20and%20jQuery%2FJ&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=110+Best+CSS3+Tutorials+and+Examples&amp;link=http://www.priteshgupta.com/2011/09/110-best-css3-tutorials-and-examples/&amp;notes=I%20have%20been%20publishing%20articles%20about%20CSS3%20for%20a%20while%20now.%20CSS3%20opens%20the%20door%20for%20a%20lot%20of%20unique%20techniques%20for%20websites%2C%20that%20is%20why%20CSS3%20has%20acquired%20an%20important%20place%20in%20web%20design.%20Earlier%20web%20designers%20were%20forced%20to%20use%20Photoshop%20for%20various%20things%20like%20gradient%2C%20shadows%2C%20etc%2C%20and%20jQuery%2FJ&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=110+Best+CSS3+Tutorials+and+Examples&amp;link=http://www.priteshgupta.com/2011/09/110-best-css3-tutorials-and-examples/&amp;notes=I%20have%20been%20publishing%20articles%20about%20CSS3%20for%20a%20while%20now.%20CSS3%20opens%20the%20door%20for%20a%20lot%20of%20unique%20techniques%20for%20websites%2C%20that%20is%20why%20CSS3%20has%20acquired%20an%20important%20place%20in%20web%20design.%20Earlier%20web%20designers%20were%20forced%20to%20use%20Photoshop%20for%20various%20things%20like%20gradient%2C%20shadows%2C%20etc%2C%20and%20jQuery%2FJ&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=110+Best+CSS3+Tutorials+and+Examples&amp;link=http://www.priteshgupta.com/2011/09/110-best-css3-tutorials-and-examples/&amp;notes=I%20have%20been%20publishing%20articles%20about%20CSS3%20for%20a%20while%20now.%20CSS3%20opens%20the%20door%20for%20a%20lot%20of%20unique%20techniques%20for%20websites%2C%20that%20is%20why%20CSS3%20has%20acquired%20an%20important%20place%20in%20web%20design.%20Earlier%20web%20designers%20were%20forced%20to%20use%20Photoshop%20for%20various%20things%20like%20gradient%2C%20shadows%2C%20etc%2C%20and%20jQuery%2FJ&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=110+Best+CSS3+Tutorials+and+Examples&amp;link=http://www.priteshgupta.com/2011/09/110-best-css3-tutorials-and-examples/&amp;notes=I%20have%20been%20publishing%20articles%20about%20CSS3%20for%20a%20while%20now.%20CSS3%20opens%20the%20door%20for%20a%20lot%20of%20unique%20techniques%20for%20websites%2C%20that%20is%20why%20CSS3%20has%20acquired%20an%20important%20place%20in%20web%20design.%20Earlier%20web%20designers%20were%20forced%20to%20use%20Photoshop%20for%20various%20things%20like%20gradient%2C%20shadows%2C%20etc%2C%20and%20jQuery%2FJ&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.priteshgupta.com/2011/09/110-best-css3-tutorials-and-examples/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=110+Best+CSS3+Tutorials+and+Examples&amp;link=http://www.priteshgupta.com/2011/09/110-best-css3-tutorials-and-examples/&amp;notes=I%20have%20been%20publishing%20articles%20about%20CSS3%20for%20a%20while%20now.%20CSS3%20opens%20the%20door%20for%20a%20lot%20of%20unique%20techniques%20for%20websites%2C%20that%20is%20why%20CSS3%20has%20acquired%20an%20important%20place%20in%20web%20design.%20Earlier%20web%20designers%20were%20forced%20to%20use%20Photoshop%20for%20various%20things%20like%20gradient%2C%20shadows%2C%20etc%2C%20and%20jQuery%2FJ&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=110+Best+CSS3+Tutorials+and+Examples&amp;link=http://www.priteshgupta.com/2011/09/110-best-css3-tutorials-and-examples/&amp;notes=I%20have%20been%20publishing%20articles%20about%20CSS3%20for%20a%20while%20now.%20CSS3%20opens%20the%20door%20for%20a%20lot%20of%20unique%20techniques%20for%20websites%2C%20that%20is%20why%20CSS3%20has%20acquired%20an%20important%20place%20in%20web%20design.%20Earlier%20web%20designers%20were%20forced%20to%20use%20Photoshop%20for%20various%20things%20like%20gradient%2C%20shadows%2C%20etc%2C%20and%20jQuery%2FJ&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.shareaholic.com/api/share/?title=110+Best+CSS3+Tutorials+and+Examples&amp;link=http://www.priteshgupta.com/2011/09/110-best-css3-tutorials-and-examples/&amp;notes=I%20have%20been%20publishing%20articles%20about%20CSS3%20for%20a%20while%20now.%20CSS3%20opens%20the%20door%20for%20a%20lot%20of%20unique%20techniques%20for%20websites%2C%20that%20is%20why%20CSS3%20has%20acquired%20an%20important%20place%20in%20web%20design.%20Earlier%20web%20designers%20were%20forced%20to%20use%20Photoshop%20for%20various%20things%20like%20gradient%2C%20shadows%2C%20etc%2C%20and%20jQuery%2FJ&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=43&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.priteshgupta.com/2011/09/110-best-css3-tutorials-and-examples/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>45 Best Online CSS Tools and Resources</title>
		<link>http://www.priteshgupta.com/2011/08/best-online-css-tools-resources/</link>
		<comments>http://www.priteshgupta.com/2011/08/best-online-css-tools-resources/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 04:17:48 +0000</pubDate>
		<dc:creator>Pritesh Gupta</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design and Development]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Typography]]></category>

		<guid isPermaLink="false">http://www.priteshgupta.com/?p=1530</guid>
		<description><![CDATA[CSS is the language used to design websites and is used by various kinds of people ranging from ultra professionals to newbies. Below I am sharing 45 of the best CSS Tools or CSS Resources, tools which can reduce a lot of your work or help you in writing the CSS. Many of these are [...]]]></description>
			<content:encoded><![CDATA[<p><strong>CSS</strong> is the language used to design websites and is used by various kinds of people ranging from ultra professionals to newbies. Below I am sharing 45 of the best CSS <strong>Tools</strong> or CSS <strong>Resources</strong>, tools which can reduce a lot of your work or help you in writing the CSS. Many of these are specifically for <strong>CSS3</strong> too. Browse them out to know more, do drop by if you also know a &#8216;good&#8217; online CSS tool.</p>
<p><a href="http://prefixr.com/" target="_blank" ><br />
<h2>Prefixr: Make CSS Cross-Browser Compatible in Seconds.</h2>
<p></a><br />
<a href="http://prefixr.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/Prefixr.png" alt="Prefixr: Make CSS Cross-Browser Compatible in Seconds." title="Prefixr: Make CSS Cross-Browser Compatible in Seconds." width="580" /></a><br />
<a href="http://css3pie.com/" target="_blank" ><br />
<h2>CSS3 PIE: CSS3 decorations for IE</h2>
<p></a><br />
<a href="http://css3pie.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3-PIE-CSS3-decorations-for-IE.png" alt="CSS3 PIE: CSS3 decorations for IE" title="CSS3 PIE: CSS3 decorations for IE" width="580" /></a><br />
<a href="http://www.layerstyles.org/builder.html" target="_blank" ><br />
<h2>CSS3 Layers Builder</h2>
<p></a><br />
<a href="http://www.layerstyles.org/builder.html" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3-Layers-Builder.png" alt="CSS3 Layers Builder" title="CSS3 Layers Builder" width="580" /></a><br />
<a href="http://www.typetester.org/" target="_blank" ><br />
<h2>Typetester: Compare fonts for the screen</h2>
<p></a><br />
<a href="http://www.typetester.org/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/Typetester-Compare-fonts-for-the-screen.png" alt="Typetester: Compare fonts for the screen" title="Typetester: Compare fonts for the screen" width="580" /></a><br />
<a href="http://css-tricks.com/examples/ButtonMaker/" target="_blank" ><br />
<h2>CSS-Tricks: Button Maker</h2>
<p></a><br />
<a href="http://css-tricks.com/examples/ButtonMaker/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS-Tricks-Button-Maker.png" alt="CSS-Tricks: Button Maker" title="CSS-Tricks: Button Maker" width="580" /></a><br />
<a href="http://css3designer.com/tools" target="_blank" ><br />
<h2>CSS3 Button maker 1.0</h2>
<p></a><br />
<a href="http://css3designer.com/tools" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3-Button-maker-1.png" alt="CSS3 Button maker 1.0" title="CSS3 Button maker 1.0" width="580" /></a><br />
<a href="http://dryicons.com/demos/css3-linear-gradient-buttons-generator/" target="_blank" ><br />
<h2>CSS3 Linear Gradient Buttons Generator</h2>
<p></a><br />
<a href="http://dryicons.com/demos/css3-linear-gradient-buttons-generator/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3-Linear-Gradient-Buttons-Generator.png" alt="CSS3 Linear Gradient Buttons Generator" title="CSS3 Linear Gradient Buttons Generator" width="580" /></a><br />
<a href="http://gradients.glrzad.com/" target="_blank" ><br />
<h2>CSS3 Gradient Generator</h2>
<p></a><br />
<a href="http://gradients.glrzad.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3-Gradient-Generator.png" alt="CSS3 Gradient Generator" title="CSS3 Gradient Generator" width="580" /></a><br />
<a href="http://css3gen.com/" target="_blank" ><br />
<h2>CSS3Gen: CSS3 Generator, Tools and Snippets</h2>
<p></a><br />
<a href="http://css3gen.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3Gen-CSS3-Generator-Tools-and-Snippets.png" alt="CSS3Gen: CSS3 Generator, Tools and Snippets" title="CSS3Gen: CSS3 Generator, Tools and Snippets" width="580" /></a><br />
<a href="http://www.css3.me/" target="_blank" ><br />
<h2>CSS3 Generator</h2>
<p></a><br />
<a href="http://www.css3.me/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3-Generator.png" alt="CSS3 Generator" title="CSS3 Generator" width="580" /></a><br />
<a href="http://www.css3generator.com/" target="_blank" ><br />
<h2>CSS3 Generator</h2>
<p></a><br />
<a href="http://www.css3generator.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3-Generator-2.png" alt="CSS3 Generator" title="CSS3 Generator" width="580" /></a><br />
<a href="http://www.css3maker.com/" target="_blank" ><br />
<h2>CSS3.0 Maker, Generator</h2>
<p></a><br />
<a href="http://www.css3maker.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3.png" alt="CSS3.0 Maker, Generator" title="CSS3.0 Maker, Generator" width="580" /></a><br />
<a href="http://debray.jerome.free.fr/index.php?outils/Generateur-de-multi-colonnes-en-css3" target="_blank" ><br />
<h2>CSS3 Multi-Column Generator</h2>
<p></a><br />
<a href="http://debray.jerome.free.fr/index.php?outils/Generateur-de-multi-colonnes-en-css3" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3-Multi-Column-Generator.png" alt="CSS3 Multi-Column Generator" title="CSS3 Multi-Column Generator" width="580" /></a><br />
<a href="http://css3.mikeplate.com/" target="_blank" ><br />
<h2>CSS3 Playground</h2>
<p></a><br />
<a href="http://css3.mikeplate.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3-Playground.png" alt="CSS3 Playground" title="CSS3 Playground" width="580" /></a><br />
<a href="http://css3menu.com/index.html" target="_blank" ><br />
<h2>CSS3 Menu</h2>
<p></a><br />
<a href="http://css3menu.com/index.html" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3-Menu.png" alt="CSS3 Menu" title="CSS3 Menu" width="580" /></a><br />
<a href="http://css3please.com/" target="_blank" ><br />
<h2>CSS3 Please: Cross-Browser CSS3 Rule Generator</h2>
<p></a><br />
<a href="http://css3please.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3-Please-Cross-Browser-CSS3-Rule-Generator.png" alt="CSS3 Please: Cross-Browser CSS3 Rule Generator" title="CSS3 Please: Cross-Browser CSS3 Rule Generator" width="580" /></a><br />
<a href="http://www.cascader.co/" target="_blank" ><br />
<h2>Cascader: Tool that helps developers separate inlined CSS from HTML files</h2>
<p></a><br />
<a href="http://www.cascader.co/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/Cascader-Tool-that-helps-developers-separate-inlined-CSS-from-HTML-files.png" alt="Cascader: Tool that helps developers separate inlined CSS from HTML files" title="Cascader: Tool that helps developers separate inlined CSS from HTML files" width="580" /></a><br />
<a href="http://drawter.com/" target="_blank" ><br />
<h2>Drawter.com: DrawAble Markup Language</h2>
<p></a><br />
<a href="http://drawter.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/Drawter.png" alt="Drawter.com: DrawAble Markup Language" title="Drawter.com: DrawAble Markup Language" width="580" /></a><br />
<a href="http://grid.mindplay.dk/" target="_blank" ><br />
<h2>Grid Designer</h2>
<p></a><br />
<a href="http://grid.mindplay.dk/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/Grid-Designer.png" alt="Grid Designer" title="Grid Designer" width="580" /></a><br />
<a href="http://border-radius.com/" target="_blank" ><br />
<h2>CSS Border Radius Generator</h2>
<p></a><br />
<a href="http://border-radius.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS-Border-Radius-Generator.png" alt="CSS Border Radius Generator" title="CSS Border Radius Generator" width="580" /></a><br />
<a href="http://www.wordpressthemeshock.com/css-drop-shadow/" target="_blank" ><br />
<h2>CSS33 Drop Shadow Generator</h2>
<p></a><br />
<a href="http://www.wordpressthemeshock.com/css-drop-shadow/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS33-Drop-Shadow-Generator.png" alt="CSS33 Drop Shadow Generator" title="CSS33 Drop Shadow Generator" width="580" /></a><br />
<a href="http://www.spritecow.com/" target="_blank" ><br />
<h2>Sprite Cow: Generate CSS for sprite sheets</h2>
<p></a><br />
<a href="http://www.spritecow.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/Sprite-Cow-Generate-CSS-for-sprite-sheets.png" alt="Sprite Cow: Generate CSS for sprite sheets" title="Sprite Cow: Generate CSS for sprite sheets" width="580" /></a><br />
<a href="http://westciv.com/tools/3Dtransforms/index.html" target="_blank" ><br />
<h2>CSS3 3D Transforms</h2>
<p></a><br />
<a href="http://westciv.com/tools/3Dtransforms/index.html" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3-3D-Transforms.png" alt="CSS3 3D Transforms" title="CSS3 3D Transforms" width="580" /></a><br />
<a href="http://westciv.com/tools/transforms/index.html" target="_blank" ><br />
<h2>CSS3 Transforms</h2>
<p></a><br />
<a href="http://westciv.com/tools/transforms/index.html" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3-Transforms.png" alt="CSS3 Transforms" title="CSS3 Transforms" width="580" /></a><br />
<a href="http://styleneat.com/" target="_blank" ><br />
<h2>Styleneat: CSS Organizer</h2>
<p></a><br />
<a href="http://styleneat.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/Styleneat-CSS-Organizer.png" alt="Styleneat: CSS Organizer" title="Styleneat: CSS Organizer" width="580" /></a><br />
<a href="http://www.impressivewebs.com/css3-click-chart/" target="_blank" ><br />
<h2>Impressive Webs: CSS3 Click Chart</h2>
<p></a><br />
<a href="http://www.impressivewebs.com/css3-click-chart/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/Impressive-Webs-CSS3-Click-Chart.png" alt="Impressive Webs: CSS3 Click Chart" title="Impressive Webs: CSS3 Click Chart" width="580" /></a><br />
<a href="http://www.csstypeset.com/" target="_blank" ><br />
<h2>CSS Type Set</h2>
<p></a><br />
<a href="http://www.csstypeset.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS-Type-Set.png" alt="CSS Type Set" title="CSS Type Set" width="580" /></a><br />
<a href="http://www.cssdrive.com/index.php/main/csscompressor/" target="_blank" ><br />
<h2>CSS Drive: CSS Compressor</h2>
<p></a><br />
<a href="http://www.cssdrive.com/index.php/main/csscompressor/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/06/CSS-Drive-Gallery-CSS-Compressor.png" alt="CSS Drive: CSS Compressor" title="CSS Drive: CSS Compressor" width="580" /></a><br />
<a href="http://www.csscompressor.com/" target="_blank" ><br />
<h2>CSS Compressor</h2>
<p></a><br />
<a href="http://www.csscompressor.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/06/CSS-Compressor-Online-code-compressor-for-Cascading-Style-Sheets.png" alt="CSS Compressor" title="CSS Compressor" width="580" /></a><br />
<a href="http://www.cssportal.com/online-css-editor/" target="_blank" ><br />
<h2>CSS Portal: Online CSS Editor</h2>
<p></a><br />
<a href="http://www.cssportal.com/online-css-editor/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS-Portal-Online-CSS-Editor.png" alt="CSS Portal: Online CSS Editor " title="CSS Portal: Online CSS Editor " width="580" /></a><br />
<a href="http://chengyinliu.com/whatfont.html" target="_blank" ><br />
<h2>WHATFONT TOOL</h2>
<p></a><br />
<a href="http://chengyinliu.com/whatfont.html" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/WHATFONT-TOOL.png" alt="WHATFONT TOOL" title="WHATFONT TOOL" width="580" /></a><br />
<a href="http://new.myfonts.com/WhatTheFont/" target="_blank" ><br />
<h2>WhatTheFont</h2>
<p></a><br />
<a href="http://new.myfonts.com/WhatTheFont/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/WhatTheFont.png" alt="WhatTheFont" title="WhatTheFont" width="580" /></a><br />
<a href="http://fontdragr.com/" target="_blank" ><br />
<h2>Font Dragr: Web App for Testing Custom Fonts</h2>
<p></a><br />
<a href="http://fontdragr.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/Font-Dragr-Web-App-for-Testing-Custom-Fonts.png" alt="Font Dragr: Web App for Testing Custom Fonts" title="Font Dragr: Web App for Testing Custom Fonts" width="580" /></a><br />
<a href="http://fontstruct.com/" target="_blank" ><br />
<h2>FontStruct: Build, Share and Download Fonts</h2>
<p></a><br />
<a href="http://fontstruct.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/FontStruct-Build-Share-and-Download-Fonts.png" alt="FontStruct: Build, Share and Download Fonts" title="FontStruct: Build, Share and Download Fonts" width="580" /></a><br />
<a href="http://www.myfontbook.com" target="_blank" ><br />
<h2>myFontbook.com: Font Viewer</h2>
<p></a><br />
<a href="http://www.myfontbook.com" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/myFontbook-Font-Viewer.png" alt="myFontbook.com: Font Viewer" title="myFontbook.com: Font Viewer" width="580" /></a><br />
<a href="http://www.fontsquirrel.com/fontface/generator" target="_blank" ><br />
<h2>Font Squirrel: @FONT-FACE GENERATOR</h2>
<p></a><br />
<a href="http://www.fontsquirrel.com/fontface/generator" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/Font-Squirrel-@FONT-FACE-GENERATOR.png" alt="Font Squirrel: @FONT-FACE GENERATOR" title="Font Squirrel: @FONT-FACE GENERATOR" width="580" /></a><br />
<a href="http://www.google.com/webfonts" target="_blank" ><br />
<h2>Google Web Fonts</h2>
<p></a><br />
<a href="http://www.google.com/webfonts" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/05/Google-Web-Fonts.png" alt="Google Web Fonts" title="Google Web Fonts" width="580" /></a><br />
<a href="http://ffffallback.com/" target="_blank" ><br />
<h2>FFFFALLBACK: A Simple Tool for Bulletproof Web Typography</h2>
<p></a><br />
<a href="http://ffffallback.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/FFFFALLBACK-A-Simple-Tool-for-Bulletproof-Web-Typography.png" alt="FFFFALLBACK: A Simple Tool for Bulletproof Web Typography" title="FFFFALLBACK: A Simple Tool for Bulletproof Web Typography" width="580" /></a><br />
<a href="http://pxtoem.com/" target="_blank" ><br />
<h2>PXtoEM.com: PX to EM Conversion</h2>
<p></a><br />
<a href="http://pxtoem.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/PXtoEM.png" alt="PXtoEM.com: PX to EM Conversion" title="PXtoEM.com: PX to EM Conversion" width="580" /></a><br />
<a href="http://redalt.com/Tools/I+Like+Your+Colors" target="_blank" ><br />
<h2>I Like Your Colors</h2>
<p></a><br />
<a href="http://redalt.com/Tools/I+Like+Your+Colors" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/I-Like-Your-Colors.png" alt="I Like Your Colors" title="I Like Your Colors" width="580" /></a><br />
<a href="http://tools.css3.info/selectors-test/test.html" target="_blank" ><br />
<h2>CSS3 Selectors Test</h2>
<p></a><br />
<a href="http://tools.css3.info/selectors-test/test.html" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSS3-Selectors-Test.png" alt="CSS3 Selectors Test" title="CSS3 Selectors Test" width="580" /></a><br />
<a href="http://www.cleancss.com/" target="_blank" ><br />
<h2>Clean CSS: Optmize and Format CSS</h2>
<p></a><br />
<a href="http://www.cleancss.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/Clean-CSS-Optmize-and-Format-CSS.png" alt="Clean CSS: Optmize and Format CSS" title="Clean CSS: Optmize and Format CSS" width="580" /></a><br />
<a href="http://hex2rgba.devoth.com/" target="_blank" ><br />
<h2>HEX 2 RGBA Color Calculator</h2>
<p></a><br />
<a href="http://hex2rgba.devoth.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/HEX-2-RGBA-Color-Calculator.png" alt="HEX 2 RGBA Color Calculator" title="HEX 2 RGBA Color Calculator" width="580" /></a><br />
<a href="http://jsfiddle.net/" target="_blank" ><br />
<h2>jsFiddle: Online Editor for the Web</h2>
<p></a><br />
<a href="http://jsfiddle.net/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/jsFiddle-Online-Editor-for-the-Web.png" alt="jsFiddle: Online Editor for the Web" title="jsFiddle: Online Editor for the Web" width="580" /></a><a href="http://cssdesk.com/" target="_blank" ><br />
<h2>CSSDesk: Online CSS Sandbox</h2>
<p></a><br />
<a href="http://cssdesk.com/" target="_blank" ><img src="http://www.priteshgupta.com/wp-content/uploads/2011/08/CSSDesk-Online-CSS-Sandbox.png" alt="CSSDesk: Online CSS Sandbox" title="CSSDesk: Online CSS Sandbox" width="580" /></a></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=45+Best+Online+CSS+Tools+and+Resources&amp;link=http://www.priteshgupta.com/2011/08/best-online-css-tools-resources/&amp;notes=CSS%20is%20the%20language%20used%20to%20design%20websites%20and%20is%20used%20by%20various%20kinds%20of%20people%20ranging%20from%20ultra%20professionals%20to%20newbies.%20Below%20I%20am%20sharing%2045%20of%20the%20best%20CSS%20Tools%20or%20CSS%20Resources%2C%20tools%20which%20can%20reduce%20a%20lot%20of%20your%20work%20or%20help%20you%20in%20writing%20the%20CSS.%20Many%20of%20these%20are%20specifically%20for%20C&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=45+Best+Online+CSS+Tools+and+Resources&amp;link=http://www.priteshgupta.com/2011/08/best-online-css-tools-resources/&amp;notes=CSS%20is%20the%20language%20used%20to%20design%20websites%20and%20is%20used%20by%20various%20kinds%20of%20people%20ranging%20from%20ultra%20professionals%20to%20newbies.%20Below%20I%20am%20sharing%2045%20of%20the%20best%20CSS%20Tools%20or%20CSS%20Resources%2C%20tools%20which%20can%20reduce%20a%20lot%20of%20your%20work%20or%20help%20you%20in%20writing%20the%20CSS.%20Many%20of%20these%20are%20specifically%20for%20C&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=45+Best+Online+CSS+Tools+and+Resources&amp;link=http://www.priteshgupta.com/2011/08/best-online-css-tools-resources/&amp;notes=CSS%20is%20the%20language%20used%20to%20design%20websites%20and%20is%20used%20by%20various%20kinds%20of%20people%20ranging%20from%20ultra%20professionals%20to%20newbies.%20Below%20I%20am%20sharing%2045%20of%20the%20best%20CSS%20Tools%20or%20CSS%20Resources%2C%20tools%20which%20can%20reduce%20a%20lot%20of%20your%20work%20or%20help%20you%20in%20writing%20the%20CSS.%20Many%20of%20these%20are%20specifically%20for%20C&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=45+Best+Online+CSS+Tools+and+Resources&amp;link=http://www.priteshgupta.com/2011/08/best-online-css-tools-resources/&amp;notes=CSS%20is%20the%20language%20used%20to%20design%20websites%20and%20is%20used%20by%20various%20kinds%20of%20people%20ranging%20from%20ultra%20professionals%20to%20newbies.%20Below%20I%20am%20sharing%2045%20of%20the%20best%20CSS%20Tools%20or%20CSS%20Resources%2C%20tools%20which%20can%20reduce%20a%20lot%20of%20your%20work%20or%20help%20you%20in%20writing%20the%20CSS.%20Many%20of%20these%20are%20specifically%20for%20C&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=45+Best+Online+CSS+Tools+and+Resources&amp;link=http://www.priteshgupta.com/2011/08/best-online-css-tools-resources/&amp;notes=CSS%20is%20the%20language%20used%20to%20design%20websites%20and%20is%20used%20by%20various%20kinds%20of%20people%20ranging%20from%20ultra%20professionals%20to%20newbies.%20Below%20I%20am%20sharing%2045%20of%20the%20best%20CSS%20Tools%20or%20CSS%20Resources%2C%20tools%20which%20can%20reduce%20a%20lot%20of%20your%20work%20or%20help%20you%20in%20writing%20the%20CSS.%20Many%20of%20these%20are%20specifically%20for%20C&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.priteshgupta.com/2011/08/best-online-css-tools-resources/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=45+Best+Online+CSS+Tools+and+Resources&amp;link=http://www.priteshgupta.com/2011/08/best-online-css-tools-resources/&amp;notes=CSS%20is%20the%20language%20used%20to%20design%20websites%20and%20is%20used%20by%20various%20kinds%20of%20people%20ranging%20from%20ultra%20professionals%20to%20newbies.%20Below%20I%20am%20sharing%2045%20of%20the%20best%20CSS%20Tools%20or%20CSS%20Resources%2C%20tools%20which%20can%20reduce%20a%20lot%20of%20your%20work%20or%20help%20you%20in%20writing%20the%20CSS.%20Many%20of%20these%20are%20specifically%20for%20C&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=45+Best+Online+CSS+Tools+and+Resources&amp;link=http://www.priteshgupta.com/2011/08/best-online-css-tools-resources/&amp;notes=CSS%20is%20the%20language%20used%20to%20design%20websites%20and%20is%20used%20by%20various%20kinds%20of%20people%20ranging%20from%20ultra%20professionals%20to%20newbies.%20Below%20I%20am%20sharing%2045%20of%20the%20best%20CSS%20Tools%20or%20CSS%20Resources%2C%20tools%20which%20can%20reduce%20a%20lot%20of%20your%20work%20or%20help%20you%20in%20writing%20the%20CSS.%20Many%20of%20these%20are%20specifically%20for%20C&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.shareaholic.com/api/share/?title=45+Best+Online+CSS+Tools+and+Resources&amp;link=http://www.priteshgupta.com/2011/08/best-online-css-tools-resources/&amp;notes=CSS%20is%20the%20language%20used%20to%20design%20websites%20and%20is%20used%20by%20various%20kinds%20of%20people%20ranging%20from%20ultra%20professionals%20to%20newbies.%20Below%20I%20am%20sharing%2045%20of%20the%20best%20CSS%20Tools%20or%20CSS%20Resources%2C%20tools%20which%20can%20reduce%20a%20lot%20of%20your%20work%20or%20help%20you%20in%20writing%20the%20CSS.%20Many%20of%20these%20are%20specifically%20for%20C&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=43&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.priteshgupta.com/2011/08/best-online-css-tools-resources/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CSS3 Alternative to jQuery .fadeIn() or .fadeOut()</title>
		<link>http://www.priteshgupta.com/2011/08/html5-alternative-to-jquery-fadein-or-fadeout/</link>
		<comments>http://www.priteshgupta.com/2011/08/html5-alternative-to-jquery-fadein-or-fadeout/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 06:13:24 +0000</pubDate>
		<dc:creator>Pritesh Gupta</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.priteshgupta.com/?p=1515</guid>
		<description><![CDATA[Suppose you have an image with some opacity(transparency), you will like it to be animated(with easing/smoothing effect) to none opacity on hover. This effect is seen in many many websites, and almost all of them use jQuery to achieve it. Even I used to use jQuery for this but while making a website recently I [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose you have an image with some <strong>opacity</strong>(transparency), you will like it to be <strong>animated</strong>(with <strong>easing</strong>/smoothing effect) to none opacity <strong>on hover</strong>. This effect is seen in many many websites, and almost all of them use <strong>jQuery</strong> to achieve it. Even I used to use jQuery for this but while making a website recently I thought that it could be done using CSS instead of jQuery. So I tried it using transition <strong>CSS3</strong> tags and I saw it could be easily done with CSS in place of jQuery. Using <strong>CSS3</strong> instead of <strong>jQuery</strong> has many obvious advantages like faster load time of site, lesser heavier website, etc. The effect you achieve by using CSS is absolutely same as jQuery. Live demo can be seen at the end of this post.</p>
<h1>The CSS</h1>
<p>The CSS is really simple, you can use the below codes intact, or change them according to your requirements. <strong><code>1s</code></strong> is time duration for the easing effect, <strong><code>ease-out</code></strong> is the easing type, you can even use <strong><code>ease-in</code></strong>, <strong><code>ease-in-out</code></strong>, <strong><code>linear</code></strong>, etc instead of <strong><code>ease-out</code></strong> here and <strong><code>opacity</code></strong> is the opacity/transparency of the element.   </p>
<h2>Default CSS for the element</h2>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
</pre>
<pre><span class="css"><span class="css-property">opacity<span class="css-selector">:</span><span class="css-value"> 0.6</span></span>;
<span class="css-property">-webkit-transition<span class="css-selector">:</span><span class="css-value"> all 1s ease-out</span></span>;
<span class="css-property">-moz-transition<span class="css-selector">:</span><span class="css-value"> all 1s ease-out</span></span>;
<span class="css-property">-o-transition<span class="css-selector">:</span><span class="css-value"> all 1s ease-out</span></span>;
<span class="css-property">-ms-transition<span class="css-selector">:</span><span class="css-value"> all 1s ease-out</span></span>;
transition: all 1s ease-out;</span></pre>
</div>
<h2>Hover CSS for the element</h2>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
</pre>
<pre><span class="css"><span class="css-property">opacity<span class="css-selector">:</span><span class="css-value"> 1</span></span>;
<span class="css-property">-webkit-transition<span class="css-selector">:</span><span class="css-value"> all 1s ease-out</span></span>;
<span class="css-property">-moz-transition<span class="css-selector">:</span><span class="css-value"> all 1s ease-out</span></span>;
<span class="css-property">-o-transition<span class="css-selector">:</span><span class="css-value"> all 1s ease-out</span></span>;
<span class="css-property">-ms-transition<span class="css-selector">:</span><span class="css-value"> all 1s ease-out</span></span>;
transition: all 1s ease-out;</span></pre>
</div>
<h2>jQuery Method</h2>
<p>Just to compare, using jQuery we can do it like this:</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre>
<pre><span class="html"><span class="html-script-element">&lt;script type=<span class="html-attribute">&quot;text/javascript&quot;</span>&gt;<span class="js"><span class="js">
$<span class="js-bracket">(</span><span class="js-client-keyword">document</span><span class="js-bracket">)</span>.ready<span class="js-bracket">(</span><span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
$<span class="js-bracket">(</span><span class="js-string">'body'</span><span class="js-bracket">)</span>.<span class="js-client-keyword">find</span><span class="js-bracket">(</span><span class="js-string">'img'</span><span class="js-bracket">)</span>.css<span class="js-bracket">(</span><span class="js-bracket">{</span><span class="js-string">'opacity'</span><span class="js-operator">:</span><span class="js-number">0</span>.<span class="js-number">6</span><span class="js-bracket">}</span><span class="js-bracket">)</span>;
  $<span class="js-bracket">(</span><span class="js-string">'body'</span><span class="js-bracket">)</span>.<span class="js-client-keyword">find</span><span class="js-bracket">(</span><span class="js-string">'img'</span><span class="js-bracket">)</span>.hover<span class="js-bracket">(</span>
	<span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span><span class="js-bracket">{</span>
		$<span class="js-bracket">(</span><span class="js-reserved-keyword">this</span><span class="js-bracket">)</span>.<span class="js-client-keyword">stop</span><span class="js-bracket">(</span><span class="js-bracket">)</span>.animate<span class="js-bracket">(</span><span class="js-bracket">{</span>opacity<span class="js-operator">:</span><span class="js-number">1</span><span class="js-bracket">}</span>,<span class="js-number">1</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-bracket">)</span>
	<span class="js-bracket">}</span>,
	<span class="js-function-keyword">function</span><span class="js-bracket">(</span><span class="js-bracket">)</span><span class="js-bracket">{</span>
		$<span class="js-bracket">(</span><span class="js-reserved-keyword">this</span><span class="js-bracket">)</span>.<span class="js-client-keyword">stop</span><span class="js-bracket">(</span><span class="js-bracket">)</span>.animate<span class="js-bracket">(</span><span class="js-bracket">{</span>opacity<span class="js-operator">:</span><span class="js-number">0</span>.<span class="js-number">6</span><span class="js-bracket">}</span>,<span class="js-number">1</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-number">0</span><span class="js-bracket">)</span>
	<span class="js-bracket">}</span>
  <span class="js-bracket">)</span>
<span class="js-bracket">}</span><span class="js-bracket">)</span>;
</span></span>&lt;/script&gt;</span></span></pre>
</div>
<h2>Live Demo</h2>
<p>Here is a live demo below for the fading effect using CSS, alternatively you can click <a href="http://priteshgupta.com/demos/fade/cssfade.html" target="_blank">here</a>.<br />
<iframe src="http://priteshgupta.com/demos/fade/cssfade.html" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:550px; height: 400px; margin-left: 15px;" allowTransparency="true"></iframe><br />
And doing the same using jQuery(Or click <a href="http://priteshgupta.com/demos/fade/jqueryfade.html" target="_blank">here</a>).<br />
<iframe src="http://priteshgupta.com/demos/fade/jqueryfade.html" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:550px; height: 400px; margin-left: 15px;" allowTransparency="true"></iframe><br />
If you will like to see them side by side, you can go <a href="http://priteshgupta.com/demos/fade/" title="CSS3 Alternative to jQuery .fadeIn() or .fadeOut()" target="_blank">here</a>, the left frame uses the <strong>CSS3</strong> method and the right frame uses the <strong>jQuery</strong> method. </p>
<h2>Further Reading</h2>
<p>Below are the pages of CSS tags used in above codes.<br />
<div class="shortcode-unorderedlist arrow"></p>
<ul>
<li><a href="http://www.webkit.org/blog/138/css-animation/" target="_blank">Surfin&#039; Safari &#8211; Blog Archive  &raquo; CSS Animation</a></li>
<li><a href="https://developer.mozilla.org/en/CSS/-moz-transition" target="_blank">transition &#8211; MDC Docs</a></li>
<li><a href="http://www.opera.com/docs/specs/presto23/css/transitions/" target="_blank">Opera: CSS3 Transitions support in Opera Presto 2.3</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/ms532847(v=vs.85).aspx" target="_blank">Introduction to Filters and Transitions</a></li>
<li><a href="http://www.w3.org/TR/css3-transitions/" target="_blank">CSS Transitions Module Level 3</a></li>
</ul>
<p></div>
 </p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Alternative+to+jQuery+.fadeIn%28%29+or+.fadeOut%28%29++&amp;link=http://www.priteshgupta.com/2011/08/html5-alternative-to-jquery-fadein-or-fadeout/&amp;notes=Suppose%20you%20have%20an%20image%20with%20some%20opacity%28transparency%29%2C%20you%20will%20like%20it%20to%20be%20animated%28with%20easing%2Fsmoothing%20effect%29%20to%20none%20opacity%20on%20hover.%20This%20effect%20is%20seen%20in%20many%20many%20websites%2C%20and%20almost%20all%20of%20them%20use%20jQuery%20to%20achieve%20it.%20Even%20I%20used%20to%20use%20jQuery%20for%20this%20but%20while%20making%20a%20website&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Alternative+to+jQuery+.fadeIn%28%29+or+.fadeOut%28%29++&amp;link=http://www.priteshgupta.com/2011/08/html5-alternative-to-jquery-fadein-or-fadeout/&amp;notes=Suppose%20you%20have%20an%20image%20with%20some%20opacity%28transparency%29%2C%20you%20will%20like%20it%20to%20be%20animated%28with%20easing%2Fsmoothing%20effect%29%20to%20none%20opacity%20on%20hover.%20This%20effect%20is%20seen%20in%20many%20many%20websites%2C%20and%20almost%20all%20of%20them%20use%20jQuery%20to%20achieve%20it.%20Even%20I%20used%20to%20use%20jQuery%20for%20this%20but%20while%20making%20a%20website&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Alternative+to+jQuery+.fadeIn%28%29+or+.fadeOut%28%29++&amp;link=http://www.priteshgupta.com/2011/08/html5-alternative-to-jquery-fadein-or-fadeout/&amp;notes=Suppose%20you%20have%20an%20image%20with%20some%20opacity%28transparency%29%2C%20you%20will%20like%20it%20to%20be%20animated%28with%20easing%2Fsmoothing%20effect%29%20to%20none%20opacity%20on%20hover.%20This%20effect%20is%20seen%20in%20many%20many%20websites%2C%20and%20almost%20all%20of%20them%20use%20jQuery%20to%20achieve%20it.%20Even%20I%20used%20to%20use%20jQuery%20for%20this%20but%20while%20making%20a%20website&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Alternative+to+jQuery+.fadeIn%28%29+or+.fadeOut%28%29++&amp;link=http://www.priteshgupta.com/2011/08/html5-alternative-to-jquery-fadein-or-fadeout/&amp;notes=Suppose%20you%20have%20an%20image%20with%20some%20opacity%28transparency%29%2C%20you%20will%20like%20it%20to%20be%20animated%28with%20easing%2Fsmoothing%20effect%29%20to%20none%20opacity%20on%20hover.%20This%20effect%20is%20seen%20in%20many%20many%20websites%2C%20and%20almost%20all%20of%20them%20use%20jQuery%20to%20achieve%20it.%20Even%20I%20used%20to%20use%20jQuery%20for%20this%20but%20while%20making%20a%20website&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Alternative+to+jQuery+.fadeIn%28%29+or+.fadeOut%28%29++&amp;link=http://www.priteshgupta.com/2011/08/html5-alternative-to-jquery-fadein-or-fadeout/&amp;notes=Suppose%20you%20have%20an%20image%20with%20some%20opacity%28transparency%29%2C%20you%20will%20like%20it%20to%20be%20animated%28with%20easing%2Fsmoothing%20effect%29%20to%20none%20opacity%20on%20hover.%20This%20effect%20is%20seen%20in%20many%20many%20websites%2C%20and%20almost%20all%20of%20them%20use%20jQuery%20to%20achieve%20it.%20Even%20I%20used%20to%20use%20jQuery%20for%20this%20but%20while%20making%20a%20website&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.priteshgupta.com/2011/08/html5-alternative-to-jquery-fadein-or-fadeout/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Alternative+to+jQuery+.fadeIn%28%29+or+.fadeOut%28%29++&amp;link=http://www.priteshgupta.com/2011/08/html5-alternative-to-jquery-fadein-or-fadeout/&amp;notes=Suppose%20you%20have%20an%20image%20with%20some%20opacity%28transparency%29%2C%20you%20will%20like%20it%20to%20be%20animated%28with%20easing%2Fsmoothing%20effect%29%20to%20none%20opacity%20on%20hover.%20This%20effect%20is%20seen%20in%20many%20many%20websites%2C%20and%20almost%20all%20of%20them%20use%20jQuery%20to%20achieve%20it.%20Even%20I%20used%20to%20use%20jQuery%20for%20this%20but%20while%20making%20a%20website&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Alternative+to+jQuery+.fadeIn%28%29+or+.fadeOut%28%29++&amp;link=http://www.priteshgupta.com/2011/08/html5-alternative-to-jquery-fadein-or-fadeout/&amp;notes=Suppose%20you%20have%20an%20image%20with%20some%20opacity%28transparency%29%2C%20you%20will%20like%20it%20to%20be%20animated%28with%20easing%2Fsmoothing%20effect%29%20to%20none%20opacity%20on%20hover.%20This%20effect%20is%20seen%20in%20many%20many%20websites%2C%20and%20almost%20all%20of%20them%20use%20jQuery%20to%20achieve%20it.%20Even%20I%20used%20to%20use%20jQuery%20for%20this%20but%20while%20making%20a%20website&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Alternative+to+jQuery+.fadeIn%28%29+or+.fadeOut%28%29++&amp;link=http://www.priteshgupta.com/2011/08/html5-alternative-to-jquery-fadein-or-fadeout/&amp;notes=Suppose%20you%20have%20an%20image%20with%20some%20opacity%28transparency%29%2C%20you%20will%20like%20it%20to%20be%20animated%28with%20easing%2Fsmoothing%20effect%29%20to%20none%20opacity%20on%20hover.%20This%20effect%20is%20seen%20in%20many%20many%20websites%2C%20and%20almost%20all%20of%20them%20use%20jQuery%20to%20achieve%20it.%20Even%20I%20used%20to%20use%20jQuery%20for%20this%20but%20while%20making%20a%20website&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=43&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.priteshgupta.com/2011/08/html5-alternative-to-jquery-fadein-or-fadeout/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Limit File Download Speed (Using PHP)</title>
		<link>http://www.priteshgupta.com/2011/07/limit-file-download-speed-using-php/</link>
		<comments>http://www.priteshgupta.com/2011/07/limit-file-download-speed-using-php/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 06:41:03 +0000</pubDate>
		<dc:creator>Pritesh Gupta</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.priteshgupta.com/?p=1466</guid>
		<description><![CDATA[Yes, using simple PHP snippet you can limit the download speed of a file. This can be done for Bandwidth throttling or for Rate limiting. One practical application of this script will be slowing down the speed at which someone can download a file for free. If you pay for the service then the speed [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, using simple PHP snippet you can limit the download speed of a file. This can be done for <a href="http://en.wikipedia.org/wiki/Bandwidth_throttling" title="Bandwidth throttling " target="_blank">Bandwidth throttling</a> or for <a href="http://en.wikipedia.org/wiki/Rate_limiting" title="Rate limiting" target="_blank">Rate limiting</a>. One practical application of this script will be slowing down the speed at which someone can download a file for free. If you pay for the service then the speed would be either unlimited or less restrictive.<br />
Another application would be if you are generating the file as it is being created. Like, If there is a 10mb lossless image, and you know that it takes at most 1 second to create 256kb of it, then you can set the script to stream 256kb every second. This way the user can start receiving data as soon as the first 256kb are ready. </p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
</pre>
<pre><span class="php"><span class="php-comment">// The file that will be sent to the user
</span>
<span class="php-var">$your_file</span> <span class="php-operator">=</span> <span class="php-string">'file.zip'</span>;

<span class="php-comment">// Rename the file name
</span>
<span class="php-var">$new_file</span> <span class="php-operator">=</span> <span class="php-string">'new-filename.zip'</span>;

<span class="php-comment">// Set the download speed limit (70 kb/s)
</span>
<span class="php-var">$download_speed</span> <span class="php-operator">=</span> <span class="php-number">7</span><span class="php-number">0</span>;

<span class="php-keyword">if</span><span class="php-brackets">(</span><span class="php-function">file_exists</span><span class="php-brackets">(</span><span class="php-var">$myl_file</span><span class="php-brackets">)</span> <span class="php-operator">&amp;</span><span class="php-operator">&amp;</span> <span class="php-function">is_file</span><span class="php-brackets">(</span><span class="php-var">$my_file</span><span class="php-brackets">)</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>

    <span class="php-comment">// Headers
</span>
    <span class="php-function">header</span><span class="php-brackets">(</span><span class="php-string">'Cache-control: private'</span><span class="php-brackets">)</span>;
    <span class="php-function">header</span><span class="php-brackets">(</span><span class="php-string">'Content-Type: application/octet-stream'</span><span class="php-brackets">)</span>;
    <span class="php-function">header</span><span class="php-brackets">(</span><span class="php-string">'Content-Length: '</span><span class="php-operator">.</span><span class="php-function">filesize</span><span class="php-brackets">(</span><span class="php-var">$my_file</span><span class="php-brackets">)</span><span class="php-brackets">)</span>;
    <span class="php-function">header</span><span class="php-brackets">(</span><span class="php-string">'Content-Disposition: filename='</span><span class="php-operator">.</span><span class="php-var">$new_file</span><span class="php-brackets">)</span>;

    <span class="php-comment">// Flush the content
</span>
    <span class="php-function">flush</span><span class="php-brackets">(</span><span class="php-brackets">)</span>;

    <span class="php-comment">// File stream
</span>
    <span class="php-var">$file</span> <span class="php-operator">=</span> <span class="php-function">fopen</span><span class="php-brackets">(</span><span class="php-var">$my_file</span>, <span class="php-string">&quot;r&quot;</span><span class="php-brackets">)</span>;

    <span class="php-keyword">while</span> <span class="php-brackets">(</span><span class="php-operator">!</span><span class="php-function">feof</span><span class="php-brackets">(</span><span class="php-var">$file</span><span class="php-brackets">)</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>

        <span class="php-comment">// Send the current part of the file to the browser
</span>
        <span class="php-keyword">echo</span> <span class="php-function">fread</span><span class="php-brackets">(</span><span class="php-var">$file</span>, <span class="php-function">round</span><span class="php-brackets">(</span><span class="php-var">$download_speed</span><span class="php-operator">*</span> <span class="php-number">1</span><span class="php-number">0</span><span class="php-number">2</span><span class="php-number">4</span><span class="php-brackets">)</span><span class="php-brackets">)</span>;

        <span class="php-comment">// Flush the content to the browser
</span>
        <span class="php-function">flush</span><span class="php-brackets">(</span><span class="php-brackets">)</span>;

        <span class="php-comment">// Sleep one second
</span>
        <span class="php-function">sleep</span><span class="php-brackets">(</span><span class="php-number">1</span><span class="php-brackets">)</span>;
    <span class="php-brackets">}</span>

    <span class="php-comment">// Close file stream
</span>
    <span class="php-function">fclose</span><span class="php-brackets">(</span><span class="php-var">$file</span><span class="php-brackets">)</span>;

<span class="php-brackets">}</span>
<span class="php-keyword">else</span> <span class="php-brackets">{</span>
    <span class="php-function">die</span><span class="php-brackets">(</span><span class="php-string">'Error: The file '</span><span class="php-operator">.</span><span class="php-var">$my_file</span><span class="php-operator">.</span><span class="php-string">' does not exist!'</span><span class="php-brackets">)</span>;
<span class="php-brackets">}</span></span></pre>
</div>
<p>This script can be used to limit the download speed at which one can download the file. You can also try out <a href="http://php.webtutor.pl/pl/2011/03/22/limitowanie-predkosci-przesylu-plikow-w-php/" title="QoS Bandwidth Throttle in PHP" target="_blank">QoS Bandwidth Throttle in PHP</a>. </p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Limit+File+Download+Speed+%28Using+PHP%29&amp;link=http://www.priteshgupta.com/2011/07/limit-file-download-speed-using-php/&amp;notes=Yes%2C%20using%20simple%20PHP%20snippet%20you%20can%20limit%20the%20download%20speed%20of%20a%20file.%20This%20can%20be%20done%20for%20Bandwidth%20throttling%20or%20for%20Rate%20limiting.%20One%20practical%20application%20of%20this%20script%20will%20be%20slowing%20down%20the%20speed%20at%20which%20someone%20can%20download%20a%20file%20for%20free.%20If%20you%20pay%20for%20the%20service%20then%20the%20speed%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Limit+File+Download+Speed+%28Using+PHP%29&amp;link=http://www.priteshgupta.com/2011/07/limit-file-download-speed-using-php/&amp;notes=Yes%2C%20using%20simple%20PHP%20snippet%20you%20can%20limit%20the%20download%20speed%20of%20a%20file.%20This%20can%20be%20done%20for%20Bandwidth%20throttling%20or%20for%20Rate%20limiting.%20One%20practical%20application%20of%20this%20script%20will%20be%20slowing%20down%20the%20speed%20at%20which%20someone%20can%20download%20a%20file%20for%20free.%20If%20you%20pay%20for%20the%20service%20then%20the%20speed%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Limit+File+Download+Speed+%28Using+PHP%29&amp;link=http://www.priteshgupta.com/2011/07/limit-file-download-speed-using-php/&amp;notes=Yes%2C%20using%20simple%20PHP%20snippet%20you%20can%20limit%20the%20download%20speed%20of%20a%20file.%20This%20can%20be%20done%20for%20Bandwidth%20throttling%20or%20for%20Rate%20limiting.%20One%20practical%20application%20of%20this%20script%20will%20be%20slowing%20down%20the%20speed%20at%20which%20someone%20can%20download%20a%20file%20for%20free.%20If%20you%20pay%20for%20the%20service%20then%20the%20speed%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Limit+File+Download+Speed+%28Using+PHP%29&amp;link=http://www.priteshgupta.com/2011/07/limit-file-download-speed-using-php/&amp;notes=Yes%2C%20using%20simple%20PHP%20snippet%20you%20can%20limit%20the%20download%20speed%20of%20a%20file.%20This%20can%20be%20done%20for%20Bandwidth%20throttling%20or%20for%20Rate%20limiting.%20One%20practical%20application%20of%20this%20script%20will%20be%20slowing%20down%20the%20speed%20at%20which%20someone%20can%20download%20a%20file%20for%20free.%20If%20you%20pay%20for%20the%20service%20then%20the%20speed%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Limit+File+Download+Speed+%28Using+PHP%29&amp;link=http://www.priteshgupta.com/2011/07/limit-file-download-speed-using-php/&amp;notes=Yes%2C%20using%20simple%20PHP%20snippet%20you%20can%20limit%20the%20download%20speed%20of%20a%20file.%20This%20can%20be%20done%20for%20Bandwidth%20throttling%20or%20for%20Rate%20limiting.%20One%20practical%20application%20of%20this%20script%20will%20be%20slowing%20down%20the%20speed%20at%20which%20someone%20can%20download%20a%20file%20for%20free.%20If%20you%20pay%20for%20the%20service%20then%20the%20speed%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.priteshgupta.com/2011/07/limit-file-download-speed-using-php/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Limit+File+Download+Speed+%28Using+PHP%29&amp;link=http://www.priteshgupta.com/2011/07/limit-file-download-speed-using-php/&amp;notes=Yes%2C%20using%20simple%20PHP%20snippet%20you%20can%20limit%20the%20download%20speed%20of%20a%20file.%20This%20can%20be%20done%20for%20Bandwidth%20throttling%20or%20for%20Rate%20limiting.%20One%20practical%20application%20of%20this%20script%20will%20be%20slowing%20down%20the%20speed%20at%20which%20someone%20can%20download%20a%20file%20for%20free.%20If%20you%20pay%20for%20the%20service%20then%20the%20speed%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Limit+File+Download+Speed+%28Using+PHP%29&amp;link=http://www.priteshgupta.com/2011/07/limit-file-download-speed-using-php/&amp;notes=Yes%2C%20using%20simple%20PHP%20snippet%20you%20can%20limit%20the%20download%20speed%20of%20a%20file.%20This%20can%20be%20done%20for%20Bandwidth%20throttling%20or%20for%20Rate%20limiting.%20One%20practical%20application%20of%20this%20script%20will%20be%20slowing%20down%20the%20speed%20at%20which%20someone%20can%20download%20a%20file%20for%20free.%20If%20you%20pay%20for%20the%20service%20then%20the%20speed%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.shareaholic.com/api/share/?title=Limit+File+Download+Speed+%28Using+PHP%29&amp;link=http://www.priteshgupta.com/2011/07/limit-file-download-speed-using-php/&amp;notes=Yes%2C%20using%20simple%20PHP%20snippet%20you%20can%20limit%20the%20download%20speed%20of%20a%20file.%20This%20can%20be%20done%20for%20Bandwidth%20throttling%20or%20for%20Rate%20limiting.%20One%20practical%20application%20of%20this%20script%20will%20be%20slowing%20down%20the%20speed%20at%20which%20someone%20can%20download%20a%20file%20for%20free.%20If%20you%20pay%20for%20the%20service%20then%20the%20speed%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=43&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.priteshgupta.com/2011/07/limit-file-download-speed-using-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Filling a Glass with Water (Using CSS3)</title>
		<link>http://www.priteshgupta.com/2011/07/filling-a-glass-with-water-using-html5/</link>
		<comments>http://www.priteshgupta.com/2011/07/filling-a-glass-with-water-using-html5/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 06:07:14 +0000</pubDate>
		<dc:creator>Pritesh Gupta</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.priteshgupta.com/?p=1399</guid>
		<description><![CDATA[HTML5 is amazing and list of things which can be done using it is endless. Anyways, I am sharing how we can fill an empty glass with water using HTML5, I am sharing the code snippets for it. Let me know your thoughts on it. A modern web browser(Like Firefox, Chrome, Opera, Safari) will be [...]]]></description>
			<content:encoded><![CDATA[<p><strong>HTML5</strong> is amazing and list of things which can be done using it is endless. Anyways, I am sharing how we can fill an empty glass with water using HTML5, I am sharing the code snippets for it. Let me know your thoughts on it. A modern web browser(Like Firefox, Chrome, Opera, Safari) will be needed for it. The live demonstration of this can be seen at the end of this post.</p>
<h2>The HTML</h2>
<p>The HTML is really simple, it has three divs, first for container of the glass, second for the glass and the third for the water in it. The first div(<strong><code>container</code></strong>) is not really necessary. </p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
</pre>
<pre><span class="html"><span class="html-other-element">&lt;div id=<span class="html-attribute">&quot;container&quot;</span>&gt;</span>
<span class="html-other-element">&lt;div id=<span class="html-attribute">&quot;glass&quot;</span>&gt;</span>
    <span class="html-other-element">&lt;div id=<span class="html-attribute">&quot;water&quot;</span>&gt;</span><span class="html-other-element">&lt;/div&gt;</span>
<span class="html-other-element">&lt;/div&gt;</span>
<span class="html-other-element">&lt;/div&gt;</span></span></pre>
</div>
<h2>The CSS</h2>
<p>This is where it gets a little tricky, the <strong><code>#container</code></strong> has the general styling properties for the container, the <strong><code>#glass</code></strong> again has general CSS properties of the glass. Now in <strong><code>#water</code></strong>, a background image has been used for waves for the water, you can also specify a color instead of the background image if you don&#8217;t need the waves. Then comes the <strong><code>transition</code></strong> CSS properties, transition tags are used here for the easing effect after the hover action(when the water has to fall down). Then finally <strong><code>#glass:hover #water</code></strong> comes which defines the CSS properties when the user hovers over the element, transition properties are the CSS tags responsible for these easing effects.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
</pre>
<pre><span class="css">#container {
    <span class="css-property">background<span class="css-selector">:</span><span class="css-value"> rgba( 0, 0, 0, 0.10)</span></span>;
    <span class="css-property">margin-left<span class="css-selector">:</span><span class="css-value">auto</span></span>;
    <span class="css-property">margin-right<span class="css-selector">:</span><span class="css-value">auto</span></span>;
    <span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 300px</span></span>;
    <span class="css-property">border-left<span class="css-selector">:</span><span class="css-value"> 1px solid #bbb</span></span>;
    <span class="css-property">border-right<span class="css-selector">:</span><span class="css-value"> 1px solid #bbb</span></span>;
    <span class="css-property">border-bottom<span class="css-selector">:</span><span class="css-value"> 1px solid #bbb</span></span>;
    <span class="css-property">border-top<span class="css-selector">:</span><span class="css-value"> 1px solid #ccc</span></span>;
    <span class="css-property">-webkit-border-radius<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
    <span class="css-property">-moz-border-radius<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
    <span class="css-property">border-radius<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
    <span class="css-property">padding-left<span class="css-selector">:</span><span class="css-value"> 5px</span></span>;
    <span class="css-property">padding-right<span class="css-selector">:</span><span class="css-value"> 5px</span></span>;
    <span class="css-property">padding-bottom<span class="css-selector">:</span><span class="css-value"> 30px</span></span>;
    <span class="css-property">padding-top<span class="css-selector">:</span><span class="css-value"> 5px</span></span>;
}
#glass {
    <span class="css-property">background<span class="css-selector">:</span><span class="css-value"> rgba( 255, 255, 255, 0.50)</span></span>;
    <span class="css-property">border<span class="css-selector">:</span><span class="css-value"> 1px solid #bbb</span></span>;
    <span class="css-property">border-top<span class="css-selector">:</span><span class="css-value"> 1px solid #eee</span></span>;
    <span class="css-property">-webkit-border-radius<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
    <span class="css-property">-moz-border-radius<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
    <span class="css-property">border-radius<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
    <span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 300px</span></span>;
    <span class="css-property">height<span class="css-selector">:</span><span class="css-value"> 400px</span></span>;
    <span class="css-property">position<span class="css-selector">:</span><span class="css-value"> relative</span></span>;
}
#water {
    <span class="css-property">background-image<span class="css-selector">:</span><span class="css-value"> url(<span class="css-string">&quot;waves.png&quot;</span>)</span></span>;
    <span class="css-property">background-position<span class="css-selector">:</span><span class="css-value"> top right</span></span>;
    <span class="css-property">position<span class="css-selector">:</span><span class="css-value"> absolute</span></span>;
    <span class="css-property">bottom<span class="css-selector">:</span><span class="css-value"> 0px</span></span>;
    <span class="css-property">width<span class="css-selector">:</span><span class="css-value"> 300px</span></span>;
    <span class="css-property">height<span class="css-selector">:</span><span class="css-value"> 100px</span></span>;
    <span class="css-property">-webkit-transition<span class="css-selector">:</span><span class="css-value"> all 3s ease-out</span></span>;
    <span class="css-property">-moz-transition<span class="css-selector">:</span><span class="css-value"> all 3s ease-out</span></span>;
    <span class="css-property">-o-transition<span class="css-selector">:</span><span class="css-value"> all 3s ease-out</span></span>;
    transition: all 3s ease-out;
    <span class="css-property">-webkit-border-radius<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
    <span class="css-property">-moz-border-radius<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
    <span class="css-property">border-radius<span class="css-selector">:</span><span class="css-value"> 10px</span></span>;
}
#glass:hover #water {
    <span class="css-property">height<span class="css-selector">:</span><span class="css-value"> 350px</span></span>;
    <span class="css-property">background-position<span class="css-selector">:</span><span class="css-value"> top left</span></span>;
    <span class="css-property">-webkit-transition<span class="css-selector">:</span><span class="css-value"> all 3s ease-out</span></span>;
    <span class="css-property">-moz-transition<span class="css-selector">:</span><span class="css-value"> all 3s ease-out</span></span>;
    <span class="css-property">-o-transition<span class="css-selector">:</span><span class="css-value"> all 3s ease-out</span></span>;
    transition: all 3s ease-out;
}</span></pre>
</div>
<h2>Demonstration</h2>
<p>Here is a demonstration below for filling a glass with water, alternatively you can click <a href="http://www.priteshgupta.com/demos/fill/" target="_blank">here</a>.<br />
<iframe src="http://www.priteshgupta.com/demos/fill" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:550px; height: 500px; margin-left: 15px;" allowTransparency="true"></iframe><br />
Or if you don&#8217;t like the waves(Or click <a href="http://www.priteshgupta.com/demos/fill/index-without-wave.html" target="_blank">here</a>).<br />
<iframe src="http://www.priteshgupta.com/demos/fill/index-without-wave.html" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:550px; height: 500px; margin-left: 15px;" allowTransparency="true"></iframe></p>
<h2>Further Reading</h2>
<p>Below are the pages of CSS properties used in above snippets.<br />
<div class="shortcode-unorderedlist arrow"></p>
<ul>
<li><a href="https://developer.mozilla.org/en/CSS/-moz-transition" target="_blank">transition &#8211; MDC Docs</a></li>
<li><a href="http://www.webkit.org/blog/138/css-animation/" target="_blank">Surfin&#039; Safari &#8211; Blog Archive  &raquo; CSS Animation</a></li>
<li><a href="http://www.opera.com/docs/specs/presto23/css/transitions/" target="_blank">Opera: CSS3 Transitions support in Opera Presto 2.3</a></li>
</ul>
<p></div>
</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Filling+a+Glass+with+Water+%28Using+CSS3%29&amp;link=http://www.priteshgupta.com/2011/07/filling-a-glass-with-water-using-html5/&amp;notes=HTML5%20is%20amazing%20and%20list%20of%20things%20which%20can%20be%20done%20using%20it%20is%20endless.%20Anyways%2C%20I%20am%20sharing%20how%20we%20can%20fill%20an%20empty%20glass%20with%20water%20using%20HTML5%2C%20I%20am%20sharing%20the%20code%20snippets%20for%20it.%20Let%20me%20know%20your%20thoughts%20on%20it.%20A%20modern%20web%20browser%28Like%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20will%20be%20needed%20for&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Filling+a+Glass+with+Water+%28Using+CSS3%29&amp;link=http://www.priteshgupta.com/2011/07/filling-a-glass-with-water-using-html5/&amp;notes=HTML5%20is%20amazing%20and%20list%20of%20things%20which%20can%20be%20done%20using%20it%20is%20endless.%20Anyways%2C%20I%20am%20sharing%20how%20we%20can%20fill%20an%20empty%20glass%20with%20water%20using%20HTML5%2C%20I%20am%20sharing%20the%20code%20snippets%20for%20it.%20Let%20me%20know%20your%20thoughts%20on%20it.%20A%20modern%20web%20browser%28Like%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20will%20be%20needed%20for&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Filling+a+Glass+with+Water+%28Using+CSS3%29&amp;link=http://www.priteshgupta.com/2011/07/filling-a-glass-with-water-using-html5/&amp;notes=HTML5%20is%20amazing%20and%20list%20of%20things%20which%20can%20be%20done%20using%20it%20is%20endless.%20Anyways%2C%20I%20am%20sharing%20how%20we%20can%20fill%20an%20empty%20glass%20with%20water%20using%20HTML5%2C%20I%20am%20sharing%20the%20code%20snippets%20for%20it.%20Let%20me%20know%20your%20thoughts%20on%20it.%20A%20modern%20web%20browser%28Like%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20will%20be%20needed%20for&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Filling+a+Glass+with+Water+%28Using+CSS3%29&amp;link=http://www.priteshgupta.com/2011/07/filling-a-glass-with-water-using-html5/&amp;notes=HTML5%20is%20amazing%20and%20list%20of%20things%20which%20can%20be%20done%20using%20it%20is%20endless.%20Anyways%2C%20I%20am%20sharing%20how%20we%20can%20fill%20an%20empty%20glass%20with%20water%20using%20HTML5%2C%20I%20am%20sharing%20the%20code%20snippets%20for%20it.%20Let%20me%20know%20your%20thoughts%20on%20it.%20A%20modern%20web%20browser%28Like%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20will%20be%20needed%20for&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Filling+a+Glass+with+Water+%28Using+CSS3%29&amp;link=http://www.priteshgupta.com/2011/07/filling-a-glass-with-water-using-html5/&amp;notes=HTML5%20is%20amazing%20and%20list%20of%20things%20which%20can%20be%20done%20using%20it%20is%20endless.%20Anyways%2C%20I%20am%20sharing%20how%20we%20can%20fill%20an%20empty%20glass%20with%20water%20using%20HTML5%2C%20I%20am%20sharing%20the%20code%20snippets%20for%20it.%20Let%20me%20know%20your%20thoughts%20on%20it.%20A%20modern%20web%20browser%28Like%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20will%20be%20needed%20for&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.priteshgupta.com/2011/07/filling-a-glass-with-water-using-html5/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Filling+a+Glass+with+Water+%28Using+CSS3%29&amp;link=http://www.priteshgupta.com/2011/07/filling-a-glass-with-water-using-html5/&amp;notes=HTML5%20is%20amazing%20and%20list%20of%20things%20which%20can%20be%20done%20using%20it%20is%20endless.%20Anyways%2C%20I%20am%20sharing%20how%20we%20can%20fill%20an%20empty%20glass%20with%20water%20using%20HTML5%2C%20I%20am%20sharing%20the%20code%20snippets%20for%20it.%20Let%20me%20know%20your%20thoughts%20on%20it.%20A%20modern%20web%20browser%28Like%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20will%20be%20needed%20for&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Filling+a+Glass+with+Water+%28Using+CSS3%29&amp;link=http://www.priteshgupta.com/2011/07/filling-a-glass-with-water-using-html5/&amp;notes=HTML5%20is%20amazing%20and%20list%20of%20things%20which%20can%20be%20done%20using%20it%20is%20endless.%20Anyways%2C%20I%20am%20sharing%20how%20we%20can%20fill%20an%20empty%20glass%20with%20water%20using%20HTML5%2C%20I%20am%20sharing%20the%20code%20snippets%20for%20it.%20Let%20me%20know%20your%20thoughts%20on%20it.%20A%20modern%20web%20browser%28Like%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20will%20be%20needed%20for&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.shareaholic.com/api/share/?title=Filling+a+Glass+with+Water+%28Using+CSS3%29&amp;link=http://www.priteshgupta.com/2011/07/filling-a-glass-with-water-using-html5/&amp;notes=HTML5%20is%20amazing%20and%20list%20of%20things%20which%20can%20be%20done%20using%20it%20is%20endless.%20Anyways%2C%20I%20am%20sharing%20how%20we%20can%20fill%20an%20empty%20glass%20with%20water%20using%20HTML5%2C%20I%20am%20sharing%20the%20code%20snippets%20for%20it.%20Let%20me%20know%20your%20thoughts%20on%20it.%20A%20modern%20web%20browser%28Like%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20will%20be%20needed%20for&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=43&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.priteshgupta.com/2011/07/filling-a-glass-with-water-using-html5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Optimize Website Load Time &#124; Compression Tools and Techniques</title>
		<link>http://www.priteshgupta.com/2011/06/optimize-website-load-time-compression-tools-techniques/</link>
		<comments>http://www.priteshgupta.com/2011/06/optimize-website-load-time-compression-tools-techniques/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 16:07:25 +0000</pubDate>
		<dc:creator>Pritesh Gupta</dc:creator>
				<category><![CDATA[Design and Development]]></category>
		<category><![CDATA[Add-ons]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Extension]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://www.priteshgupta.com/?p=1241</guid>
		<description><![CDATA[While making websites we often consider using a lot of scripts and styles in order to increase interactivity and make the website richer. As a result, we end up with slow website, while you can of course remove those scripts and styles to make it load faster Or you can make is load faster without [...]]]></description>
			<content:encoded><![CDATA[<p>While making websites we often consider using a lot of scripts and styles in order to increase interactivity and make the website richer. As a result, we end up with slow website, while you can of course remove those scripts and styles to make it load faster Or you can make is load faster without removing any functionality by doing some easy tricks.</p>
<h2>Compressing JavaScript</h2>
<p>While compressing JavaScript is most recommended and has a great impact in website load time(Generally they are already compressed for many jQuery plugins). There are many tools and methods using which you can compress JavaScript, few most common tools are <strong><a title="Yahoo's YUI Compressor" href="http://developer.yahoo.com/yui/compressor/" target="_blank">Yahoo&#8217;s YUI Compressor</a></strong>, <strong><a title="Dean Edwards' Packer" href="http://dean.edwards.name/packer/" target="_blank">Dean Edwards&#8217; Packer</a></strong>, <strong><a title="Douglas Crockford's JSMin" href="http://www.crockford.com/javascript/jsmin.html" target="_blank">Douglas Crockford&#8217;s JSMin</a></strong>, <strong><a title="Dojo ShrinkSafe" href="http://shrinksafe.dojotoolkit.org/" target="_blank">Dojo ShrinkSafe</a></strong> and <strong><a title="gzip" href="http://www.gzip.org/" target="_blank">gzip</a></strong> or <strong><a title="htaccess" href="http://httpd.apache.org/docs/1.3/howto/htaccess.html" target="_blank">htaccess</a></strong>(explained later), these things may be sounding strange, but using them is very easy. These JavaScript minification tools preserve all the features of the JavaScript code, but reduce the code size by compressing them. There is no &#8216;best&#8217; JavaScript compressor, each one of them have  their  plus and minus, but you can always compare between the compressors at <strong><a title="JavaScript Compressor and Comparison Tool" href="http://compressorrater.thruhere.net/" target="_blank">http://compressorrater.thruhere.net/</a></strong>, its really a nice tool.</p>
<h2>Compressing CSS</h2>
<p>CSS compressing is also a good technique to optimize website&#8217;s load time, there are many CSS minification tools too. Here is a great article on Design Shack for CSS Minification, you should definitely head over: <a title="18 CSS Compression Tools and Techniques" href="http://designshack.co.uk/articles/css/18-css-compression-tools-and-techniques" target="_blank"><strong>18 CSS Compression Tools and Techniques</strong></a> and one more at Cats Who Code which explains how you can do it just by PHP: <strong><a title="3 ways to compress CSS files using PHP" href="http://www.catswhocode.com/blog/3-ways-to-compress-css-files-using-php" target="_blank">3 ways to compress CSS files using PHP</a></strong>.</p>
<h2>gzip and htaccess</h2>
<p>Understanding simply, if you use gzip or htaccess compression, what happens is your website files gets compressed, and the compressed files are send over to the web browser, and the web browser extracts it and shows it to the users. It reduces response time by reducing the size of the HTTP response, this trick is definitely beneficial. There are many tutorials for gzip compression, a good one is at Samuel Santos&#8217; blog: <strong><a title="Improving web performance with Apache and htaccess" href="http://www.samaxes.com/2011/05/improving-web-performance-with-apache-and-htaccess/" target="_blank">Improving web performance with Apache and htaccess</a></strong>.</p>
<h2>Compressor Tools</h2>
<p>There are many websites where you can compress your code, here I am including some of the noteworthy ones.<br />
<a href="http://www.cssdrive.com/index.php/main/csscompressor" target="_blank"><br />
<h2>CSS Drive Gallery- CSS Compressor</h2>
<p></a><br />
<img src ="http://www.priteshgupta.com/wp-content/uploads/2011/06/CSS-Drive-Gallery-CSS-Compressor.png" alt="CSS Drive Gallery  CSS Compressor" title="CSS Drive Gallery  CSS Compressor" width="580" height="414" class="alignnone" /></p>
<p><a href="http://compressor.ebiene.de/" target="_blank"><br />
<h2>Compressor.Ebiene.de</h2>
<p></a><br />
<img src ="http://www.priteshgupta.com/wp-content/uploads/2011/06/Compress-javascript-and-css.-Amazing-code-compression.-Quick-easy-and-free.png" alt="Compress javascript and css. Amazing code compression. Quick easy and free" title="Compress javascript and css. Amazing code compression. Quick easy and free" width="580" height="414" class="alignnone" /></p>
<p><a href="http://dean.edwards.name/packer/" target="_blank"><br />
<h2>/packer/</h2>
<p></a><br />
<img src ="http://www.priteshgupta.com/wp-content/uploads/2011/06/packer.png" alt="packer" title="packer" width="580" height="414" class="alignnone" /></p>
<p><a href="http://javascriptcompressor.com/" target="_blank"><br />
<h2>Javascript Compressor</h2>
<p></a><br />
<img src ="http://www.priteshgupta.com/wp-content/uploads/2011/06/Javascript-Compressor-compress-code-online-for-free.png" alt="Javascript Compressor   compress code online for free" title="Javascript Compressor   compress code online for free" width="580" height="414" class="alignnone" /></p>
<p><a href="http://www.csscompressor.com/" target="_blank"><br />
<h2>CSS Compressor</h2>
<p></a><br />
<img src ="http://www.priteshgupta.com/wp-content/uploads/2011/06/CSS-Compressor-Online-code-compressor-for-Cascading-Style-Sheets.png" alt="CSS Compressor   Online code compressor for Cascading Style Sheets" title="CSS Compressor   Online code compressor for Cascading Style Sheets" width="580" height="414" class="alignnone" /></p>
<p><a href="http://jscompress.com/" target="_blank"><br />
<h2>Minify/Pack Javascript Online</h2>
<p></a><br />
<img src ="http://www.priteshgupta.com/wp-content/uploads/2011/06/Minify-Javascript-Online-Online-JavaScript-Packer.png" alt="Minify Javascript Online   Online JavaScript Packer" title="Minify Javascript Online   Online JavaScript Packer" width="580" height="414" class="alignnone" /></p>
<p><a href="http://www.refresh-sf.com/yui/" target="_blank"><br />
<h2>Online YUI Compressor</h2>
<p></a><br />
<img src ="http://www.priteshgupta.com/wp-content/uploads/2011/06/Online-YUI-Compressor.png" alt="Online YUI Compressor" title="Online YUI Compressor" width="580" height="414" class="alignnone" /></p>
<h2>Performance Tools</h2>
<p>There are few extensions/add-ons too using which you can check the performance of your website and suggests ways to improve the performance. One of them is <strong><a title="YSlow" href="http://developer.yahoo.com/yslow/" target="_blank">YSlow</a></strong> by Yahoo, it has a <strong><a title="YSlow" href="https://addons.mozilla.org/en-US/firefox/addon/yslow/" target="_blank">Firefox Add-on</a></strong> as well as a <strong><a title="YSlow" href="https://chrome.google.com/webstore/detail/ninejjcohidippngpapiilnmkgllmakh" target="_blank">Chrome Extension</a></strong>. There is one more web based tool <a title="Page Speed Online" href="http://pagespeed.googlelabs.com/" target="_blank"><strong>Page Speed Online</strong></a> hosted at Google Labs, which is equally good. There is also a simple gzip test tool: <strong><a title="GIDZipTest" href="http://www.gidnetwork.com/tools/gzip-test.php" target="_blank">GIDZipTest</a>.</strong></p>
<h2>Conclusion</h2>
<p>Our website&#8217;s performance is an important factor, and one of the main things in it is the website load time, if our websites are slow, there are chances that user won&#8217;t return. Also, these compression techniques are easily doable by editing the .htaccess file or by adding simple snippets using php or using those web based tools. Thus, you should definitely consider doing these tricks.</p>
<p>&nbsp;</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Optimize+Website+Load+Time+%7C+Compression+Tools+and+Techniques&amp;link=http://www.priteshgupta.com/2011/06/optimize-website-load-time-compression-tools-techniques/&amp;notes=While%20making%20websites%20we%20often%20consider%20using%20a%20lot%20of%20scripts%20and%20styles%20in%20order%20to%20increase%20interactivity%20and%20make%20the%20website%20richer.%20As%20a%20result%2C%20we%20end%20up%20with%20slow%20website%2C%20while%20you%20can%20of%20course%20remove%20those%20scripts%20and%20styles%20to%20make%20it%20load%20faster%20Or%20you%20can%20make%20is%20load%20faster%20without%20re&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Optimize+Website+Load+Time+%7C+Compression+Tools+and+Techniques&amp;link=http://www.priteshgupta.com/2011/06/optimize-website-load-time-compression-tools-techniques/&amp;notes=While%20making%20websites%20we%20often%20consider%20using%20a%20lot%20of%20scripts%20and%20styles%20in%20order%20to%20increase%20interactivity%20and%20make%20the%20website%20richer.%20As%20a%20result%2C%20we%20end%20up%20with%20slow%20website%2C%20while%20you%20can%20of%20course%20remove%20those%20scripts%20and%20styles%20to%20make%20it%20load%20faster%20Or%20you%20can%20make%20is%20load%20faster%20without%20re&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Optimize+Website+Load+Time+%7C+Compression+Tools+and+Techniques&amp;link=http://www.priteshgupta.com/2011/06/optimize-website-load-time-compression-tools-techniques/&amp;notes=While%20making%20websites%20we%20often%20consider%20using%20a%20lot%20of%20scripts%20and%20styles%20in%20order%20to%20increase%20interactivity%20and%20make%20the%20website%20richer.%20As%20a%20result%2C%20we%20end%20up%20with%20slow%20website%2C%20while%20you%20can%20of%20course%20remove%20those%20scripts%20and%20styles%20to%20make%20it%20load%20faster%20Or%20you%20can%20make%20is%20load%20faster%20without%20re&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Optimize+Website+Load+Time+%7C+Compression+Tools+and+Techniques&amp;link=http://www.priteshgupta.com/2011/06/optimize-website-load-time-compression-tools-techniques/&amp;notes=While%20making%20websites%20we%20often%20consider%20using%20a%20lot%20of%20scripts%20and%20styles%20in%20order%20to%20increase%20interactivity%20and%20make%20the%20website%20richer.%20As%20a%20result%2C%20we%20end%20up%20with%20slow%20website%2C%20while%20you%20can%20of%20course%20remove%20those%20scripts%20and%20styles%20to%20make%20it%20load%20faster%20Or%20you%20can%20make%20is%20load%20faster%20without%20re&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Optimize+Website+Load+Time+%7C+Compression+Tools+and+Techniques&amp;link=http://www.priteshgupta.com/2011/06/optimize-website-load-time-compression-tools-techniques/&amp;notes=While%20making%20websites%20we%20often%20consider%20using%20a%20lot%20of%20scripts%20and%20styles%20in%20order%20to%20increase%20interactivity%20and%20make%20the%20website%20richer.%20As%20a%20result%2C%20we%20end%20up%20with%20slow%20website%2C%20while%20you%20can%20of%20course%20remove%20those%20scripts%20and%20styles%20to%20make%20it%20load%20faster%20Or%20you%20can%20make%20is%20load%20faster%20without%20re&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.priteshgupta.com/2011/06/optimize-website-load-time-compression-tools-techniques/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Optimize+Website+Load+Time+%7C+Compression+Tools+and+Techniques&amp;link=http://www.priteshgupta.com/2011/06/optimize-website-load-time-compression-tools-techniques/&amp;notes=While%20making%20websites%20we%20often%20consider%20using%20a%20lot%20of%20scripts%20and%20styles%20in%20order%20to%20increase%20interactivity%20and%20make%20the%20website%20richer.%20As%20a%20result%2C%20we%20end%20up%20with%20slow%20website%2C%20while%20you%20can%20of%20course%20remove%20those%20scripts%20and%20styles%20to%20make%20it%20load%20faster%20Or%20you%20can%20make%20is%20load%20faster%20without%20re&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=Optimize+Website+Load+Time+%7C+Compression+Tools+and+Techniques&amp;link=http://www.priteshgupta.com/2011/06/optimize-website-load-time-compression-tools-techniques/&amp;notes=While%20making%20websites%20we%20often%20consider%20using%20a%20lot%20of%20scripts%20and%20styles%20in%20order%20to%20increase%20interactivity%20and%20make%20the%20website%20richer.%20As%20a%20result%2C%20we%20end%20up%20with%20slow%20website%2C%20while%20you%20can%20of%20course%20remove%20those%20scripts%20and%20styles%20to%20make%20it%20load%20faster%20Or%20you%20can%20make%20is%20load%20faster%20without%20re&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.shareaholic.com/api/share/?title=Optimize+Website+Load+Time+%7C+Compression+Tools+and+Techniques&amp;link=http://www.priteshgupta.com/2011/06/optimize-website-load-time-compression-tools-techniques/&amp;notes=While%20making%20websites%20we%20often%20consider%20using%20a%20lot%20of%20scripts%20and%20styles%20in%20order%20to%20increase%20interactivity%20and%20make%20the%20website%20richer.%20As%20a%20result%2C%20we%20end%20up%20with%20slow%20website%2C%20while%20you%20can%20of%20course%20remove%20those%20scripts%20and%20styles%20to%20make%20it%20load%20faster%20Or%20you%20can%20make%20is%20load%20faster%20without%20re&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=43&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.priteshgupta.com/2011/06/optimize-website-load-time-compression-tools-techniques/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CSS3 Magnification / Enlarge / Scale Effect</title>
		<link>http://www.priteshgupta.com/2011/06/html5-magnification-enlarge-scale-effect/</link>
		<comments>http://www.priteshgupta.com/2011/06/html5-magnification-enlarge-scale-effect/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 05:29:59 +0000</pubDate>
		<dc:creator>Pritesh Gupta</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.priteshgupta.com/?p=874</guid>
		<description><![CDATA[In this article I will share how we can have pure HTML5 magnification or enlarge or scale effect for various elements in a web page, with easing effects, by only using CSS3, that is without using any JavaScript or jQuery Plugin, of course a modern web browser(Recent Firefox, Chrome, Opera, Safari) will be needed for [...]]]></description>
			<content:encoded><![CDATA[<p>In this article I will share how we can have pure <strong>HTML5</strong> magnification or enlarge or scale effect for various elements in a web page, with easing effects, by only using CSS3, that is <strong>without</strong> using any JavaScript or jQuery Plugin, of course a modern web browser(Recent Firefox, Chrome, Opera, Safari) will be needed for it. The live demonstration of this can be seen at the end of this post.  </p>
<h2>The CSS</h2>
<p>The CSS has 2 parts, one for default effects and the other one for hover effects, following are the CSS snippets: </p>
<h3>Default CSS for the element</h3>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre>
<pre><span class="css"><span class="css-property">-webkit-transition<span class="css-selector">:</span><span class="css-value"> all 200ms linear</span></span>;
	<span class="css-property">-moz-transition<span class="css-selector">:</span><span class="css-value"> all 200ms linear</span></span>;
	<span class="css-property">-o-transition<span class="css-selector">:</span><span class="css-value"> all 200ms linear</span></span>;
	transition: all 200ms linear;
	<span class="css-property">-webkit-transform<span class="css-selector">:</span><span class="css-value"> translateZ(0)</span></span>;
	<span class="css-property">-moz-transform<span class="css-selector">:</span><span class="css-value"> translateZ(0)</span></span>;
	<span class="css-property">-o-transform<span class="css-selector">:</span><span class="css-value"> translateZ(0)</span></span>;
	transform: translateZ(0);</span></pre>
</div>
<h3>Hover CSS for the element</h3>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
</pre>
<pre><span class="css"><span class="css-property">-webkit-transform<span class="css-selector">:</span><span class="css-value"> scale(1.1) translateZ(0)</span></span>;
	<span class="css-property">-moz-transform<span class="css-selector">:</span><span class="css-value"> scale(1.1) translateZ(0)</span></span>;
	<span class="css-property">-o-transform<span class="css-selector">:</span><span class="css-value"> scale(1.1) translateZ(0)</span></span>;
	transform: scale(1.1) translateZ(0);</span></pre>
</div>
<h2>Demonstration</h2>
<p>When the above snippets will be implemented correctly, they will give you the magnification / enlarge / scale effect, I am also including a demonstration for how it will look live. I have used the above two CSS codes for the headline and the image.<br />
<iframe src="http://www.priteshgupta.com/demos/scale" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:550px; height: 300px; margin-left: 15px;" allowTransparency="true"></iframe><br />
Alternatively, you can see it <a href="http://www.priteshgupta.com/demos/scale" target="_blank">here</a>.</p>
<h2>Further Reading</h2>
<p>You can also try out <a href="http://www.dailycoding.com/Posts/imagelens__a_jquery_plugin_for_lens_effect_image_zooming.aspx">ImageLens</a> which is a jQuery plugin for giving lens effect while zooming images. Also, below are the pages of CSS properties used in above snippets.<br />
<div class="shortcode-unorderedlist arrow"></p>
<ul>
<li><a href="https://developer.mozilla.org/en/CSS/-moz-transition" target="_blank">transition &#8211; MDC Docs</a></li>
<li><a href="https://developer.mozilla.org/en/css/-moz-transform" target="_blank">-moz-transform &#8211; MDC Docs</a></li>
<li><a href="http://www.webkit.org/blog/138/css-animation/" target="_blank">Surfin&#039; Safari &#8211; Blog Archive  &raquo; CSS Animation</a></li>
<li><a href="http://www.webkit.org/blog/130/css-transforms/" target="_blank">Surfin&#039; Safari &#8211; Blog Archive  &raquo; CSS Transforms</a></li>
<li><a href="http://www.opera.com/docs/specs/presto23/css/transitions/" target="_blank">Opera: CSS3 Transitions support in Opera Presto 2.3</a></li>
<li><a href="http://www.opera.com/docs/specs/presto24/css/transforms/" target="_blank">Opera: CSS3 2D Transforms support in Opera Presto 2.4</a></li>
</ul>
<p></div>
</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Magnification+%2F+Enlarge+%2F+Scale+Effect&amp;link=http://www.priteshgupta.com/2011/06/html5-magnification-enlarge-scale-effect/&amp;notes=In%20this%20article%20I%20will%20share%20how%20we%20can%20have%20pure%20HTML5%20magnification%20or%20enlarge%20or%20scale%20effect%20for%20various%20elements%20in%20a%20web%20page%2C%20with%20easing%20effects%2C%20by%20only%20using%20CSS3%2C%20that%20is%20without%20using%20any%20JavaScript%20or%20jQuery%20Plugin%2C%20of%20course%20a%20modern%20web%20browser%28Recent%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Magnification+%2F+Enlarge+%2F+Scale+Effect&amp;link=http://www.priteshgupta.com/2011/06/html5-magnification-enlarge-scale-effect/&amp;notes=In%20this%20article%20I%20will%20share%20how%20we%20can%20have%20pure%20HTML5%20magnification%20or%20enlarge%20or%20scale%20effect%20for%20various%20elements%20in%20a%20web%20page%2C%20with%20easing%20effects%2C%20by%20only%20using%20CSS3%2C%20that%20is%20without%20using%20any%20JavaScript%20or%20jQuery%20Plugin%2C%20of%20course%20a%20modern%20web%20browser%28Recent%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Magnification+%2F+Enlarge+%2F+Scale+Effect&amp;link=http://www.priteshgupta.com/2011/06/html5-magnification-enlarge-scale-effect/&amp;notes=In%20this%20article%20I%20will%20share%20how%20we%20can%20have%20pure%20HTML5%20magnification%20or%20enlarge%20or%20scale%20effect%20for%20various%20elements%20in%20a%20web%20page%2C%20with%20easing%20effects%2C%20by%20only%20using%20CSS3%2C%20that%20is%20without%20using%20any%20JavaScript%20or%20jQuery%20Plugin%2C%20of%20course%20a%20modern%20web%20browser%28Recent%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Magnification+%2F+Enlarge+%2F+Scale+Effect&amp;link=http://www.priteshgupta.com/2011/06/html5-magnification-enlarge-scale-effect/&amp;notes=In%20this%20article%20I%20will%20share%20how%20we%20can%20have%20pure%20HTML5%20magnification%20or%20enlarge%20or%20scale%20effect%20for%20various%20elements%20in%20a%20web%20page%2C%20with%20easing%20effects%2C%20by%20only%20using%20CSS3%2C%20that%20is%20without%20using%20any%20JavaScript%20or%20jQuery%20Plugin%2C%20of%20course%20a%20modern%20web%20browser%28Recent%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Magnification+%2F+Enlarge+%2F+Scale+Effect&amp;link=http://www.priteshgupta.com/2011/06/html5-magnification-enlarge-scale-effect/&amp;notes=In%20this%20article%20I%20will%20share%20how%20we%20can%20have%20pure%20HTML5%20magnification%20or%20enlarge%20or%20scale%20effect%20for%20various%20elements%20in%20a%20web%20page%2C%20with%20easing%20effects%2C%20by%20only%20using%20CSS3%2C%20that%20is%20without%20using%20any%20JavaScript%20or%20jQuery%20Plugin%2C%20of%20course%20a%20modern%20web%20browser%28Recent%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-comfeed">
			<a href="http://www.priteshgupta.com/2011/06/html5-magnification-enlarge-scale-effect/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Magnification+%2F+Enlarge+%2F+Scale+Effect&amp;link=http://www.priteshgupta.com/2011/06/html5-magnification-enlarge-scale-effect/&amp;notes=In%20this%20article%20I%20will%20share%20how%20we%20can%20have%20pure%20HTML5%20magnification%20or%20enlarge%20or%20scale%20effect%20for%20various%20elements%20in%20a%20web%20page%2C%20with%20easing%20effects%2C%20by%20only%20using%20CSS3%2C%20that%20is%20without%20using%20any%20JavaScript%20or%20jQuery%20Plugin%2C%20of%20course%20a%20modern%20web%20browser%28Recent%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-technorati">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Magnification+%2F+Enlarge+%2F+Scale+Effect&amp;link=http://www.priteshgupta.com/2011/06/html5-magnification-enlarge-scale-effect/&amp;notes=In%20this%20article%20I%20will%20share%20how%20we%20can%20have%20pure%20HTML5%20magnification%20or%20enlarge%20or%20scale%20effect%20for%20various%20elements%20in%20a%20web%20page%2C%20with%20easing%20effects%2C%20by%20only%20using%20CSS3%2C%20that%20is%20without%20using%20any%20JavaScript%20or%20jQuery%20Plugin%2C%20of%20course%20a%20modern%20web%20browser%28Recent%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=10&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.shareaholic.com/api/share/?title=CSS3+Magnification+%2F+Enlarge+%2F+Scale+Effect&amp;link=http://www.priteshgupta.com/2011/06/html5-magnification-enlarge-scale-effect/&amp;notes=In%20this%20article%20I%20will%20share%20how%20we%20can%20have%20pure%20HTML5%20magnification%20or%20enlarge%20or%20scale%20effect%20for%20various%20elements%20in%20a%20web%20page%2C%20with%20easing%20effects%2C%20by%20only%20using%20CSS3%2C%20that%20is%20without%20using%20any%20JavaScript%20or%20jQuery%20Plugin%2C%20of%20course%20a%20modern%20web%20browser%28Recent%20Firefox%2C%20Chrome%2C%20Opera%2C%20Safari%29%20w&amp;short_link=&amp;shortener=bitly&amp;shortener_key=pritesh|R_8243b649eae0deae42b22a17e45e858c&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=43&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.priteshgupta.com/2011/06/html5-magnification-enlarge-scale-effect/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using disk: enhanced

Served from: www.priteshgupta.com @ 2012-02-06 08:15:15 -->
