Ian
Ian

Reputation: 33

Format a link of a class in a div with an id

I have a link that is in a div, and the div has an id of sidebar-left. I want to make it a different color when the link has the class current_page_item. I have other links on the page (that are not in the div) that I do not want this formatting to apply to.

I have tried several different versions of the following code with no luck:

#sidebar-left.current_page_item a {
    color: #00b0f0;
}

Does anyone know what I am doing wrong?

Thanks.

Upvotes: 1

Views: 120

Answers (1)

Indranil
Indranil

Reputation: 2471

Try:

#sidebar-left .current_page_item a {
    color: #00b0f0;
}

Upvotes: 1

Related Questions