By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,384 Members | 1,829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,384 IT Pros & Developers. It's quick & easy.

About Image Scrolling with scrollbar

P: n/a
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

Feb 6 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a
> 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>

Feb 6 '06 #2

P: n/a
Thanks a lot it's working

Regards,
Jatin

Feb 6 '06 #3

P: n/a
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>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Feb 6 '06 #4

P: n/a
Thanks

Feb 6 '06 #5

P: n/a
Thanks Looks working

Feb 6 '06 #6

P: n/a
pjSoni wrote on 06 feb 2006 in comp.lang.javascript:
Thanks


Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at the
top of the article, then click on the "Reply" at the bottom of the article
headers. <http://www.safalra.com/special/googlegroupsreply/>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Feb 6 '06 #7

P: n/a
HI,

Sure I'll take care and will 'Reply' as you said.

Thanks,

Regards,
Jatin

Evertjan. wrote:
pjSoni wrote on 06 feb 2006 in comp.lang.javascript:
Thanks


Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at the
top of the article, then click on the "Reply" at the bottom of the article
headers. <http://www.safalra.com/special/googlegroupsreply/>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Feb 9 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.