PDA

View Full Version : Translucent Scroller Font Changes



msualumni
08-09-2006, 06:23 AM
1) Script Title: Translucent Scroller

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

3) Describe problem: I can't seem to figure out how to change the font to be bold, italic & another font (Tahoma). Where would I place that ?

ddadmin
08-09-2006, 05:51 PM
Simply find the line:


if (ie4||dom)
document.write('<div style="position:relative;width:'+scroller_width+';height:'+scroller_height+';overflow:hidden; font: bold 12px Tahoma; font-style: italic">

The code in red is new.

msualumni
08-10-2006, 07:05 AM
worked like a charm. and i am learning javascript in the process....thank you very much....again! this is a fantastic site that i am already telling others about. :)

lizziebelle
03-20-2007, 09:47 AM
I followed the above suggestion on changing the font and size etc but as a result when the scroller first loads the second scroller appears faintly underneath which distorts the text below.
The next few scrollers appear to rise from further down the page. Can anyone help?

if (ie4||dom)
document.write('<div style="position:relative;width:'+scroller_width+';height:'+scroller_height+';overflow:hidden font: 15px">

11225
02-10-2008, 01:35 AM
hello. I am also getting the ghost images. In addition I can't find the right way to insert the code to change the font and font color. I tried every suggestion in the posts, but nothing worked for me. However, I did discover a solution for centering the scroller in IE within a table - substitute the "absolute" positions for "relative" positive" positions in this same line of code we are working in.

please help! I've tried a zillion combos...

;overflow:hidden; font: arial 18px goldenrod">
;overflow:hidden; font face: "arial" 18px goldenrod">
;overflow:hidden; font= arial 18px goldenrod">

ddadmin
02-10-2008, 09:09 PM
11225, in the future, please start a new thread when asking a question. Regarding it, the problem with the font is since the syntax you're using for the font property is incorrect. See here (http://webdesign.about.com/od/styleproperties/p/blspfont.htm) for more info.

So this would be valid:


font: normal 18px Arial

Regarding "ghosting", I assume you mean in IE (not Firefox). If so, make sure inside the script, you have the bgcolor set to an explicit color, and not transparent:


var bgcolor='#E0EFD1'

11225
02-10-2008, 09:59 PM
Thank you. I finally got the correct syntax!
And yes - I am trying to use the scroller over another object and I have bgcolor=''. Is there anyway to achieve this?
Thanx again

ddadmin
02-10-2008, 11:28 PM
Not in IE6 (most likely same with IE7, not sure) unfortunately. This is a documented bug with IE filters (http://www.javascriptkit.com/filters/) by Microsoft, with their suggested solution being to give the transitioning element an explicit background color.

11225
02-11-2008, 03:49 PM
ok, thank you for letting me know