Search code examples
phphtmlmarquee

Try to make marquee scroll up with php


I have a problem if the text is longer it will not break into other line.

Any suggestion?

 <marquee  behavior='scroll' direction='up' scrollamount="2">
<?PHP

while ($result = mysql_fetch_array ($query))
{
  echo "<ul id='navm'><li><a>".$result["Name"]."</a></li>";
  echo "<li><a>".$result["Title"]."</a></li>";
  echo "<li><a>".$result["Information"]."</a></li>";
  echo "<li><a>".$result["Date"]."</a></li></ul>";
}

?>

</marquee>

Solution

  • You have to add CSS style to delimit the link, try the following code:

    a:link 
    {
       word-wrap: break-word;
    }
    

    Source: http://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/