Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    May 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Display part of the picture.

    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 ??

    Code:
    <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>

  • #2
    Regular Coder
    Join Date
    Apr 2005
    Location
    Lisbon, CT
    Posts
    339
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Not sure if this the solution you are looking for, but overflow: auto; will add scrollbars in both directions.

    BaldEagle

  • #3
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,495
    Thanks
    3
    Thanked 500 Times in 487 Posts


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •