Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Posts
    153
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Change the font of Popup Script

    Could someone suggest a way to change the font to verdana ..The default is times new roman and i believe that the author didn't have an option 4this in order to avoid compability problems with netscape ...
    My site already suckz big time in netscape, so i won't say no to a solution that is not friendly 4netscape

    thnx in advance guyz

    ALTTXT V1.2
    BY: BRIAN GOSSELIN OF SCRIPTASYLUM.COM

    -ADDED FADING EFFECT FOR IE4+ AND NS6+ ONLY
    -OPTIMIZED THE CODE A BIT.

    INSTRUCTIONS:

    STEP 1: Copy and paste the below code block into the <head> section of your page:

    <style>
    <!--
    .navtext {
    width:150px;
    font-size:12pt;
    border-width:2px;
    border-styleutset;
    border-color:darkgray;
    layer-background-color:tan;
    background-color:tan;
    color:black;
    }
    -->
    </style>

    <script language="javascript" src="alttxt.js">

    //Popup info box III (By Brian Gosselin, http://scriptasylum.com/bgaudiodr/)
    //Script featured on Dynamicdrive.com
    //For full source, TOS, and 100's more DHTML scripts, visit http://www.dynamicdrive.com

    </script>

    STEP 2: Add the below <div> tag to the end of your document:

    <div id="navtxt" class="navtext" style="position:absolute; top:-100px; left:0px; visibility:hidden">
    </div>


    STEP 3: Having done the above, use a setup similar to the below to add a popup description to each link(s):

    <a href="http://www.dynamicdrive.com" onmouseover="writetxt('Welcome to Dynamic Drive, the primier DHTML code library online!')" onmouseout="writetxt(0)">Dynamic Drive</a>


    STEP 4: Finally, be sure to upload the accompanying alttxt.js file into your webpage directory.

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sure! This is actually a CSS question, but here ya go...
    Code:
    <style> 
    <!-- 
    .navtext {
    font-family: Verdana, sans-serif; 
    width:150px; 
    font-size:12pt; 
    border-width:2px; 
    border-styleutset; 
    border-color:darkgray; 
    layer-background-color:tan; 
    background-color:tan; 
    color:black; 
    } 
    --> 
    </style>

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Posts
    153
    Thanks
    5
    Thanked 0 Times in 0 Posts
    tnx beetle I actually tried sth like

    font:verdana;

    but i guess i had to use font-family:
    I really don't know what css is , i thought this is a javascript
    God i sound like a newbie .. I can't know everything in this world, can I ?

  • #4
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hehe, no problem. CSS = Cascading Style Sheets. It refers to all the 'code' within the <style> tags.

    FYI, you CAN use just font: for shorthand, but you need to assign at least two properties for it to work (I believe)
    Code:
    <style> 
    <!-- 
    .navtext {
    font: 12pt Verdana, sans-serif; 
    width:150px; 
     font-size:12pt; <-- Deleted
    border-width:2px; 
    border-styleutset; 
    border-color:darkgray;
    layer-background-color:tan; 
    background-color:tan; 
    color:black; 
    } 
    --> 
    </style>

  • #5
    Regular Coder
    Join Date
    Aug 2002
    Posts
    153
    Thanks
    5
    Thanked 0 Times in 0 Posts
    thnx again beetle .. i tried your second suggestion and it works .. i will stick to that


  •  

    Posting Permissions

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