A little help please with:Mike's DHTML scroller
Script: Mike's DHTML scroller
I am using Mike's scroller in a few webpages, and have modified the various bits for its general use, ie color,positions etc. and all is ok.
I want to 'format' the position of the text within the display based on the inclusion of 'spaces' to pad out the text, I am using the Courier New font as this is a 'block' font where all the characters take the same space.
I could not see any varible for positioning the text in the display box such as 'center', 'left', 'right' etc. which would solve the problem.
Its no use using the xpos,padding parameters as it needs to be global to all the display messages.
An extract of the code is:
var myScroller1 = new Scroller(0, 0, 535, 30, 0, 10); //(xpos, ypos, width, height, border, padding)
myScroller1.setColors("RED", "WHITE", "WHITE"); //(fgcolor, bgcolor, bdcolor)
myScroller1.setFont("Courier New,black,Helvetica", 3);
myScroller1.addItem("<b>...............W H A T S N E W..................</b>");
myScroller1.addItem("<b>............UPDATED 14TH JULY 2005.........</b>");
(In my code the full stops (.) are actually spaces, but this forum strips the spaces out as well, so you don't get a true representation of the code content)
In the 'additem' string, the spaces are ignored by the code, I have tried including some special characters (using the ALT+keycode) but these generate an error.
Any suggestions please.
Last edited by royyates; 07-14-2005 at 01:59 PM.