PDA

View Full Version : Need help with scrolling marquee in IE6



dazza-man
09-29-2005, 04:21 AM
Script: Cross browser marquee
http://www.dynamicdrive.com/dynamicindex2/cmarquee.htm

I'm new to website design and have only just started using javascript/DHTML on my site so forgive me for sounding dumb.

I have loaded the above script into my index page - http://www.darrellandsue.com - and really like the function it provides. The one problem I have with it though is its action in IE6. Whereas in FF and NN it scrolls to the end, in IE6 it scrolls part way across then freezes and disappears. Any suggestions on how to stop this happening?

Many thank for any help

jscheuer1
09-29-2005, 05:22 AM
Because IE6 cannot be put into full strict mode with any doctype, this script is incompatible with any doctype that puts IE6 into partial strict mode, which yours does. You can use this valid doctype:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

instead of your current valid (but problematical) doctype which is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

There is no change in the look of the page by doing this, at least as far as I could see, in IE, FF or NN.

dazza-man
09-29-2005, 06:53 AM
Thanks for that help. I have little idea of what most of it meant but it has certainly worked. There is a change in the look of the page in FF and NN, although but I will run with it for now as the most prominent browser is IE.

The nav bar loses it bottom border and division lines in FF and NN. The difference can be seen when going to any other page away from the index. A price worth paying for now though but anyone with any further ideas?

Many thanks in advance.

PS please remember I am a newbie at all this.

jscheuer1
09-29-2005, 07:48 AM
I missed that but, you are right. On that page only, add this to your style, where you have:

<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: medium;
color: #FFFFFF;
}Make it like this:

<style type="text/css">
<!--
.TM0o0, .TM0t0 {
border-bottom:1px solid white!important;
border-bottom:none;
}

body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: medium;
color: #FFFFFF;
}That will fix FF and NN while leaving IE untouched. If you are concerned about Opera, add this script:

<script type="text/javascript">
if (window.opera){
document.writeln('<style type="text/css">')
document.writeln('.TM0o0, .TM0t0 {border-bottom:0!important;}')
document.writeln('<'+'/style>')
}
</script>after the closing style tag here:

}
.style5 {font-size: x-large}
a {
color: #0000FF;
}
-->

</style>

dazza-man
09-29-2005, 10:41 AM
You are very very good but this is only a partial fix i'm afraid. It doesn't replace the division lines in the drop down boxes.

Still up for a challenge?

Many thanks though for the help so far.

jscheuer1
09-29-2005, 02:32 PM
I'm not sure if I'll ever get it 'perfect' but, this will make it close, keep the changes we just made and add:

.TM1o0, .TM1o1 {
padding-bottom:3px!important;
padding-bottom:4px;
}just below:

.TM0o0, .TM0t0 {
border-bottom:1px solid white!important;
border-bottom:none;
}

dazza-man
09-29-2005, 09:10 PM
Hi again.

I've done all the pasting in of your code as instructed as hey presto - it all works in IE, FF, NN and Opera.

Thank you very, very much.

Darrell