About Image Scrolling with scrollbar

P

pjSoni

Hi All,

I've created .png image for chart it's size is big so I want scrollbar
below it so that user can scroll from right to left and at same time
image should be scroll. I think it can be done with javascript but I
haven't exact Idea.. If any 1 have better suggestion. Please Reply,


Regards,
Jatin
 
M

marss

I've created .png image for chart it's size is big so I want scrollbar
below it so that user can scroll from right to left and at same time
image should be scroll.

Put your image into the div with "overflow: auto". It automatically
adds scrollbars if image exceeds div dimensions:

<div style="WIDTH:100px; HEIGHT:100px; overflow: auto">
<img src="1.png">
</div>
 
E

Evertjan.

pjSoni wrote on 06 feb 2006 in comp.lang.javascript:
I've created .png image for chart it's size is big so I want scrollbar
below it so that user can scroll from right to left and at same time
image should be scroll. I think it can be done with javascript but I
haven't exact Idea.. If any 1 have better suggestion. Please Reply,

CSS will do:

<div style='overflow:scroll;width:300px;height:200px;'>
<img style='width:1200px;height:1200px;' src='my.png'>
</div>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top