Results 1 to 4 of 4

Thread: (N00b) Dynamic width of Memory Scroller

  1. #1
    Join Date
    Jun 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question (N00b) Dynamic width of Memory Scroller

    Hi,

    In memory scroller:
    http://www.dynamicdrive.com/dynamici...ryscroller.htm
    Code:
    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.
    Last edited by dryg; 06-08-2006 at 01:42 PM. Reason: ?-icon

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Try replacing:

    Code:
    var memorywidth="500px"
    with the below instead:

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

  3. #3
    Join Date
    Jun 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Great!

    Just pasted it and it works!

    TNKS! Thank You! Thank you..

  4. #4
    Join Date
    Jul 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    how about just to make it 100% in a table??

Bookmarks

Posting Permissions

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