Results 1 to 7 of 7

Thread: [RESOLVED] Displaying text in a marquee

  1. #1

    Thread Starter
    Member
    Join Date
    May 2006
    Posts
    53

    Resolved [RESOLVED] Displaying text in a marquee

    I have a webpage created using ASP.net and C# 2005.

    I need to display some text as a marquee (scrolling text from right to left). The text will come from a table and I have already assigned it to a string variable. But I am unable to create the marquee effect. I need to apply backcolor, forecolor and other styles like bold, large font size etc to the scrolling text. I was thinking of using a Panel as a container for the marquee.

    How do I implement this feature?

    Lalit Kumar Barik
    India

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Displaying text in a marquee

    Hey,

    Depending on what browser you are targetting, you could use the following:

    http://www.htmlcodetutorial.com/_MARQUEE.html

    Gary

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Displaying text in a marquee

    As counter-friendly as this may seem to you, why are you using a marquee? It's a proprietary tag, it shouldn't be used, and above all, it's annoying. If you want something that's more aesthetically pleasing, what about something like the BBC news ticker?

  4. #4

    Thread Starter
    Member
    Join Date
    May 2006
    Posts
    53

    Re: Displaying text in a marquee

    @gep13, I forgot to mention in my original post, but I know about the <marquee> tag used in plain old HTML, I am not sure how to use it inside my ASP.net webpage. I am also not sure how to change the attributes and display the contents of a string variable. The target audience will be using Internet Explorer in almost all cases and hence I am not worrying about browser incompatibility.

    @mendhak, I also agree with you about the annoying nature of the <marquee> tag. But the owner of the website is insisting on it (actually about the scrolling nature). I am open to other suggestions (like a horizontal scrolling news ticker) as long as I get the scrolling text effect.

    Thanks for your suggestions.

    Lalit Kumar Barik
    India

    (P.S. @mendhak, are you from my country?)

  5. #5
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Displaying text in a marquee

    Hey,

    To answer your specific question, have a look here:

    http://forums.asp.net/p/1255316/2331625.aspx

    Also, you might want to think about other solutions here:

    http://www.dynamicdrive.com/dynamicindex2/

    Hope that helps!!

    Gary

  6. #6
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: Displaying text in a marquee

    Avoid the HTML <marquee> at all costs. It's clumsy, and just plain looks bad. If you need that effect, coming up with a little bit of JavaScript would not be difficult (probably 10 minutes for me, if that), and there are multiple jQuery plugins that have been written to do the same thing. Google it... the site I think I'd recommend isn't responding to me at the moment.

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Displaying text in a marquee

    @mendhak, I also agree with you about the annoying nature of the <marquee> tag. But the owner of the website is insisting on it (actually about the scrolling nature). I am open to other suggestions (like a horizontal scrolling news ticker) as long as I get the scrolling text effect.
    You can have a look at a javascript solution
    http://www.makemineatriple.com/2007/10/bbcnewsticker/

    It's less straining on the eyes and you may be able to convince them to use it by saying "BBC uses it...". You may also want to inform the website owner that we're no longer living in 1993... it's 15 years later.

    (P.S. @mendhak, are you from my country?)
    I do not recognize any nationalities aside from 'programmer'.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width