Creating Java/DHTML Vertical Navigation Menu in FrontPage

S

sharsy

ok I've done that now (I sourced the code of a website), so do you
know how I can get the font/highlighting of text that is
a hyperlink that opens up a new page in the "main" frame to change
colour once it is selected. This is so people can see what page
they're on by looking at the highlighted part on the navigation menu.
Accordingly, when you navigation to a different page, the old page's
link will go back to normal and the new link will be highlighted/font
will change colour. your assistance would be greatly appreciated
 
M

Murray

The easy way is to assign each 'button' of the menu an explicit ID, e.g.,

<a href="home.html" id="homebutton">
....
<a href="about.html" id="aboutbutton">

and then on each page, embed a small stylesheet that allows you to specify
the "highlight" properties for that particular button, for example, on the
home page, you might have -

<style type="text/css">
a#home { background-color:#CFF; color:green; }
</style>
</head>

while on the about page, you would have -

<style type="text/css">
a#about { background-color:#CFF; color:green; }
</style>
</head>

This would only work if your 'buttons' were CSS styled text links. If you
are using GRAPHIC links, then you have to either convert them to CSS links
(where the graphic is a background image, and you are specifying a different
background image on hover), or use some custom javascript to specify the
correct image to use for the highlighted button.
 
S

sharsy

I'm sorry but I don't understand/what I understand you to mean isn't
working for me!!! What I did was add the id to a button like this:

Was: <li><a href="Audit/BSA/BSA.htm">BSA</a></li>

Now: <li><a href="Audit/BSA/BSA.htm" id="AuditBSA">BSA</a></li>

so on the page that the button links to, I did this:

Was:
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Audit BSA</title>
<link rel="stylesheet" type="text/css" href="../../styles.css">
</head>

Now:
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>Audit BSA</title>
<link rel="stylesheet" type="text/css" href="../../styles.css">

<style type="text/css">
a#auditBSA { background-color:#CFF; color:green; }
</style>
</head>

but this isn't working for me - no button highlights and I'm not using
graphics. Would you like me to post my entire code again for you to
look at what I've done wrong? This is so confusing for me...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top