• I’ve tried to get WP to highlight the page currently selected in the menu bar by using

    .current_page_item {
      color:green;

    in my stylesheet, yet for some reason it won’t highlight. I can highlight the background colour but not actually the text itself.

    here is my CSS:

    a {
    
    	color: #FEE886;
    
    }
    
    a img {
    
    	border: none;
    
    }
    
    a:visited {
    
    	color: #FEE886;
    
    }
    
    a:hover {
    
    	color: #9a8;
    
    }
    
    *{margin:0; padding:0; list-style-type: none;}
    body{background: #ccc url(/wordpress/images/tile_bg.jpg) repeat;
    	font: normal 12px Arial, Helvetica, Geneva, sans-serif;
    	text-align: center;
    }
    h1{color: #FEE886; font-size: 18px; margin:0; text-align:right;
    	text-transform: uppercase;
    	font-weight: normal;
    	font-style: normal;
    }
    h2{font-size: 12px; font-weight:normal; color: #FEE886; margin:5px 0 10px;
    	text-transform: uppercase;
    }
    .current_page_item {
      color:green;
    }
    #container{background: #0A0A0A; width:750px;
    	text-align: left;
    	text-align: left;
    	color: #d8d8d8;
    	margin-right: auto;
    	margin-top: 20px;
    	margin-left: auto;
    	padding: 20px;
    }
    #sidebar{float:left; width: 110px;
    	background-color: #0A0A0A;
    	text-align: center;
    	font: 18px Georgia, "Times New Roman", Times, serif;
    	color: #7f7f7f;
    }
    
    #sidebar a {
    	color: #7f7f7f;
    	text-decoration: none;
    	list-style-type: none;
    }
    
    #sidebar a:hover {
    	color: #ccc;
    	text-decoration: none;
    	list-style-type: none;
    
    }
    #main{float:right; width: 620px;
    	background-color: #0A0A0A;
    	color: #d8d8d8;
    	margin: 10px;
    	line-height: 17px;
    }
    #footer{clear:both; text-align: center;
    	font-size: 10px;
    	color: #707070;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • maybe try adding an ‘a’ to that

    .current_page_item a {
        color: green;
    }

    if it were me, I’d probably put

    .current_page_item a:link, .current_page_item a:visited {
        color: green;
    }

    let me know if that works

    Thread Starter ollee

    (@ollee)

    yeah–sorted. thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘highlighting current page in css’ is closed to new replies.