Use JavaScript. Here. Give your NavBar an id (<navbar id="w/e"></navbar> [w/e]). You can make an event handler as well. If your user, say, clicks on the navbar, the font will change. Example:
Code:
<html>
<head>
<title>None</title>
</head>
<body>
<input type="button" onclick="this.style.fontFamily = 'Courier New';" value="Change This Font">
</body>
</html>
You can do this with a function as well:
Code:
<html>
<head>
<title>None</title>
<script type="text/javascript">
function changeFont(elem, fonte) {
elem.style.fontFamily = fonte;
}
</script>
</head>
<body>
<input type="button" value="changeFont(elem, fonte);" onclick="changeFont(this, 'Courier New');">
</body>
</html>
Now, this is a version of what you requested:
Code:
<html>
<head>
<title>None</title>
<script type="text/javascript">
function changeFont(elem, dropper) {
document.getElementById(elem).style.fontFamily = dropper.options[dropper.selectedIndex].value;
}
</script>
</head>
<body>
<div id="navver">This is supposed to be a nice little navbar. Select a new font to change this one's</div>
<select onchange="changeFont('navver', this);">
<option value="Times New Roman">Times New Roman</option>
<option value="Courier New">Courier New</option>
<option value="Arial">Arial</option>
</select>
</body>
</html>
I'm sure you don't understand JavaScript at all (cuz you didn't ask about it or anything). Here is a good tutorial:
http://www.tizag.com/javascriptT/
That site also has a forum. Anyway, just ask anything you want to. By the way, if you have IE, it will display a yellow bar at the top of the screen. Click on it and select "Enable ActiveX Controls". This way, the script will work. It is suggested that you use this than jQuery. jQuery takes too much memory up for this fairly simple task (doing it this way will save perhaps 45kb, maybe 55kb...isn't much, but still
...). You can use it if you want, though. Again, feel free to ask any questions.
-magicyte
Bookmarks