WordPress.org

Ready to get started?Download WordPress

Forums

change CSS of current_page_item (3 posts)

  1. antorera
    Member
    Posted 2 years ago #

    I just added a language selector to my site and the current-page-item is being applied to the menu and changing the style, even though I want them all to be the same. I've tried changing the styles, but I can't find the right selectors so that I can change a and a:hover state.

    This is what I've tried doing, although it hasn't had any effect..

    #lang_sel_list ul a, #lang_sel_list_list ul a:visited, #lang_sel_list .current_page_item ul a, #lang_sel_list .current_page_item ul a:visited {
    	display: inline;
    	font-weight: normal;
    	border: 0;
        background: none;
        color: #E0D2BC;
        height: auto;
        line-height: 1em;
        padding: 3px 10px;
    }
    
    #lang_sel_list a:hover, #lang_sel_list .current_page_item a:hover {
    	background: none;
    	color: #992222;
    }

    Here is the site link.

    What am I missing?

  2. antorera
    Member
    Posted 2 years ago #

    Uf, now all of the links are displaying a color I don't want because those pages have been visited. But I can't find where to change these all to one standard color that doesn't change.

    Any ideas?

  3. antorera
    Member
    Posted 2 years ago #

    I fiddled a little and discovered one problem in the code (an extra _list in the identifier).

    However, I am still not able to get the red color when I hover over the current language item.

    Here's the updated code:

    #lang_sel_list ul a, #lang_sel_list ul a:visited {
    	display: inline;
    	font-weight: normal;
    	border: 0;
    	background: none;
    	color: #E0D2BC;
    	height: auto;
    	line-height: 1em;
    	padding: 3px 10px;
    }
    
    #lang_sel_list ul a:hover, #lang_sel_list ul a:active {
    	background: none;
    	color: #992222;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic