Actually, this:
Code:
div#preload-images{
position: absolue ;
overflow: hidden ;
left: -9999px ;
top: -9999px ;
height: 1px ;
width: 1px ;
}
belongs in your stylesheet:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>pas2</title>
<style type="text/css"><!--body{cursor:crosshair}-->
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=utf-8" />
</style>
Which is totally invalid, but that's probably just owing to a mistake in how you put it into the code, the above should be like (the highlighted part is the now valid stylesheet), that other stuff needs to come before it and not be duplicated:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>pas2</title>
<meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=utf-8" />
<style type="text/css"><!--
body{cursor:crosshair}
-->
</style>
Now we can add the preload division's css codes to the valid stylesheet:
Code:
<style type="text/css"><!--
body{cursor:crosshair}
div#preload-images {
position: absolue;
overflow: hidden;
left: -9999px;
top: -9999px;
height: 1px;
width: 1px;
}
-->
</style>
Once you have that, you may place a division right after the opening <body> tag:
HTML Code:
<body style="background-color: #800000">
<div id="preload-images">
<img src="http://boudhatour.wapath.com/files/kora/Step3.jpg" width="1" height="1" alt="Step4" />
<img src="http://boudhatour.wapath.com/files/kora/Map01.jpg" width="1" height="1" alt="Map01" />
<img src="http://boudhatour.wapath.com/files/kora/linija3.gif" width="1" height="1" alt="linija3" />
</div>
Don't forget to close the division as shown. Get rid of (from the beginning of the body):
Code:
<!--css code for preload image-->
<div#preload-image{
overflow:hidden;}
left:-9999px ;
top:-9999px ;
height: 1px ;
width: 1px ;
>
and (from the end of the body):
Code:
<div id="preload-images">
<img src="http://boudhatour.wapath.com/files/kora/Step3.jpg" width="1" height="1" alt="Step4" />
<img src="http://boudhatour.wapath.com/files/kora/Map01.jpg" width="1" height="1" alt="Map01" />
<img src="http://boudhatour.wapath.com/files/kora/linija3.gif" width="1" height="1" alt="linija3" />
Once you are preloading in this fashion, you no longer need (which is also invalid by the way):
Code:
<!--code javascript preload image-->
<code>
<SCRIPT LANGUAGE="JavaScript"><
image1 = new Image(200,150);
image1.src = "http://boudhatour.wapath.com/files/kora/Step3.jpg";
image2 = new Image(114,111);
image2.src = "http://boudhatour.wapath.com/files/kora/Map01.jpg";
image3 = new Image(93,3);
image3.src = "http://boudhatour.wapath.com/files/kora/linija3.gif";
>
</script>
</code>
You may now place all images you want preloaded in the preload-images division.
A note about preloading, it takes as long as loading does, so if these images appear on the page when it loads anyway (are not rollovers or other dynamic content), there is no reason to preload them. Preloading works best with small images. All images for the web, preloaded or not, should be optimized for the smallest possible byte size that still yields acceptable resolution.
Bookmarks