I don't have a solution in the form of code, but I do have the theory behind a solution. I also assume that you mean a horizontal block with a line of text that moves from left to right, yes?

From a mark-up point of view, I'd have the following:

<div class='marquee'>
<p>This is the long piece of text to be scrolled in the marquee. This is the long piece of text to be scrolled in the marquee. This is the long piece of text to be scrolled in the marquee. This is the long piece of text to be scrolled in the marquee.</p>
</div>


My base CSS would just style the paragraph in a way that's accessible to all:

.marquee { border: 1px solid red; }
.marquee p { font-family: verdana; }

In other words, nothing special at all.


THEN, with javascript (this is the bit I can't give you), you can:


1. dynamically change the styling so that the paragraph is a fixed height (eg 25px), with the overflow set to hidden, which effectively chops the paragraph off on the right edge, and whatever else you need.

2. dynamically move the .marquee's paragraph to the left by 1px every .5 seconds (or something), which will simulate the marquee effect.

3. I think you can also use JS to detect the width (in px) of the para, so you should be able to reset the marquee at the end of the content, and go again.


What this means is that the content is accessible to all by using simple tags, and simple CSS. Then *if* JS is available, the marquee is styled differently, animated, etc.



Good luck,


---
Justin French
http://indent.com.au

*****************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
*****************************************************




Reply via email to