Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a text file with its own css. Everything in that css works except the link piece. The sharePoint built in css takes over the link and makes it blue color. I wanted the link in the html to be not blue. Any idea why other style in the custom html is not being overwritten but the link one?

a.pagination:link { 
color: FFFFFF;
font-size: 11px;
font-family: sans-serif;
text-decoration: none;
letter-spacing: 2px;
font-weight: 300;
}
share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

The styles are applied in the order that the browser reads them, but you can override that order by inserting !important in your style to make sure it is used no matter what order it comes.

a.pagination:link { color: FFFFFF !important;
    font-size: 11px; font-family: sans-serif;
    text-decoration: none; letter-spacing: 2px; font-weight: 300; }
share|improve this answer
    
WOW. worked in first try. pretty impressive. –  Ana Jul 2 '11 at 11:04
add comment

CSS works in a (C)ascading manner, and the last read, most closely matching rule will be applied. So for instance, an css rule for an id will override the more generic match for a class, which in turn will override any other less specific rules.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.