Hi Phoebe,

Thank you very much for your reply.  Actually after sending off the email I
thought that that was probably the case.  

I did a bit of net surfing and come across CSS code and script that I
thought could help solve this problem (please see below).  It seemed to work
OK viewing locally in IE6 however once I uploaded the files and viewed in
IE6 and Firefox it didn't behave the same.  I don't know if you or someone
else might be able to shed some light as to why it's behaving like this or
know of some other way to keep a button in the 'active state' while the user
clicks on other links.

If you'd like to see the test files they can be viewed at:
http://www.ccinteriors.com.au/test/


Thank you again,


Jasmin



----------------------------------------------------------------------------

<style>

A.type1:link {
        
        background-image:URL(images/menu_button.gif); 
        background-repeat: no-repeat;
        text-align: center;
        line-height: 20px;
        text-decoration:none;
        font-size: 12px;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        },
        
A.type1:visited {
        color:black;
        background-image:URL(images/menu_button.gif); 
        background-repeat: no-repeat;
        text-align: center;
        display:block;
        line-height: 20px;
        text-decoration:none;
        font-size: 12px;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        },
        
A.type1:active {
        line-height: 20px; 
        text-decoration:none; 
        font-size: 12px; font-weight: bold; 
        font-family: Verdana, Arial, Helvetica, sans-serif; }

A.type1:hover{
        color:white;
        background-image:URL(images/menu_button_over.gif);
background-repeat: no-repeat;
        line-height: 20px;
}

A.active:link { 
        font-size: 12px; 
        font-family: Verdana, Arial, Helvetica, sans-serif;}
A.active:visited, A.active:hover {
        background-image:URL(images/menu_button_on.gif); 
        background-repeat: no-repeat;
}

</style>


** SCRIPT **

<script>
var currLink = null;
function toggleActive(elm)
{
if(currLink)
currLink.className = currLink.className.replace(" active","") currLink = elm
currLink.className += " active" 
}
</script>


** HTML CODE **

<a href="chair_album/index.htm" target="body" class="type1"
onclick="toggleActive(this)">Album of Products</a><br> <a href="task.htm"
target="body" class="type1"
onclick="toggleActive(this)">Task Chairs</a><br>

----------------------------------------------------------------------------






-----Original Message-----
From: Phoebe Taylor [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 20 May 2008 3:22 AM
To: jasmin
Cc: css-d@lists.css-discuss.org
Subject: Re: [css-d] problem with vertical menu list

On Fri, May 16, 2008 at 12:41 AM, jasmin <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
>
> I'm using the below vertical menu list but unfortunately when a menu item
is
> clicked to produce an 'active state', it doesn't remain on when the user
> clicks on other links on the web page.  As soon as you click on any other
> links the 'active menu state' reverts to a 'normal state'. Can anyone
> explain why this happens?


When the user clicks on a link that particular link *is* active, and
when the user clicks on another link then the second link becomes
active, making the first one inactive again.  That is why you can't
have both links showing the active effect you programmed at the same
time.

What you can do is write the same or a very similar effect to the
'active' css that you are using to mark 'visited' links.  However, if
it is the same as the active effect, it can sometimes be confusing to
the viewer in that they think, 'wait a minute.. I just clicked this
link -- why is the other one still 'lit up' or 'darker' or whatever
you tell the CSS to make those active/visited links appear as.    This
can lead to multiple clicking on new links.

I think a better solution is to have either the links go back to their
regular state when a new one is clicked or to have the *visited links*
appear different than either the *unvisited/active* links.


Phoebe
-- 
Words I have learned to spell from CSS-Discussion list - scissors,
tortoise, hover (not hoover)
No virus found in this incoming message.
Checked by AVG. 
Version: 8.0.100 / Virus Database: 269.23.20/1453 - Release Date: 18/05/2008
9:31 AM

No virus found in this outgoing message.
Checked by AVG. 
Version: 8.0.100 / Virus Database: 269.24.1/1464 - Release Date: 24/05/2008
8:56 AM

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to