PDA

View Full Version : Scrollable Menu Links moves in ie



webwonder
08-07-2008, 06:49 PM
1) Script Title: Scrollable Menu Links

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/scrollerlink.htm

3) Describe problem: in IE if you enlarge the text or make text smaller the menu of links jumps when you move the cursor over the arrows. this is not something that i have done wrong because it happens with the demo on the code page.

does anyone know how to stop this happening.

thanks

nikki

webwonder
08-07-2008, 07:46 PM
ok i have sorted that problem out now i just set the height in the style sheet and it fixed the problem,

I have another problem and was wondering if anyone can help how would i set the colour of the current link to a different colour

speedracer
08-07-2008, 08:57 PM
CSS. or:

var menucontents='<nobr><a href="http://www.dynamicdrive.com"><font color="#00FFFF">Dynamic Drive</font></a> |

webwonder
08-07-2008, 09:06 PM
thankyou for your response i wish to change the colour of the link with each relevant page, not just the one link.

with css i would use for example - how would i incorporate this type of thing.

#thispage a:link, #thispag a:visited,#thispag a:hover, #thispag a:active {color:#66AFFF;}

thanks

speedracer
08-07-2008, 09:24 PM
Its here:

write('<div style="position:relative;width:'+menuwidth+'px;height:'+menuheight+'px;overflow:hidden;">')
write('<div id="test2" style="position:absolute;left:0;top:0">')
write('</div></div>')


change
#thispage
to
#test2

or add a class in the div tag and use this:

.thispage

instead of this

#thispage

and add like this:

write('<div id="test2" class="thispage" style="position:absolute;left:0;top:0">')

webwonder
08-07-2008, 09:43 PM
i tried what you said, both ways, but it still does not create the current page state.

speedracer
08-07-2008, 10:29 PM
Oh ok, I misunderstood what you wanted. you would then need to use css and give each page an unique id. so for instance if you have "About Us" page you would then make an id for that page like so:

<body id="about">

With the markup in place, you need to write one or more CSS rules to match the body id:

something like this

#about #linkabout a {
color:#FF3300;
}

and markup the link something like this:

var menucontents='<nobr><span id="linkabout"><a href="about.htm">About Us</a></span> |

Its a crude way to do it but should be what you wanted using this menu.