Results 1 to 5 of 5

Thread: Ajax XML Ticker

  1. #1
    Join Date
    Sep 2006
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajax XML Ticker

    1) Script Title: Ajax XML ticker

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ajaxticker.htm

    3) Describe problem: it's possible to for me to change the text color independently using html tag in the xml file? I tried it but it doesn't work, any suggestion?

    thanks

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    You should be able to insert inline CSS within the DIV(s) of the xml (txt) file, for example:

    Code:
    <div class="message" style="color: red">
    <a href="http://www.javascriptkit.com" target="_new">JavaScript Kit</a><br />Comprehensive JavaScript tutorials and over 400+ free scripts!
    </div>
    You can't use external or global CSS inside the txt file, at least it won't work in IE due to rendering limitations in IE for files fetched via Ajax.

  3. #3
    Join Date
    Sep 2006
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank, but it doesn't work. Do you know any ajax ticker that use external .html file instead of text file? thanks

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Ok, what will work for sure is to add to the CSS on your page definitions that target the .message class name:

    Code:
    <style type="text/css">
    
    .message{
    color: red;
    }
    
    </style>
    The above would need to be added to your page displaying the ticker, and not the .txt file.

  5. #5
    Join Date
    Sep 2006
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks I got the color to work like I wanted. How do I vertical align the content display? For example I set the width and the height 300 by 200 pixels. But sometime the contents doesn't fill up 200 pixels in height, so if that the case I want the content to vertically align in the middle.

    Thanks

Bookmarks

Posting Permissions

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