View Full Version : Fading Scroller fheight issue in Firefox

04-10-2008, 08:31 PM
1) Script Title: Fading Scroller

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/fadescroll.htm

3) Describe problem:

I have altered the fwidth and fheight variables in this script to suit my site as well as modifying the content (obviously).

Displays fine in IE7, but in Firefox the border appears to be approx. 5 px high instead of 10 px as specified and text appears slightly outside border. You can check this issue out (in FF2) by visiting:

http://www.aptitudeforlearning.co.uk/documents/33.html (...and all other pages where the script appears).

The fading scroller appears halfway down the page on the right hand side.

Any suggestions for resolving this would be very much appreciated. Here is the code (as modified by me):

var delay=5000; //set delay between message change (in miliseconds)
var maxsteps=30; // number of steps to take to change from start color to endcolor
var stepdelay=40; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var startcolor= new Array(255,255,255); // start color (red, green, blue)
var endcolor=new Array(0,0,0); // end color (red, green, blue)

var fcontent=new Array();
begintag='<div style="font: normal 12px Arial; padding: 5px;">'; //set opening tag, such as font declarations
fcontent[0]="<b>OFFICE:</b> 01344 222152";
fcontent[1]="<b>MOBILE:</b> 07933 768075";

var fwidth='207px'; //set scroller width
var fheight='10px'; //set scroller height

var fadelinks=1; //should links inside scroller content also fade like text? 0 for no, 1 for yes.

Many thanks in advance for your support

Matt Thurgood

04-10-2008, 11:22 PM
Its all because of the positioning of the page. You need to position that div that'll make the text fit.