PDA

View Full Version : length problem with conveyor belt script



ilakkia
07-05-2009, 10:09 AM
1) Script Title: Conveyor belt script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/leftrightslide.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.

X96 Web Design
07-06-2009, 12:31 AM
Try editing the DIVs so the width is 100%. This will make the width 100% of the browser window...

Hope this works/helps,

X96

ilakkia
07-06-2009, 10:39 AM
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>')
}

ilakkia
07-06-2009, 10:49 AM
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"

X96 Web Design
07-06-2009, 03:56 PM
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:


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 \\

ilakkia
07-08-2009, 10:53 AM
I have tried with the above said modifications. The conveyor belt itself is not displaying after the changes.