menu backgroud problem!!! menu backgroud problem!!!
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

menu backgroud problem!!!

Started by Castilla, April 01, 2006, 10:12:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Castilla

Hello...
I can´t fix the problem of my menu background and I want to ask if somebody can give me some tips!!??
My sys_menu and sub_menu are changed
They looks like that:(on theme.php)

$template_sys_menu = <<<EOT                   
                        <table align="right" cellpadding="0" cellspacing="1">
                                <tr>
<!-- BEGIN home -->                                                                                  
<td class="topmenu"  ><a href="{HOME_TGT}" title="{HOME_TITLE}">{HOME_LNK}</a> </td>                                                                             
<!-- END home -->
                .
                .
                .

They looks like that: (style.css)

.topmenu {
        font-size : 100%;
        border: 1px solid #FF0000;
        background-color : #000000;
        margin-top:0px;
        margin-right:0px;
        text-align: center;

}

.topmenu a {
        color : #FFFFFF;
        text-decoration : none;     
}

.topmenu a:hover  {
background-color:#FF0000;
        color : #FFFFFF;
        width : 50;
        text-decoration : none;
}

.topmenu td  { font-weight : bold;
  }
But... if I put this code on SYS menu template :
<td class="topmenu" width="50"  ><a href="{HOME_TGT}" title="{HOME_TITLE}">{HOME_LNK}</a> </td>       
the cell get bigger but the hover only says around the letters...

What do I have to do to the hover be in the roll cell????? :o :o :o
Somebody Know that????
my site: www.adcastilla.com/castalbum

Thank´s Adriana Castilla
 
Adriana Castilla

Joachim Müller

the pseudo-class "hover" applies to links. The links are determined by the <a>-tags. Everything you apply to the hover class will only have an efect to the stuff within the <a></a> tag. If you need the background of the table cell to change on hover, you'll have to use some Javascript event like "onmouseover" to trigger this.

Castilla

Ok... I fixed!!!!!!!!!!!!!!!! Thank you very much !!! :D :D :D
If somebody want to know how I did...
in style.css i create:

.topmenu2 {
        font-size : 100%;
      border: 1px solid #FF0000;
        background-color : #FF0000;
        margin-top:0px;
        margin-right:0px;
      text-align: center;
.topmenu2 a {
        color : #FFFFFF;
        text-decoration : none;

.topmenu2 a:hover  {
background-color:#FF0000;
        color : #FFFFFF;
      
        text-decoration : none;
-----------------------------------------------------
in theme.php I add inside each td for sys and sub menu:
onmouseover="this.className='topmenu2'" onmouseout="this.className='topmenu'"
------------------------------------------------------------------
so... looks like that the td (ex: td for home):
<!-- BEGIN home -->                                       
<td onmouseover="this.className='topmenu2'" onmouseout="this.className='topmenu'" class="topmenu" width="100" >
<a  href="{HOME_TGT}" title="{HOME_TITLE}">{HOME_LNK}</a> </td>
                                       
<!-- END home -->
----------------------------------------------------------------
Thank you.....  ;)
Adriana Castilla