vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   [solved] mouseover effect on navbar Search cell? (https://vborg.vbsupport.ru/showthread.php?t=93896)

Marris 08-08-2005 10:59 PM

[solved] mouseover effect on navbar Search cell?
 
1 Attachment(s)
I am trying to add a mouseover effect (background color change) to each <td> cell in the navbar.

What I have done is define a new css class vbmenu_control_mover which is identical to vbmenu_control except for a different background color. Then I change the <td> class if onmouseover is detected on the cell.

This method works fine for all cells in the navbar with standard links, but the <td> onmouseover background change fails on the Search and Quick Links cells. Presumably this is because they have their own mouseover handling.

Is there any way to have mouseover on the Search and Quicklinks effect the entire containing <td> cell, rather than just the 'Search' text itself?

The only progress I have made was to move the id="navbar_search" from the <td> tag to the <a> tag. This allows the <td> background change over the cell, but only until the mouse reaches the link text...then the button reverts to the original background.

PHP Code:

<td class="vbmenu_control" onmouseover="this.className='vbmenu_control_mover'" onmouseout="this.className='vbmenu_control'"><a id="navbar_search" href="$vboptions[bburl]/search.php?$session[sessionurl]accesskey="4">$vbphrase[search]</a> <script type="text/javascript"vbmenu_register("navbar_search",1); </script></td

The attached image shows the mouseover effect on the cell (darker background), then the lower image shows the problem when the cursor is over the link text. The <td> background formatting is lost and the backgound color only changes under the text.

Marris 08-11-2005 12:48 AM

Well, I couldn't get around the popup code overriding the table mouseover condition. I had to redo the menu with a css based rollover solution using a horizontal list and setting the list item tag <li id="navbar_search">.

In case anyone else runs into the same problem, here's the css I ended up with:

PHP Code:

    .navbar_list {
      
fontbold 11px tahomaverdanagenevalucida'lucida grande'arialhelveticasans-serif;
      
padding.2em 0 .2em 0;
      
background-color#738FBF;
    
}
    .
navbar_list ul {
    
padding0;
    
margin0;
    
text-aligncenter;
    list-
style-typenone;
    
white-spacenowrap;
    
displayinline;
    }
    .
navbar_list li {
      
color#FFFFFF;
      
background-color#738FBF;
      
fontbold 11px tahomaverdanagenevalucida'lucida grande'arialhelveticasans-serif;
      
displayinline;
      
    }
    .
navbar_list a {
    
padding.2em 1.6em .2em 1.6em;
     
text-decorationnone;
     
color#FFFFFF;
       
background-color#738FBF;
    
}
    .
navbar_list a:link, .navbar_list a:visited {
    
color#FFFFFF;
      
background-color#738FBF;
    
}
    
    .
navbar_list a:hover, .navbar_list a:active {
      
color#FFFFFF;
      
background#3E5C92;
    


The default <td></td> cells of the navbar are replaced with a <ul><li><li><li></ul> list within a div of the class defined above.

And the list entry for the search button:

PHP Code:

<li id="navbar_search"><a  href="$vboptions[bburl]/search.php?$session[sessionurl]accesskey="4">$vbphrase[search]</a><script type="text/javascript"vbmenu_register("navbar_search",1);</script


Boofo 08-11-2005 12:55 AM

No closing li tag? ;)


All times are GMT. The time now is 11:17 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02640 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete