Results 1 to 2 of 2
  1. #1
    Join Date
    May 2010
    Posts
    15
    Plugin Contributions
    0

    Default navbar/mouseover make a link stay highlighted when its clicked

    Please help been trying to figure this out for like 1week and been searching all forum all day, noone seems to know how to do it :S gaah


    I have 4 buttons - Home, New Products... etc.

    I want a mouse over so that when i mouse over the Home button, the button changes color/image and when i MouseOut, it goes back to the original color/image.

    Also when the link is clicked and the page loads, I would like the link/image to stay highlighted so that the visitor knows which page he/she is on.


    Thanks,


    I have managed to do the mouse over and mouse out but not to make it stay highlighted with this code:

    Code:
      <style type="text/css">
     A#vbUL_ohs16a{display:none}
     </style>
    
     <table id="vista-buttons_com_idohs16" width="0" cellpadding="0" cellspacing="0" border="0"><tr>
       <td style="padding-left:0px" title =""><a href="index.php?main_page" onmouseover='xpe("ohs16o");' onmouseout='xpe("ohs16n");' onmousedown='xpe("ohs16c");'><img id="xpi_ohs16" src="hm-files/btohs16_0.png" name="vbohs16" border="0" alt="Home" /></a></td>
    
    
    
       <script type="text/javascript"> var vbImgPath="hm-files/"</script>
      <script type="text/javascript" src="hm-files/scohs16.js"></script>
    Really appreciate any help... <3

  2. #2
    Join Date
    Feb 2010
    Location
    Arizona
    Posts
    50
    Plugin Contributions
    0

    Default Re: navbar/mouseover make a link stay highlighted when its clicked

    This is a section from a stylesheet I used to control the Anchors according to what status they are at, mine kept visited and active the same color, but changing the visited color will produce the effect for user refernce... see css comment below

    .dropmenu A:visited
    {
    PADDING-RIGHT: 1px;
    DISPLAY: block;
    PADDING-LEFT: 1px;
    FONT-WEIGHT: bold;
    FONT-SIZE: 15px;
    PADDING-BOTTOM: 1px;
    MARGIN: 1px;
    WIDTH: 150px;
    COLOR: #CCCCFF; /* <<<change this color, as mine keeps visited and active links the same color, experiment even with these attributes of the html tag, and I think you can get it to work by researching the A anchor tag a little, and modifying it inline, or from a stylesheet to do what you want... */
    PADDING-TOP: 1px;
    FONT-FAMILY: Palatino Linotype;
    BACKGROUND-COLOR: #000099;
    TEXT-ALIGN: left;
    TEXT-DECORATION: none
    }
    .dropmenu A:active
    {
    PADDING-RIGHT: 1px;
    DISPLAY: block;
    PADDING-LEFT: 1px;
    FONT-WEIGHT: bold;
    FONT-SIZE: 15px;
    PADDING-BOTTOM: 1px;
    MARGIN: 1px;
    WIDTH: 150px;
    COLOR: #CCCCFF;
    PADDING-TOP: 1px;
    FONT-FAMILY: Palatino Linotype;
    BACKGROUND-COLOR: #000099;
    TEXT-ALIGN: left;
    TEXT-DECORATION: none
    }
    .dropmenu A:hover
    {
    PADDING-RIGHT: 1px;
    PADDING-LEFT: 1px;
    FONT-WEIGHT: bold;
    FONT-SIZE: 15px;
    PADDING-BOTTOM: 1px;
    MARGIN: 1px;
    WIDTH: 151px;
    COLOR: white;
    PADDING-TOP: 1px;
    FONT-FAMILY: Palatino Linotype;
    BACKGROUND-COLOR: #000099;
    TEXT-ALIGN: left;
    TEXT-DECORATION: none
    }

 

 

Similar Threads

  1. v151 Products don't show when "ALL PRODUCTS" link is clicked.
    By apriigem in forum General Questions
    Replies: 5
    Last Post: 27 Feb 2013, 11:44 PM
  2. Add to cart link doesn't work - no link when I mouseover
    By wyckoff in forum Basic Configuration
    Replies: 0
    Last Post: 26 Oct 2009, 09:12 PM
  3. Layout enlarges when any link is clicked.
    By punkprints in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 13 Jul 2008, 06:13 AM
  4. log off link - how do I make it only appear when logged on?
    By gsdcypher in forum General Questions
    Replies: 23
    Last Post: 2 Apr 2008, 12:28 AM
  5. Can I make the subcategory menu links stay open?
    By bjraines in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 5 Oct 2006, 05:02 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR