<?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>Php Development &#187; Html</title>
	<atom:link href="http://www.maheshchari.com/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.maheshchari.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 23 May 2010 05:10:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>css sprites image preloding</title>
		<link>http://www.maheshchari.com/css-sprites-image-preloding/</link>
		<comments>http://www.maheshchari.com/css-sprites-image-preloding/#comments</comments>
		<pubDate>Tue, 26 May 2009 12:36:17 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[Html]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[image preloading]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=101</guid>
		<description><![CDATA[Image  pre loading with css and image sprites
We discussed image pre loading with javascript in my previous post.but it can&#8217;t be use full when javascript disabled browsers (off course use disables).So i got one idea how to implement without javascript for image preloading .
With Hidden Div Element
here the trick ,we know that browser loads [...]]]></description>
			<content:encoded><![CDATA[<h1>Image  pre loading with css and image sprites</h1>
<p>We discussed <a href="http://www.maheshchari.com/javascript-image-preloading/">image pre loading with javascript </a>in my previous post.but it can&#8217;t be use full when javascript disabled browsers (off course use disables).So i got one idea how to implement without javascript for image preloading .</p>
<h3>With Hidden Div Element</h3>
<p>here the trick ,we know that browser loads all the assets (images,audio,embed elements ) as they appear in the HTML document.So we create a dive and hide and make it null style element .put the images which you want to load .</p>
<h3>using css image sprites </h3>
<p>for tri state button we need three image for each state (normal, hover, focus) by default we load normal image back ground. when we hove first time the  second image loaded . so we use images sprites. as shown <div id="attachment_104" class="wp-caption alignnone" style="width: 160px"><a href="http://www.maheshchari.com/wp-content/uploads/2009/05/ex-sprite.png"><img src="http://www.maheshchari.com/wp-content/uploads/2009/05/ex-sprite.png" alt="Sample Sprite image for tri state buttons" title="ex-sprite" width="150" height="72" class="size-full wp-image-104" /></a><p class="wp-caption-text">Sample Sprite image for tri state buttons</p></div></p>
<h3>Download Example Source code</h3>
<p><a href='http://www.maheshchari.com/wp-content/uploads/2009/05/image-preloading-with-css-sprites.rar'>image-preloading-with-css-sprites source code</a></p>
<h3>Example for HTML</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>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
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&gt;
&lt;title&gt;Image Preloading With CSS and Sprites&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;!--
please visit for detailed tutorial http://www.maheshchari.com
Here we use simple trick ,it work even without javascript
first create a div element with given style attributes specified above.
include the images  which to be preloaded.
remember put this div after the body tag,
since this element is first rendered,
all the images are loaded before they used
 --&gt;
 image-preloading-with-css-sprites
&lt;div id=&quot;preloader_div&quot;&gt; &lt;img src=&quot;amphi-thetre.jpg&quot; /&gt; &lt;img src=&quot;amphi-thetre1.jpg&quot; /&gt; &lt;img src=&quot;amphi-thetre2.jpg&quot; /&gt; &lt;img src=&quot;amphi-thetre3.jpg&quot; /&gt;&lt;img src=&quot;ex-sprite.png&quot; /&gt;&lt;/div&gt;
&lt;div id=&quot;wrapper&quot;&gt;begin your work here.&lt;/div&gt;
&lt;h3&gt;Preloading with images sprites example tri state button.&lt;/h3&gt;
&lt;ul id=&quot;tributtons&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.maheshchari.com/&quot;&gt;button1&lt;/a&gt; &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.maheshchari.com/&quot;&gt;button2&lt;/a&gt; &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.maheshchari.com/&quot;&gt;button3&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<h3>Css sample</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>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
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">&lt;style type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #00AA00;">&gt;</span>
&lt;!--
&nbsp;
<span style="color: #cc00cc;">#preloader_div</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> 
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&lt;!-- tri state buttons --<span style="color: #00AA00;">&gt;</span>
<span style="color: #cc00cc;">#tributtons</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">list-style-type</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#tributtons</span> a<span style="color: #00AA00;">,</span>a<span style="color: #3333ff;">:visited </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">ex-sprite.png</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> 
	<span style="color: #000000; font-weight: bold;">background-repeat</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">150px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">24px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">capitalize</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#tributtons</span> a<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">-24px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#tributtons</span> a<span style="color: #3333ff;">:focus </span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">-48px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
--<span style="color: #00AA00;">&gt;</span>
&lt;/style<span style="color: #00AA00;">&gt;</span></pre></td></tr></table></div>

<h3>Download Example Source code</h3>
<p><a href='http://www.maheshchari.com/wp-content/uploads/2009/05/image-preloading-with-css-sprites.rar'>image-preloading-with-css-sprites source code</a></p>
<img src="http://www.maheshchari.com/?ak_action=api_record_view&id=101&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/css-sprites-image-preloding/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>javascript image preloading</title>
		<link>http://www.maheshchari.com/javascript-image-preloading/</link>
		<comments>http://www.maheshchari.com/javascript-image-preloading/#comments</comments>
		<pubDate>Sat, 16 May 2009 21:14:17 +0000</pubDate>
		<dc:creator>mahesh chari</dc:creator>
				<category><![CDATA[Html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[image preloading]]></category>

		<guid isPermaLink="false">http://www.maheshchari.com/?p=84</guid>
		<description><![CDATA[Image Preloading with JavaScript
Now a days web visitor prefers to see fancy page designing .when designing most attractive web page ,it becomes must use lot of images ,back grounds ,animation effects.
When page becomes more attractive with lot of images, it takes time to load all the images and it consumes the user bandwidth.
Generally each embedded [...]]]></description>
			<content:encoded><![CDATA[<h1>Image Preloading with JavaScript</h1>
<p>Now a days web visitor prefers to see fancy page designing .when designing most attractive web page ,it becomes must use lot of images ,back grounds ,animation effects.<br />
When page becomes more attractive with lot of images, it takes time to load all the images and it consumes the user bandwidth.<br />
Generally each embedded page elements like images, audio, video objects are loaded when browser makes HTTP request to server. When it comes to tri state buttons, mouse over image, loading large images, the user wait to see effects at first time. After loading first time browser will cache the image.</p>
<h2>Image Object</h2>
<p>So over come this first time loading of image we use JavaScript image object for loading.<br />
We create an image object instance before web page body loaded, so the browser will make HTTP request before the required mouse over, image hover effect, tri state buttons.<br />
Most advanced browser now a days use DOM, so it works on all browser.</p>
<h2>CSS and Sprites</h2>
<p>for javascript disabled browsers we can use <a href="http://www.maheshchari.com/css-sprites-image-preloding/">css &#038; sprite image preloading</a>.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;image preload&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function preload_images(){
	img_length=preload_images.arguments.length;
	for(var i=0;i&lt;img_length;i++){
		src=preload_images.arguments[i];
		img=new Image();
		img.src=src; //here we make http request
	}
}
// we are calling the function there by making HTTP request for images before page body loads
//here we use function argument property for multiple images
//remember all the image paths can be absolute or relative
preload_images('myimg.gif','urimg.jpg');
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<h2>download source code</h2>
<p><a href='http://www.maheshchari.com/wp-content/uploads/2009/05/image-preloading-javascript.rar'>image-preloading-javascript-source-code</a></p>
<img src="http://www.maheshchari.com/?ak_action=api_record_view&id=84&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.maheshchari.com/javascript-image-preloading/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
