2 differents text colors for links 2 differents text colors for links
 

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

2 differents text colors for links

Started by mdssdm, April 18, 2006, 06:06:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mdssdm

Hi,

I've searched the forum and found something about changing the link color through css, but that's not exactly what I'm looking for.

I'm trying to get two different text-colors for links (e.g. black and white, depending on the background)
Please see the attachment for details

I changed the link-text-color in the style.css:

---snip---

a {color: #FFFFFF; text-decoration: none;}
a:hover {COLOR: #555555; TEXT-DECORATION: none; background-color:#F5E283;}

--- snip ---

Works perfect for the SYS_MENU on a dark background
But on a bright background, I would like to change the link-text-color to black (for the SUB_MENU)

Before switching to coppermine  ;) I was able to override the css settings by using

<a style="font-family:'Lucida Grande', 'Trebuchet MS', Arial;color:#323533" href="xxx">xxx</a>

to get the desired "link-color"

But how can i achieve this with the {SUB_MENU}

Many thanks in advance

mds




Joachim Müller



Joachim Müller

define link properties for the css class that wraps the menu you want to see changed, something like a.test { color:black;}

mdssdm

Done the modifcation in template.html and style.css and added a class for SYS_Menu and SUB_Menu.
Links went black but not entirely  ???

Link color for Album and Search remains unchanged (white)

--- snip template.html ---

<table align="center" border="0" cellpadding="0" cellspacing="0" width="900" style="border-left:1px solid #A2A2A3; border-right:1px solid #A2A2A3; border-top:1px solid #D7D7D7">
   <tr> <td class="SubMenu" style="background-image:url(./themes/blue/images/tverlauf3.jpg)" height="20" width="1" align="center"> {SUB_MENU}</td> </tr>
   <tr>
      <TD>
         <table class="gallerymain" width="100%" align="center" border="0">
            <tr>
               <TD>
                  <table align="center" width="100%" border="0" cellpadding="15" cellspacing="15">
                     <tr>
                                 <td valign="top" align="center">
                                   {ADMIN_MENU}
                                  {GALLERY}
                                 <div style="text-align:center;">
                                   <div>
                          {LANGUAGE_SELECT_FLAGS}<br />
                          {THEME_SELECT_LIST}{LANGUAGE_SELECT_LIST}
                          </div>
                          </div>
                                 </td>
                            </tr>
                  </table>
               </TD>   
            </tr>
         </table>
      </TD>
   <tr> <td style="background-image:url(./themes/blue/images/tverlauf4.jpg)" height="18" width="1"> </td> </tr>
</table>


--- snip template.html ---

--- snip css ---

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

a.hover {
   COLOR: #555555;
   TEXT-DECORATION: none;
   background-color:#F5E283;
}

.SysMenu {
   font-family: 'Lucida Grande', Geneva, Tahoma , Verdana, Arial, sans-serif;
   font-size: 12px;
        display: block;
        margin-bottom: 2px;
}

.SubMenu {
   color: #000000;}

.SysMenu a:hover {
        color: #555555;
   background-color:#F5E283;
        text-decoration: none;
}

.SubMenu a:hover {
        color: #555555;
   background-color:#F5E283;
        text-decoration: none;
}

.SubMenu a:link {
        color: #000000;
   text-decoration: none;
}

--- snip css ---

Joachim Müller

doesn't surprise me, as you changed the class that controls the menu. The search and album links are controlled by different classes. Take a look at http://forum.coppermine-gallery.net/index.php?topic=24056.msg123520#msg123520 to find out what class controls what section of the output.

mdssdm

Already using the Web-Developer Tool for Mozilla. It's a very useful little thing...

But it shows me only the css class which I declared to controll the Menu (in this case .SubMenu)
So I'm stuck in here

Other interesting thing is:

Using Mozilla under linux the link color for "Album" and "Search" remains unchanged,
but using Konqueror all links are changing to black

Will try IE tomorrow, maybe there is a problem in interpreting css instructions for different Browsers

mdssdm

Well it's a completely different picture on IE....

Display is cluttered really awful, especially the SubMenu row, or better what was suppoesed to be the SubMenu row.
It's not a row anymore, more like columns....

Right now, I'm not quite sure what's going on

Will also try Opera


mdssdm