...

View Full Version : Display part of the picture.



winsonlee
05-21-2005, 07:19 PM
with the existing code, i am able to display a picture till the width of the mapBox. Eg if the pic is 1200 and the box is 600, it is able to display half the picture in the box only. the pic displayed is from 0-600. I wonder if there is any way i can display from 600-1200 which is the next half of the picture in the mapBox ??




<style type="text/css"> <!--
body {
background-image: url(files/bg.gif);

}
div#mapBox,
{
top:130px;
left:300px;
width:600px;
height:450px;
position:absolute;
overflow:hidden;
}
--></style>

<script language="JavaScript">
function init(){
obj=document.getElementById("mapImage");

obj.width = 1200;
obj.height= 1200;
cursorLocation();

}
</script>

<body topmargin="0" leftmargin="0" mar onload="init()">

<div id="mapBox">
<img id="mapImage" img src="files/final2.gif" onclick="zoom(1.2)">
</div>

BaldEagle
05-21-2005, 08:16 PM
Not sure if this the solution you are looking for, but overflow: auto; will add scrollbars in both directions.

BaldEagle

vwphillips
05-21-2005, 11:56 PM
see

http://www.vicsjavascripts.org.uk/DisplayPartImage/DisplayPartImage.htm

http://www.vicsjavascripts.org.uk/ImageViewer/ImageViewer.htm

http://www.vicsjavascripts.org.uk/ClipEffects/ClipEffects.htm



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum