PDA

View Full Version : (N00b) Dynamic width of Memory Scroller



dryg
06-08-2006, 11:21 AM
Hi,

In memory scroller:
http://www.dynamicdrive.com/dynamicindex2/memoryscroller.htm

var memorywidth="730px" //scroller width
var memoryheight="16px" //scroller height
var memorybgcolor="#DEFDD9" //scroller background
var memorypadding="0px" //padding applied to the scroller. 0 for non.

I need to change the memorywidth to:
pagewidth-550

I was sure I found how to do it.. but... No :(

Im sure it's easy, please help.

ddadmin
06-09-2006, 05:40 AM
Try replacing:


var memorywidth="500px"

with the below instead:


function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

var winWidth=document.all&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var memorywidth=winWidth-550+"px" //scroller width

dryg
06-09-2006, 08:45 AM
Great!

Just pasted it and it works! :)

TNKS! Thank You! Thank you..

2lick
08-24-2006, 04:31 PM
how about just to make it 100% in a table??