Results 1 to 4 of 4

Thread: Cross Browser marquee font control

  1. #1
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Cross Browser marquee font control

    1) Script Title: Cross Browser marquee

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/cmarquee.htm

    3) Describe problem:

    I am having problems with the end of the message cutting off when the marquee is in a div

    <div style="font-family: sans-serif; font-size: 12px;">

    What is the best way to specify the font?

    Thanks
    Last edited by Playfla; 07-06-2006 at 04:56 AM.

  2. #2
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation more on the above

    Found that if I omit the font-family property from the container (<p <div and <span) then all is well.

    If I specify "system" font it works fine in IE and FF on Windows. Use any other font family and a long message is truncated.

    Can anyone else duplicate this or is it just me?

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    For a start, don't specify a font-size in pixels.

    I think it's simply a case of making the DIV big enough.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Jul 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks

    That really makes a difference.

    I want to pass this one along as a cut and paste and wont have control over what is done around it. I will mention that restriction.

    The scroller content length will vary since it is the output from the NWS Tropical Weather Update. Sometimes its gets wordy. I looked in some of the other threads on this but could not locate the one with the fix. I tried playing with my best guess but to no effect. Is this it?

    Code:
    document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')

    http://www.thiswaytothe.net/tropical/
    see it working here and also the cut and paste code for the external js file

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
  •