The Most Active and Friendliest
Affiliate Marketing Community Online!

“AdsEmpire”/  Direct Affiliate

W3 Syntax for Marquee

johnafrankllin

New Member
affiliate
Hi,
I am currently using <marquee ...... >
</marquee>
but as per w3 it is an undefined element.
is there anyone who can suggest me the right syntax to run a marquee in my site. Any help will be greatly appreciated.

Regards
John
 
There is no "right syntax", the element you mention is a non-standard element where the only alternative is using scripting.

I won't normally recommend anyone to use invalid code, but you could consider the following.

The mentioned tag is widely supported by most browsers.

The disadvantage from using the element.

What determines how fast the text scrolls, it sure isn't the web designer or user of the website.

Your code won't validate unless you extend the DTD.

Scrolling text can however be considered special effect, or an advanced part of the UI, which would justify the use of scripting.


Even though the element is widely supported, I'd rather use JavaScript, which enables other rich features on your site. Not to mention that you would be able to fully control the speed of the scrolling text, as well as other aspects.
 
Hi,
could you provide me a java script code to replace the marque as it is not supported by some of the browsers. The help will be appreciated.

Regards
John
 
I don't have the time to code one right now, i find javascript to be a challenge each time i use it, and I'd rather avoid using it most of the time.

You need to use settimeout to delay the scrolling, otherwise it simply goes to quickly. The lack of a sleep function doesn't make it any easier, luckily there are plenty of existing scripts, the problem is that they look very ineffective most of them, maybe its just a problem with JavaScript itself, rather then ineffective coding.

I find it very impractical that you can't simply do something like below
Code:
var v = 0;
var e = 100;
while (v<=e) {
sleep(1000);
document.getElementById('Paragraph').style.left=v + '%';
++v;
}

In javascript it would seam we have to code around the lack of a sleep function.

Try searching for some scroll scripts on your own. I'm sure there are far better ones already, with even more customization options, then there would be in any script i would write off-hand..

I would however prefer to create my own, because then i would likely know how to modify it.Etc.
 
banners
Back