...

View Full Version : Change the font of Popup Script



neodjandre
08-20-2002, 11:44 PM
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-style:outset;
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.

beetle
08-21-2002, 12:03 AM
Sure! This is actually a CSS question, but here ya go...
<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>

neodjandre
08-21-2002, 01:07 PM
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 ?

beetle
08-21-2002, 03:29 PM
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)
<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>

neodjandre
08-21-2002, 03:42 PM
thnx again beetle .. i tried your second suggestion and it works .. i will stick to that :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum