PDA

View Full Version : Memory Scroller



visual
11-10-2005, 12:17 AM
Wondering if you can insert images with a table etc. into the var memorycontent= instead of text?

jscheuer1
11-10-2005, 06:23 AM
I don't see why not. I'd do something like so:


var memorycontent='<nobr><img src="pic1.jpg"><img src="pic2.jpg"></nobr>'

Just make sure to adjust:


var memoryheight="20px" //scroller height

so that it is high enough to accommodate the image(s).

vermima
11-30-2005, 07:18 PM
How would you adjust the size of the jpg inside of the scroll bar instead of making the scroll bar bigger.

vermima
11-30-2005, 07:23 PM
Also how can you to and image plus text at the same time

jscheuer1
11-30-2005, 10:59 PM
To adjust the size of the image, resize a copy of it in an image program (bilinear resampling is usually the best for this). There are other ways but, this is truly the best method, especially if you are making your image smaller. After all other editing of images is complete, they should also be optimized for web presentation. There is a DD online utility for that if you've no optimizing software that can do a better job. This type of layout worked fine here for images with captions:


var memorycontent='<nobr><table><tr><td><img src="photo1.jpg"><br><span>caption</span></td><td><img src="photo2.jpg"><br><span>caption</span></td><td><img src="photo3.jpg"><br><span>caption</span></td></tr></table></nobr>'

Images should be of the same height as each other and the 'var memoryheight' should be set to the image height + about 25px. I added this style section to the head of the page for good measure:


<style type="text/css">
#memoryscroller td {
text-align:center;
font-family:verdana, arial, sans-serif;
font-size:85%;
}
#memoryscroller td img {
padding-bottom:2px;
}
</style>

vermima
12-01-2005, 08:12 PM
That works but it puts the image on top of the caption and not to the left or right of it. Any fix for this?

vermima
12-04-2005, 06:36 PM
I figured it out. Thanks for your help.