Results 1 to 5 of 5

Thread: Beginner Question about Font Attributes

  1. #1
    Join Date
    Sep 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Beginner Question about Font Attributes

    Hello Everyone!

    I am a complete nab at javascript and need some help on a nice scrolling text script i have found.

    Its called Cross Browser marquee at

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

    In this line of code: var marqueecontent='<nobr><font="verdana">Dont Forget To Bookmark Us </font>

    I need the scrolling text in this format:

    {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #FF0000;
    }

    Thanks for your help!
    JasonKing
    http://www.ultimategripstrength.com

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    var marqueecontent='<nobr><font="verdana">Dont Forget To Bookmark Us </font>
    the <font> tag has been depreciated, but you can use something like

    Code:
    var marqueecontent='<nobr><span class="heading">Dont Forget To Bookmark Us</span></nobr>';
    Code:
    span.heading {
         font-family: Verdana, Arial, Helvetica, sans-serif;
         font-size: 14px;
         font-weight: bold;
         color: #FF0000;
    }

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

    Default

    Cheers thanks for the fast reply

    That Fixed it Perfectly Thanks!

    Thanks Again

    JasonKing

  4. #4
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    I didnt realize you were looking to use a link instead of just regular text. just replace the span with an achor tag

    Quote Originally Posted by boogyman View Post
    Code:
    var marqueecontent='<nobr><span class="heading">Dont Forget To Bookmark Us</span></nobr>';
    Code:
    span.heading {
         font-family: Verdana, Arial, Helvetica, sans-serif;
         font-size: 14px;
         font-weight: bold;
         color: #FF0000;
    }

    Code:
    var marqueecontent='<nobr><a href="somewhere.html" class="heading>Link</a></nobr>';
    Code:
    a.heading:link, a.heading:visited, a.heading:hover, a.heading:active {
         font-family: Verdana, Arial, Helvetica, sans-serif;
         font-size: 14px;
         font-weight: bold;
         color: #f00;
    }
    and you can make a specific style for each of the anchor pseudo selectors, by just taking them out of that list and create their own style with whatever changes to the original. but you should follow convention of
    link
    visited
    hover
    active
    or LoVe HAte those links

  5. #5
    Join Date
    Sep 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks Boogyman!!

    solved all my problems now


    Cheers
    Jason
    http://www.ultimategripstrength.com

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
  •