treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Text 'passing by'

  • Could anyone tell me how can i make a text 'passing by'( to the left or to the right)?
  • What do you exactly mean with 'passing by'?
  • I think he means marquee text. :)
  • Yeah, a moving text.

    Thanks Banzaiaap, I've found this link http://www.mcli.dist.maricopa.edu/tut/tut17.html
    But I didn't understand:
    "Never use the <marquee> tag"

    Why? It's working perfectly in Opera, Firefox and IE6.
  • "alwas56" said:

    "Never use the <marquee> tag"

    Why?...

    Because you shouldn't use html tags that add styling or behaviour to your document. The tag used for your content should describe that contents meaning and not its visual style. Styling should be separate from the content which is why we use external stylesheets. Similarly, behaviour is controlled using external javascript sheets.
    As scrolling text would be deemed a behaviour (in my opinion, but I'm willing to be corrected on this) I would suggest looking for a javascript solution.
  • trying to use the jQuery function to scroll a message, and it is not working for me,
    what am I doing wrong?

    The jquery.li-scroller.1.0.js file is in the same folder as the html code for the example.


    <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
    <html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en-ca\">
    <head>
    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />
    <title>Template</title>
    <script type=\"text/javascript\" src=\"jquery.li-scroller.1.0.js\"></script>
    <script type=\"text/javascript\">
    $(function(){
    $(\"ul#ticker01\").liScroll();
    });
    </script>
    </head>
    <body>

    <ul id=\"ticker01\">
    <li>message1</li>
    <li>message2</li>
    </ul>

    </body>
    </html>


    Al
  • solved my own problem, took the html/css example and modified it to work,
    found that I had deleted too much of the CSS code, it needed the CSS code
    that formats the display areas

    Al