Results 1 to 6 of 6

Thread: length problem with conveyor belt script

  1. #1
    Join Date
    Jan 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default length problem with conveyor belt script

    1) Script Title: Conveyor belt script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...rightslide.htm

    3) Describe problem: I have used Conveyor belt script in my site www.erodemappy.com . I have set the width of the slider to 1100 pixels and height to 140 pixels.but if u look into the page ,the slider's width is extending beyond the 1100 pixels limit on the right side of the screen. This causes a scroll bar to appear below the screen always. I have tried by reducing the slider's width to 600 pixels also but the screen's width is extending on its right then also(with a empty black screen after the slider's width). Pls help to fix this.

  2. #2
    Join Date
    Feb 2009
    Posts
    303
    Thanks
    18
    Thanked 36 Times in 36 Posts

    Default

    Try editing the DIVs so the width is 100%. This will make the width 100% of the browser window...

    Hope this works/helps,

    X96
    Alex Blackie, X96 Design
    My Website
    I specialize in: HTML5, CSS3, PHP, Ruby on Rails, MySQL, MongoDB, Linux Server Administration

  3. #3
    Join Date
    Jan 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    There were so many div elements here... Me new to programming.. Can u pls let me know ver to edit.. and these sliderwidths are in pixels and how to change them to percentage.. I mean the syntax? Pls guide


    if (iedom||document.layers){
    with (document){
    document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
    if (iedom){
    write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
    write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background- color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
    write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')
    write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>')
    write('</div></div>')
    }

  4. #4
    Join Date
    Jan 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    And it is given in pixels within brackets as below.What must be done here.Should i change to percentage?


    //Specify the slider's width (in pixels)
    var sliderwidth="1100px"
    //Specify the slider's height
    var sliderheight="140px"

  5. #5
    Join Date
    Feb 2009
    Posts
    303
    Thanks
    18
    Thanked 36 Times in 36 Posts

    Default

    You could try making it a percent - it might work. It seems like it's just a DIV, so it shouldn't mess anything up...

    Another thing you may want to change, is add display:block; to the inline style... Like this:
    Code:
    if (iedom||document.layers){
    with (document){
    document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
    if (iedom){
    write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden;display:block;">')
    write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background- color:'+slidebgcolor+';display:block;" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
    write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')
    write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>')
    write('</div></div>')
    }
    // X96 \\
    Alex Blackie, X96 Design
    My Website
    I specialize in: HTML5, CSS3, PHP, Ruby on Rails, MySQL, MongoDB, Linux Server Administration

  6. #6
    Join Date
    Jan 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have tried with the above said modifications. The conveyor belt itself is not displaying after the changes.

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
  •