WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Page widget CSS problem in Corporate theme - please help (5 posts)

  1. Magdalena Halford
    Member
    Posted 4 years ago #

    Hi - I am building a site using corporate theme. I added the WP "page" widget to the sidebar, and there is a problem with how the css displays the links in the sidebar. The page you are on, as well as the children pages, get highlighted in grey. This is due to the nav css rules, which are in the style sheet as:

    #nav a:hover, #nav a:active, .current_page_item a, #home .on {
    background:#4E4F53; /*mover over*/
    text-decoration:none
    }

    The problem is that I cannot figure out how to make the background rule not apply to the sidebar. I tried to write separate rules for #sidebar, but they get applied to the main nav menu too! I tried putting them in the css file, and I also tried putting them directly in the sidebar code page for that theme, but they still get applied to the nav menu. Maybe I am not writing the correct rules? I don't really know css so I am just using triel and error. This is what I was trying to put in to get it to not be grey:

    #sidebar a:hover, a:active, .current_page_item a, #home .on {
    background:#FFFFFF; /*mover over*/
    text-decoration:none}

    I hope someone can help - I have spent hours trying to solve this little issue with no success. All I want is for the sidebar menu to not be highled in grey, but with the main top nav bar staying the way it is. You can see my problem at:

    http://www.halfordrealestate.com/?page_id=38

    Thanks,
    Magdalena

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Try:
    #sidebar .current_page_item a {background:#fff;color:#00008B;}

  3. Magdalena Halford
    Member
    Posted 4 years ago #

    Excellent! That helped the grey problem!

    The only thing now is that the current page and the children pages in the sidebar menu no loger hover red (the other links still hover red). How do I add the hover red back into that?

    I appreciate this sooo much - I feel silly having spent hours instead of just posting here. New to this, after all.

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    Add #sidebar .current_page_item a:hover {color:#d50000;}

  5. Magdalena Halford
    Member
    Posted 4 years ago #

    Great - it worked! You just made my day. What is so simple for some can be such a puzzle for others. :)

Topic Closed

This topic has been closed to new replies.

About this Topic