Images gallery with pop-ups
A javascript to open a pop-up
<script language="JavaScript" type="text/JavaScript">
<!--
function openWindow(url,name,options) {
window.open(url,name,options);
}
//-->
</script>
The gallery
Put in the head section of the page the javascript above, then create
your gallery:
<div class='gallery'>
<a href="javascript:;"
onClick="openWindow('pic001.html','Picture 001','width=400,height=580,resisable=no')">
<img alt="Picture 001" src="images/thumbnails/pic001.jpg" /></a>
[...]
</div>
The width and height values passed to the script must be the exact height
and width of the image to be displayed in the pop-up.
The picture
This is the body of the page with the picture:
<body>
<div class="pic">
<img alt="Picture 001" src="images/pics/pic001.jpg" />
</div>
</body>
The stylesheet
A dedicated stylesheet is not strictly needed, but I think it is much cleaner to keep picture related rules in a different file.
body { margin:0; }
[...]
You can obviously add any other rule you need.