Results 1 to 3 of 3
  1. #1

    Default Menu color using CSS, need some help

    O.K. I really stink at this and I need a little help in changing the text colors for this menu ONLY.

    Don't laugh, but heres my code:
    "<tr><td> <div class="navMainSearch center"> <div id="navMainWrapper"> <a href="<?php echo zen_href_link(FILENAME_PRODUCTS_ALL); ?>"><?php echo HEADER_LINK_PRODUCTS_ALL; ?></a>&nbsp;|&nbsp;<a href="<?php echo zen_href_link(FILENAME_SPECIALS); ?>"><?php echo HEADER_LINK_SPECIALS; ?></a>&nbsp;|&nbsp;<a href="<?php echo zen_href_link(FILENAME_PRODUCTS_NEW); ?>"><?php echo HEADER_LINK_WHATS_NEW; ?></a>&nbsp;|&nbsp;<a href="<?php echo zen_href_link(FILENAME_FEATURED_PRODUCTS); ?>"><?php echo HEADER_LINK_FEATURED_PRODUCTS; ?></a>&nbsp;|&nbsp;<a href="<?php echo zen_href_link(FILENAME_CONTACT_US); ?>"><?php echo HEADER_LINK_CONTACT; ?></a></td></tr>
    </div>"

    This is a menu directly under the Header/Logo @ www.mopapartsales.com
    With the dark gif background "I want to keep" the menu text is haerd to see and I have to change the color to all the links just to be able to see it.
    So I need to us css to change just this menus text color.
    I have attempted to use classes and div in the Main Stylesheet, but not with any success.
    So do I use ...
    .navMain
    text-align: center;
    color: #FFFFFF;
    }
    or
    #navMain
    text-align: center;
    color: #FFFFFF;
    }

    I hope I'm making sense.

  2. #2

    Default Re: Menu color using CSS, need some help

    O.K. I managed to make some headway.
    First I changed <div id="navMainWrapper">
    to <div id="MynavMain">
    Then deleted <div class="navMainSearch center">


    Then I added to the stylesheet in the beginning:

    a:link, #MynavMain ul li a {
    color: #FFFFFF;
    text-decoration: none;
    }

    a:visited, #MynavMain ul li a {
    color: #FFFFFF;
    text-decoration: none;
    }

    a:active #MynavMain ul li a {
    color: #FFFFFF;
    }
    Then added after /*navagation*/
    #MynavMain {
    background-color: #000000;
    background-image: url(../images/tile_back.gif);
    padding: 0.5em 0.2em;
    text-align: center;
    font-weight: bold;
    color: #FFFFFF;
    height: 1%;
    }

    This added my background gif and centered the menu.

    Now my menu text is white and my hover is red, but I'm unable to influence the visited color just yet. You can see the center one is my attempt.

    How can I change the VISITED color for just this menu??

  3. #3

    Default Re: Menu color using CSS, need some help

    I think I have it...
    In my stylsheet I Removed:

    a:visited, #MynavMain ul li a {
    color: #FFFFFF;
    text-decoration: none;
    }

    replace with:

    ul.MynavMain a, ul.MynavMain a:visited, ul.MynavMain a:active {
    color: #FFFFFF;
    }

    In tpl_header.php, I Edited my menu code and added this class:

    <ul class="MynavMain">

    so it now looks like this:

    <tr><td><div id="MynavMain"><ul class="MynavMain"><a href="<?php echo zen_href_link(FILENAME_PRODUCTS_ALL); ?>"><?php echo HEADER_LINK_PRODUCTS_ALL; ?></a>&nbsp;|&nbsp;<a href="<?php echo zen_href_link(FILENAME_SPECIALS); ?>"><?php echo HEADER_LINK_SPECIALS; ?></a>&nbsp;|&nbsp;<a href="<?php echo zen_href_link(FILENAME_PRODUCTS_NEW); ?>"><?php echo HEADER_LINK_WHATS_NEW; ?></a>&nbsp;|&nbsp;<a href="<?php echo zen_href_link(FILENAME_FEATURED_PRODUCTS); ?>"><?php echo HEADER_LINK_FEATURED_PRODUCTS; ?></a>&nbsp;|&nbsp;<a href="<?php echo zen_href_link(FILENAME_CONTACT_US); ?>"><?php echo HEADER_LINK_CONTACT; ?></a></td></tr></ul>
    </div>

    This keeps all my text white for just this menu, and allows all other link colors alone. "active, hover and visited"

    To view the changes go to www.MoparPartSales.com

    Hope this helps someone else :)

    Oh if i'm incorrect in any way, Please feel free to comment.

 

 

Similar Threads

  1. Need some CSS help.
    By ChrisVCB in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 25 Nov 2010, 11:52 PM
  2. I need some help wit my css
    By oberheimer in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 11 Nov 2009, 09:43 AM
  3. Help, need to implement a css menu
    By niffy in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 3 Jun 2009, 04:16 PM
  4. Need some css help
    By canemasters in forum General Questions
    Replies: 10
    Last Post: 14 May 2008, 05:27 AM
  5. Need some css help
    By canemasters in forum General Questions
    Replies: 2
    Last Post: 13 May 2008, 11:03 PM

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