How can I solve this CSS links inheritance problem?
Posted
by Craig Whitley
on Stack Overflow
See other posts from Stack Overflow
or by Craig Whitley
Published on 2010-04-24T20:50:51Z
Indexed on
2010/04/24
20:53 UTC
Read the original article
Hit count: 215
It's stumped me an I've tried a couple of things - then again I'm not very experienced so I may just be going about it the wrong way. Basically I want to have different link styles for both the navigation and the pagination. The #navigation styling is overriding my .pagination styling though, and it doesn't appear to matter if the pagination is a class or an ID. I've also tried putting !important in the pagination styling, but this then makes the navigation inherit the pagination (been using firebug to check the inheritance).
#navigation a:active, a:link, a:visited, a, a:focus {
color: #ffde2f;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 24px;
text-decoration: none;
}
#navigation a:hover {
color: #ffffff;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 24px;
text-decoration: none;
}
.pagination a:active, a:link, a:visited, a, a:focus {
color: #fff;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 14px;
text-decoration: none;
}
.pagination {
color: #fff;
font-size: 14px;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
}
© Stack Overflow or respective owner