I'm trying to get the contents of the block/table to scroll together, however i'm getting different results pending on where I write the marquee code. Heres the table <table border="0" cellpadding="4" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td width="140" nowrap valign="top"><a href="<!--LINK-->" target="_blank"><!--Snapshot--></a></td> <td width="100%" valign="top"> <table border="0" width="100%" cellspacing="1" cellpadding="2"> <tr> <td width="100%"><a href="<!--LINK-->"><b><!--TITLE--></b></a> <a href="<!--LINK-->" target="_blank"><b><img src="<!--CLASS::Images_URL-->/nw.gif" border="0"></b></a></td> </tr> <tr><td width="100%"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr><td><p align="justify"><!--DESCRIPTION--></p></td></tr> </table> </td></tr> </table> </td> </tr> </table> Code (markup): Heres my marquee code <marquee id="test" behavior="scroll" direction="up" scrolldelay="100" scrollamount="2" onMouseOver="document.all.test.stop()" onMouseOut="document.all.test.start()"> Code (markup): </marquee> Code (markup): Could someone advise me on what i'm doing wrong and or where the codes should go. To preview my result with this code below visit http://www.web-bin.com <marquee id="test" behavior="scroll" direction="up" scrolldelay="100" scrollamount="2" onMouseOver="document.all.test.stop()" onMouseOut="document.all.test.start()"> <table border="0" cellpadding="4" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td width="140" nowrap valign="top"><a href="<!--LINK-->" target="_blank"><!--Snapshot--></a></td> <td width="100%" valign="top"> <table border="0" width="100%" cellspacing="1" cellpadding="2"> <tr> <td width="100%"><a href="<!--LINK-->"><b><!--TITLE--></b></a> <a href="<!--LINK-->" target="_blank"><b><img src="<!--CLASS::Images_URL-->/nw.gif" border="0"></b></a></td> </tr> <tr><td width="100%"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr><td><p align="justify"><!--DESCRIPTION--></p></td></tr> </table> </td></tr> </table> </td> </tr> </marquee> </table> Code (markup): Thanks
What do you mean mate, should I be using something different ? BTW I get two different results between IE & Firefox
I think marquee is sort of being removed from the HTML language or something. You can still use it but it will be buggy. I've seen javascript alternatives.
Marquee was never deprecated since it was never part of the HTML specification. It was a proprietary HTML tag created by Microsoft in order to compete with Netscape Navigator over a decade ago. If you want to use something like this and have your code validate, you NEED to use JavaScript for this, since what you want is a behavioral effect, not a structural one. Just avoid Dynamic Drive at all costs when you do so.
Marquee is at best, a fallback for users without JS, if that. It also scrolls terribly, especially when you use different "speeds". JS allows more control, smoother scrolling etc. Not that I advocate the use of scrollers as they are annoying - there are very few situations where it is appropriate.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Any Title</title> <script type="text/javascript"> var useWidth = "400px"; var message = []; message[0] = "Now is the time for all good men to come to the aid of their country."; message[1] = "That's one small step for man, one giant leap for mankind." message[2] = "Ask not what your country can do for you, ask what you can do for your country." var currMsg = 0; var msg = ""; var container = ""; function startCrawl(){ var currPos = container.scrollLeft; if (currPos >= container.scrollWidth-parseInt(useWidth)) { if (currMsg < message.length-1) { currMsg++; } else { currMsg = 0; } container.scrollLeft = 0; init(); } else { container.scrollLeft = currPos + 1.5; setTimeout("startCrawl()",15); } } function init(){ msg.innerHTML = message[currMsg]; startCrawl(); } onload=function(){ container = document.getElementById('holder'); msg = document.getElementById('crawl'); container.style.width = useWidth; msg.style.paddingLeft = useWidth; msg.style.paddingRight = useWidth; init(); } </script> </head> <body> <div id='holder' style='overflow:hidden;height:28px;border-top:#c0c0c0 1px solid;border-left:#c0c0c0 1px solid;border-bottom:black 1px solid;border-right:black 1px solid;background-color:#ffffe0;'> <table> <tr> <td> <div id='crawl' style='white-space:nowrap;font-size:14pt;color:#00008b'></div> </td> </tr> </table> </div> </body> </html> Code (markup):
Try it without the table, before you run your mouth, aHole. And, your code is, WHERE? Oh, I almost forgot. You're all mouth and no code, aHole.
Which table are you referring to.. Mike's ? Basically what I'm trying to achieve is, as I add featured sites, the(code above) block gets bigger thus scrolling down the page is necessary to see all featured sites, what I like to achieve is the contents of that block to scroll, hence <marquee>
Actually it doesn't even work cross-browser. As I said before, it's a proprietary (fake) HTML element created by Microsoft. No other browser on the face of the earth is required to support it, nor should they. Classy, resorting to personal attacks because someone offers a suggestion. How amateur, childish, immature and juvenile. I'm just quoting this so I can inform you that your post has been reported to the moderator team here. If you're going to counter someone's offer or suggestion, please try to use some manners in the future. People may then take you more seriously than they currently do. Sorry about that Marty, some people really don't know how to behave themselves in public. Yes, I was referring to Mike's table. Anyway, I looked at your page in both IE 7 and Opera and didn't see any scrolling effect taking place. I didn't look at your source code on the live copy you provided for reference since I'm at work right now, but from what I saw of your posted example, you're looking for a marquee with a set width that can scroll up. If I'm wrong about this, please feel free to correct me on it and accept my sincere apologies for misunderstanding you. In the meantime, would something like this work for you? http://onlinetools.org/tools/domnews/
Shultz: You're a self-important twit, with a big mouth. A little punk, constantly saying "look at me, Daddy. Look, Daddy. LOOK at ME!" Kiss my ass, punk. Oh, you know how to post links to someone else's code, but you don't have any code of your own. All you know how to do is criticize, without ANY basis. You ran your mouth at me without removing the table and testing the code that way. That's the way little punks like you are. Always shoving your finger in someone's face, to get attention. People who appoint themselves to stand in judgment of others are assholes. YOU, are an asshole. Oh, my! Will you report me, punk? Will you tell the teacher, punk? Kiss my ass, punk.