Links not accepting class change

Thanks

That makes a lot of sense and worked perfectly.

If you had any suggestions about another way to reference

#content #affiliate-div a.center_link:link

,

I’d love to hear it, but I’m assuming you mean that in this case, because of the specificity I was looking for I had no choice, given what’s here already.

also, now that I’m using a block level element to contain the link, is there any reason for this anymore?:

Content #affiliate-div a.center_link:link, Content #affiliate-div a.center_link:visited, Content #affiliate-div a.center_link:hover { /* Note: Shorthand for listing pseudo classes */
color: #000000;
font-weight: bold;
/margin-right: auto;
margin-left: auto;
display: block;
width: 10%;
/

I told him thajt code, he could have removed the #affiliate-div and just tell him to place it later in the stylseheet, but I thought for all intents and purposes lets have no worries about the specificity :).

@OP, just remove the #ffiliate-div reference and place the styles that previously DID just have it (the anchor) at the end of the stylsheet (or after the Content a{} code)

There’s no need for the styles marked in bold above but you still need to over-ride the “Content a” styles so something like this should be ok.


#affiliate-div a.center_link {
    color:#000!important;
    font-weight: bold;
}



However I usually advise against using !important but in this case the code is much shorter so i think it’s worthwhile. Just never over-use !important or you run into issues.

Without !important you would need to do this to make sure IE6 behaves.


#affiliate-div a.center_link,
#affiliate-div a.center_link:visited,
#affiliate-div a.center_link:hover {
    color:#000;
    font-weight: bold;
}


I’m pretty sure I did have a.center-link below the Content declaration in the style sheet but it might have been something else at that point.