PDA

View Full Version : Cross Browser Marquee II



sneakypete68
06-13-2008, 03:34 PM
Hi, I used the cross browser marquee 2 on my page but can't seem to get it centered and scrolling at the same time. can some look at my page and tell me what im doing wrong.
http://www.bearlsofun.com/cases/ssred2.html
thank you

Nile
06-13-2008, 09:02 PM
I can't tell where your using it, mind to point it out to me? :D

thetestingsite
06-13-2008, 09:31 PM
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

sneakypete68
06-14-2008, 11:29 AM
Sorry, I wasnt clear but the code is used on this page www.bearlsofun.com/cases/ssred2.html thx again

rangana
06-14-2008, 11:37 AM
I'm not seeing the marquee script (in action) either. Where is it, where in that page? bottom, left, right, above or something else.

hyk
06-14-2008, 01:37 PM
where do you want to place the marquee? Anyways guys here the script he copiedfrom (http://www.dynamicdrive.com/dynamicindex2/cmarquee2.htm)

sneakypete68
06-15-2008, 05:40 AM
I'm not seeing the marquee script (in action) either. Where is it, where in that page? bottom, left, right, above or something else.

go to this site http://www.bearlsofun.com/cases/ssred2.html takes a min to start scrolling buts its right at the top.

I have this in the head of page :
<style type="text/css">

#marqueecontainer{
position: relative;
width: 400px; /*marquee width */
height: 200px; /*marquee height */
background-color: maroon;
overflow: hidden;
border: 3px solid black;
padding: 2px;
padding-left: 4px;
}

</style>

<script type="text/javascript">

/***********************************************
* Cross browser Marquee II- Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=2 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''

function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}

function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
}

if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee


</script>


and this is in the body of the page:
<div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
<div id="vmarquee" style="position: absolute; width: 100%;">

<!--YOUR SCROLL CONTENT HERE-->
<h1>GO FOR THE GOLD CONTEST RESULTS AS OF JUNE 11, 2007</h1>
<h4 align="left"><ul="ul">
<li>sneakypete68 203</li>
<li>oxtailsoup 197</li>
<li>MissPelled 160</li>
<li>oxit2me 152</li>
<li>greasegravy 147</li>
<li>Natsssss 132</li>
<li>chiccopip 95</li>
<li>Just_Fancy 90</li>
<li>barneyfife 90</li>
<li>Wenchie 74</li>
<li>Kes 71</li>
<li>adamsgirl 66</li>
<li>Bballmom66 57</li>
<li>Stinging 51</li>
<li>TweetieBird 47</li>
<li>bronzelonna 47</li>
<li>TheMummykins 37</li>
<li>Debbers2 26</li>
<li>mischiefcat 26</li>
<li>Bambiella 24</li>
<li>buzzylizzy 21</li>
<li>melisca 18</li>
<li>fruitbat 16</li>
<li>OldShep56 15</li>
<li>MattyJ 13</li>
<li>rablerouser2002 13</li>
<li>_NIECY1971_ 13</li>
<li>Sharon54 11</li>
<li>funkycomedina 8</li>
<li>1TopDawg 8</li>
<li>BeenCaughtStealing 8</li>
<li>Ivory_Tickler 7</li>
<li>Shadowy_Niddyz 7</li>
<li>Petal 7</li>
<li>_DEIRDRE_ 7</li>
<li>DorcasA 6</li>
<li>lainy 6</li>
<li>ibleeduncblue 5</li>
<li>Kismet315 5</li>
<li>IrishLass 4</li>
<li>horsecrazy610 4</li>
<li>Phoenix_Rising 3</li>
<li>Grinningfrog 3</li>
<li>Ricketytick 3</li>
<li>jakirabble 3</li>
<li>maureenb 3</li>
<li>sparklee1 3</li>
<li>micky11965 2</li>
<li>sexxyeyes 2</li>
<li>purplegirple 2</li>
<li>Mmmmmgood 2</li>
</ul="ul">

</h4>

<!--YOUR SCROLL CONTENT HERE-->

</div>


thx again :-)

rangana
06-17-2008, 11:32 AM
I waited for a minute, but I had taken a good sleep, thanks though :p

The error is not in the script, but on your markups. See if removing the higlighted helps:


<div id="vmarquee" style="position: absolute center; width: 98%;">


If you want to center the contents of your marquee, use:


text-align:center


This applies on both marqueecontainer div and on your <ul>. Hope it helps. Get back if you're still stumped.