Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: make font bold

  1. #1
    2 Star Lounger
    Join Date
    Aug 2004
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    make font bold

    Hi, i copied the below code from a free code source for a circling mouse trailer. My task is to make the font in "var msg='artuS rewolF amrahD';" bold, can somebody teach me how to insert another code to make my wordings in the mouse trailer bold? i don't know how to do so.

    Thanks for your help.

    Longish code moved to attachment by HansV - the <!t>[i]<!/t> tags caused problems.
    Attached Files Attached Files

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: make font bold

    Hi Boat

    This is a bit of a massive task as the script has been specifically coded in a way that it is very difficult to adapt the code without upsetting the variables.

    Nice gizmo but it does not like to work in Firefox...before we rattle onto this task could you just clarify is the a MUST have or a WOULD LIKE to have <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Jerry

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: make font bold

    This is rather crusty old code... the Netscape part is basically irrelevant for anyone using a modern browser, so I will ignore that. For the IE part, find this and change the weight to bold:

    font-weight:regular

    To make it work in Firefox, well, I will leave that to others.

  4. #4
    2 Star Lounger
    Join Date
    Aug 2004
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: make font bold

    Hi Jerry, thanks for your concern. the mouse trailer i would like to have and it has so inevitably become must have preference. anyway, do what you have and at your pleasure.

    Thanks for your help.

  5. #5
    2 Star Lounger
    Join Date
    Aug 2004
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: make font bold

    HI, can you tell me more with your comment, "the Netscape part is basically irrelevant for anyone using a modern browser"
    i tried open the web with the mouse trailer and it ok from 2 pcs. is this your mean some pcs cannot open the web that has the mouse trailer code?

    about the code "font-weight:regular"

    i do tried before in between lines below with "font-weight:bold" but it just don't work, thanks for your comment.

    var msg='artuS rewolF amrahD';
    var font='Times New Roman,Impact,Arial Black,Verdana';
    var size=3; // up to seven
    var color='#fffafa';

  6. #6
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: make font bold

    Hi boat

    To answer two of your questions:

    1. The Netscape bit of the code is more or less redundant as very few people use Netscape these days. The Netscape line of browsers was discontinued some time ago, and replaced with Firefox.

    2. Different browsers interpret code (including html and javascript) in slightly different ways. So it's not a question of trying the code on several computers (if they're running the same browser), but of trying the code on several browsers. You can have more than one browser installed on a single computer at a time, so you don't really need to test it on multiple computers (unless you think the operating system or hardware may make a difference, but I doubt that's the case for an application like this).

    Hope that helps,
    Waggers
    If at first you do succeed, you&#39;ve probably missed something.

  7. #7
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: make font bold

    Some more answers.

    (1) The way the code looks for Netscape is to see whether the browser supports the document.layers collection. I think this is not applicable to Firefox or the later members of the Mozilla suite or to recent versions of Netscape. This was really used in the days of version 4.x of Netscape. For more recent versions, one should use document.getElementById (also works with IE versions 5.x and higher).

    (2) I'm not sure what you did here. Did you change the word "regular" to "bold"? That is the part that applies to IE. Try just changing that and ignoring the other variables. Most of those other variables seem to be used in the Netscape part of the script.

  8. #8
    2 Star Lounger
    Join Date
    Aug 2004
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: make font bold

    thanks guys. you guys really expert in your knowledge. i don't know how to differentiate what kind of browsers there are or how to get them but i will say what i see. i saw before when i open website, there was a logo on upper right page. once it was a logo of a big 'N' i think that is what you guys meant Netscape, and now i see a logo of microsoft windows on my upper right page. and i know i see most pcs now use internet of this kind. now this script attached above can play in this kind of internet. nevertheless, if cannot make bold, then i will choose another font type instead that looks darker than the one Times New Roman i am using. nevertheless i am using Times New Roman all these while that is why i like Times New Roman.

  9. #9
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: make font bold

    Can you provide a link to a page where this script is actually working? I can't get it to do anything. Thanks.

  10. #10
    2 Star Lounger
    Join Date
    Aug 2004
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: make font bold

    sure jscher2000. here you go: www.dharmaflowersutra.net
    can you see the mouse trailer there anyway, cause i want to know also. thanks.
    you see i use bold italic Times New Roman for the wordings all while there so if the mouse trailer wordings using the same, it would be nice for what i think.

  11. #11
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: make font bold

    The script was written by Tim Tilton and is available at Dynamic Drive: http://www.dynamicdrive.com/dynamici...circletext.htm.

    After testing, I realized that you have a nearly white text color in your originally posted script. If you change the color from #fffafa to #000000 (black) you will see that the script works in IE. I should have noticed this before, but there was so much other code.....

    Now, I changed font-weight:regular to font-weight:bold, but the circling is so fast that I can't tell whether it made any difference...

  12. #12
    2 Star Lounger
    Join Date
    Aug 2004
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: make font bold

    hi. yes i get the code from there. sorry about the color. and you can change the speed lower to var speed=.9; as i used it in my website. i use FrontPage to do the web and will get error if i use font-weight:bold between the code lines.

  13. #13
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: make font bold

    Hi Boat

    I have had a little play with this and changing font-weight to bold does work without error. I am using IE 6 sp2 (Although it does try to block the content as it sees the script underlying it).

    I have attached the code in a text file for you to look at but be aware the Lex the Lounge Lizard adapts the code slightly so that it can be displayed in the Lounge correctly. Open the file and read his instructions on how to clean it up.
    Jerry

  14. #14
    2 Star Lounger
    Join Date
    Aug 2004
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: make font bold

    Hi Jerry,
    can i know what changes have you made other than the original one cause i still cannot get it. thanks.

  15. #15
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: make font bold

    I just followed Jeff's advise and changed these parts (in bold):


    v// your message here
    var msg='Jezza Bear';

    var font='Verdana,Arial';
    var size=3; // up to seven
    var color='#000000';

    // This is not the rotation speed, its the reaction speed, keep low!
    // Set this to 1 for just plain rotation w/out drag
    var speed=.9;


    ....lots of code here......




    if (ie){
    document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
    for (i=0; i <! n; i++)
    document.write('<!div id="iemsg" style="position:absolute;top:0px;left:0;height:'+a +';width:'+a+';text-align:center;font-weight:bold;cursor:default">'+props+msg<!t>[i<!t>[+'</font></div>');
    document.write('</div></div>');
    }



    ....the rest of the code here....
    Jerry

Page 1 of 2 12 LastLast

Posting Permissions

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